{"$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":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"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":"ED4","name":"Outbox / dual-write","shortDescription":{"text":"Outbox / dual-write"},"helpUri":"https://codehealth.canine.dev/dimensions/ED4"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R5","name":"Dependency Freshness","shortDescription":{"text":"Dependency Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/R5"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"CodexService.mergeHistoryMessages (cyclomatic 168): CodexService.mergeHistoryMessages has cyclomatic complexity 168 (threshold 15). Of this number, 166 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff046295c70fba9a70353d1c7d31a92faa03e50d0cbc6b1470e68bbc0347a3d5"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.upsertStreamingSystemItemMessage (cyclomatic 127): CodexService.upsertStreamingSystemItemMessage has cyclomatic complexity 127 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2692}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8686dc7452ed55114917ea5846b543c507d3580fc672db5be1b13b833b34c15"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.loadThreadHistoryIfNeeded (cyclomatic 108): CodexService.loadThreadHistoryIfNeeded has cyclomatic complexity 108 (threshold 15). Of this number, 107 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"5758c9bcd791881b9dea6747b468233dbf0425dc304adc6f3830d9a270ebcb56"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-adapter.applyAppServerMessageToConversationState (cyclomatic 95): desktop-ipc-conversation-adapter.applyAppServerMessageToConversationState has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"1befb7b9a0f18e691528c9c50f43e8dc779b625496e149f8ebb2cf2abe739ed0"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.reconcileExistingMessage (cyclomatic 87): CodexService.reconcileExistingMessage has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2163edef76f065ca9df172b6d00a7eb924b4e87e73d2788679926ad250a26d"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.completeAssistantMessage (cyclomatic 79): CodexService.completeAssistantMessage has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4013}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8f6c5874fb5f53a855ad58ef5f9e74410f1e5bed58fa97cb6b8691ce0c3bec"}},{"ruleId":"D1","level":"warning","message":{"text":"parseSessionJsonlTurns (cyclomatic 76): parseSessionJsonlTurns has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dea9d29b7ddf3ed72bc83627b744017dab97497668d7c16e7fa0b9422445688"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleNotification (cyclomatic 68): CodexService.handleNotification has cyclomatic complexity 68 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"c699cad927a4d7f64f40cd2635ec5b6ff54d36ca2451ff55d9bdfa6eb2ea332f"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRow.assistantView (cyclomatic 62): MessageRow.assistantView has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb79b0a5f3855f28fcc5d77d867265e5439621138b787c9e25e1b3deefb3912"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineRenderProjection.renderItems (cyclomatic 62): TurnTimelineRenderProjection.renderItems has cyclomatic complexity 62 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 28 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9883df3d0098ee15d7e908248490afe2115a828d036fd33d8be7434abfea491"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.observeInbound (cyclomatic 61): createDesktopIpcActionFollower.observeInbound has cyclomatic complexity 61 (threshold 15). Of this number, 52 points are the body\u0027s own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"076092bcba07717074fc373fb43cf8d382eb00c59053008f69977a802ceedffc"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.markTurnCompleted (cyclomatic 60): CodexService.markTurnCompleted has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5308}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b69cf915ede325eebda8f6989d276c8f8d39b08c0a3aba62574740d7be418d2"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.observeInbound (cyclomatic 58): desktop-ipc-action-follower.createDesktopIpcActionFollower.observeInbound has cyclomatic complexity 58 (threshold 15). Of this number, 49 points are the body\u0027s own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"220f3433b12d837e4745573debb8067c227537f1c7890955bdf2c05c9a1f73e5"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.startBridge (cyclomatic 57): bridge.startBridge has cyclomatic complexity 57 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 27 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6f38c81c5dcb7663706384db71ce896b618859bc0288f7f97f6e6433189241"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.synthesizeNotificationsFromRolloutEntry (cyclomatic 56): rollout-live-mirror.synthesizeNotificationsFromRolloutEntry has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f306282e16bd675ed96ce4a4f2bb2f6bec1b8a2833071bc1f7c6471a2413ea"}},{"ruleId":"D1","level":"warning","message":{"text":"synchronizeDesktopConversationCompatibility (cyclomatic 56): synchronizeDesktopConversationCompatibility has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body\u0027s own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a05f2617dcd2c9d23d317be47794699263d07852f27e81b7e8cbd9aa61a4ee7"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.handleRequest (cyclomatic 54): opencode-runtime.createOpenCodeRuntime.handleRequest has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"a99b9584734796939767f953c2e3d98a6bd85042be2bb02b5f2eef767df0f0d0"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.handleRequest (cyclomatic 54): createOpenCodeRuntime.handleRequest has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cabbad667da742c7a8f988431895e3b0e989e092c684928df5ba0c9e2969304"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleTurnStarted (cyclomatic 51): CodexService.handleTurnStarted has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8aa9ae7740ca8935d4191bf7ddbba064be7efc613bf66dc7b5f8e0ab0a3e21"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleStructuredItemLifecycle (cyclomatic 49): CodexService.handleStructuredItemLifecycle has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"1791cd992ccfd7a06c3f396e75cbae34cf1d08b499ca37fc42237c51e56ea50b"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnView.body (cyclomatic 48): TurnView.body has cyclomatic complexity 48 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f1275b8b8d9982d728e43e120c14c90e85e6cd2a1b709d80940c26f5a6d2da"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.onEnvelope (cyclomatic 47): desktop-ipc-action-follower.createDesktopIpcActionFollower.onEnvelope has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6187a9f1d970f9f1631746bfb776e22f3298297f1c8bf59cea721f46d1b285"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.onEnvelope (cyclomatic 47): createDesktopIpcActionFollower.onEnvelope has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce85ae9c7cf219240808f1a883f8c8484885d32e1b0f50c3e372884d54334cc"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.ensureThreadResumed (cyclomatic 46): CodexService.ensureThreadResumed has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd7ca734aa948606955fb3b4b014b62cd704aa4468bec7e6e76db2598e32bb2"}},{"ruleId":"D1","level":"warning","message":{"text":"buildConversationStateFromThread (cyclomatic 45): buildConversationStateFromThread has cyclomatic complexity 45 (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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"e56093c89a39b631b89394121f09b899f91f2bbdada86d2db272c22e52405fde"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.observeOutbound (cyclomatic 45): createDesktopIpcLiveOwner.observeOutbound has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"b736e396093ab5383b7792499ab3849ab9f7e2a0dcba5dfe36437538b5307b1a"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnComposerHostView.body (cyclomatic 44): TurnComposerHostView.body has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"2485c9e196cff3be2cb2ee9ea07aabbb458fff8629e002f17f9499c29af5f296"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.refreshTouchedNormalizedActiveTurns (cyclomatic 44): desktop-ipc-action-follower.refreshTouchedNormalizedActiveTurns has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3521}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9ce6beaad5357098dbd0fe43629e125641f7b199d669e9d66967ca8be1ab329"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeOutbound (cyclomatic 44): desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeOutbound has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0dc08601af6e5e109d48c588ee66dffb37ed07392dcd38a528708aabaaffdf"}},{"ruleId":"D1","level":"warning","message":{"text":"remodex-jsonl-diagnose.diagnoseSessionJsonl (cyclomatic 44): remodex-jsonl-diagnose.diagnoseSessionJsonl has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex-jsonl-diagnose.js"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"b375c2571257cd3e3779494cbf4735ba3237530bd7216185c96cfe85a6bb8f33"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.watchTurn::poll (cyclomatic 43): opencode-runtime.createOpenCodeRuntime.watchTurn::poll has cyclomatic complexity 43 (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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e90acb573349f2df2fa98de0a1c050e52cc93f0494d5cb3203c35245218b7ba"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.watchTurn::poll (cyclomatic 43): createOpenCodeRuntime.watchTurn::poll has cyclomatic complexity 43 (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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"816ff39f24330bceabe853f41276d18cabadfe42e2144db2297af852829952af"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.applyCanonicalHistoryOrder (cyclomatic 42): CodexService.applyCanonicalHistoryOrder has cyclomatic complexity 42 (threshold 15). Of this number, 39 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2219dc3e1e9b49a6f7387a7b9eef44c72a5914cb669f8ac981bb2395cc38513"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnFileChangeSummaryParser.parse (cyclomatic 42): TurnFileChangeSummaryParser.parse has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ddd901f37e0f3269651ba27cabc6f7a8bd921d698d22bbb3b12cbf9ed1c6f95"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.decodeMessagesFromThreadRead (cyclomatic 41): CodexService.decodeMessagesFromThreadRead has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"772064a69f18f51287b38889825f7938f0bf091aace11a7ef5b3f4e61a0d651b"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.repairCanonicalAssistantSourceIdentityRotations (cyclomatic 41): CodexService.repairCanonicalAssistantSourceIdentityRotations has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1708}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd7c1ca8b8a26a3484cb48e367ba1f82f05ad737a419721e7aec1971798561c5"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.loadOlderThreadHistoryPage (cyclomatic 38): CodexService.loadOlderThreadHistoryPage has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"26bccb195e95861c5e55263ab2fa08d6568d279329002c798d994ccfea222431"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.mergeRelayHistoryItemsWithJsonlItems (cyclomatic 38): bridge.mergeRelayHistoryItemsWithJsonlItems has cyclomatic complexity 38 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8b3ae7fbeeea25b8a16e835f7bd77e9666b4eb55c643f977d2c318a5fbea10"}},{"ruleId":"D1","level":"warning","message":{"text":"backgroundHistoryTurns (cyclomatic 38): backgroundHistoryTurns has cyclomatic complexity 38 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 14 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3923}}}],"partialFingerprints":{"codehealthFindingId/v1":"31cb59be2d040ddfabad35f2f5ff518062ca363d4570db760bcf6e3246d12863"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.scheduleCanonicalHistoryReconcileIfNeeded (cyclomatic 37): CodexService.scheduleCanonicalHistoryReconcileIfNeeded has cyclomatic complexity 37 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c761d54b47aaf6c58d91aa0bc358ccbe69a9396e2b171e66c879b1dd3d1054"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.startThreadImpl (cyclomatic 37): CodexService.startThreadImpl has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d4a36748c8bad467bac2958ff04f13c6f108363fdcf5c3a03d14d8f89786f5"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.bootstrapFromExistingRollout (cyclomatic 37): rollout-live-mirror.bootstrapFromExistingRollout has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a33eceebafb8a1fc4e3abdbebb9be14ad8f2d89feb8cf364293f47cff8e7017"}},{"ruleId":"D1","level":"warning","message":{"text":"SubagentActionCard.readableStatus (cyclomatic 36): SubagentActionCard.readableStatus has cyclomatic complexity 36 (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":"CodexMobile/CodexMobile/Views/Turn/Messages/SubagentViews.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"94432c86270c4d199491c9f3b676eb1a5545c59e8f96accd3b15777c3749be7a"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.interruptTurn (cyclomatic 35): CodexService.interruptTurn has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b758669541379a162ce7071a12fc20ec8041a3c70f8e1f39a7506b0cbffd4b3"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.steerTurn (cyclomatic 35): CodexService.steerTurn has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1992}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec4f0d09d1af6047314ff0cbf94343a5593e3e84f73502542f992c2b1d28cc7"}},{"ruleId":"D1","level":"warning","message":{"text":"phodex-backend-relay.setupRelay (cyclomatic 35): phodex-backend-relay.setupRelay has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 55, 141, 159, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae23c92e2ada0898f30bfa4844e9cacaac38dab920184918af5d331946dd542e"}},{"ruleId":"D1","level":"warning","message":{"text":"projectConversationState (cyclomatic 35): projectConversationState has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"4608c652357a6da9f5486bb67d57b38de238f3d8106ab7e714c702d6e9230f40"}},{"ruleId":"D1","level":"warning","message":{"text":"startBridge.handleApplicationMessage (cyclomatic 34): startBridge.handleApplicationMessage has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"94a458af06e74c83e3a63f89c5f96c54e9dd2904d20a6ae3bb70aa7d1b0a8365"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.submitDesktopFollowerRequest (cyclomatic 34): createDesktopIpcActionFollower.submitDesktopFollowerRequest has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2512, 2486, 2456). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a7dbe956fb5f577e710afee2f741f37bee375479ea60370053912df35a9562"}},{"ruleId":"D1","level":"warning","message":{"text":"createNormalizedLiveIndex (cyclomatic 34): createNormalizedLiveIndex has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3396}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb28504cd3303e85c93b5fdf16fd0d7f586505f8712ed43caee94c8ee1e8ec2"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.reconcileLocalThreadsWithServer (cyclomatic 33): CodexService.reconcileLocalThreadsWithServer has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"116c0952a4ed3bb17b5bc2b834b807e424116133649c43ba64074b00632012d8"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.processEvent (cyclomatic 33): opencode-runtime.createOpenCodeRuntime.processEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2d1ca60b79de9eac8c204e5298bab7524efeec048d59932e8ff98e472867c3"}},{"ruleId":"D1","level":"warning","message":{"text":"git-handler.gitRunStackedAction (cyclomatic 33): git-handler.gitRunStackedAction has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d3e5bb7b8700936181e052d455eb7f133ecc7db9390cd137317db889c81ba9"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.submitDesktopFollowerRequest (cyclomatic 33): desktop-ipc-action-follower.createDesktopIpcActionFollower.submitDesktopFollowerRequest has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 2512, 2486, 2456). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eca691ca96d2a628e3d329b0c67b24fea1cf1e1c64e4fcad61e26fcc32a1099"}},{"ruleId":"D1","level":"warning","message":{"text":"normalizeRelayBoundJsonRpcMessage (cyclomatic 33): normalizeRelayBoundJsonRpcMessage has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3618}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08af23a07c3994d42ccbdd0a9519e9aba976fa905d44cf0f581cc8e0122e538"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.processEvent (cyclomatic 33): createOpenCodeRuntime.processEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fcf76ec4de1c994493cffd1bcbdb4bca6a5b569ef84e76623dce78f709ecda"}},{"ruleId":"D1","level":"warning","message":{"text":"AIUnifiedPatchParser.analyzeChunk (cyclomatic 32): AIUnifiedPatchParser.analyzeChunk has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb3eccf3dbc88281de607d68982a31e7cb957f15575e9715ca997346c968318"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.startBridge.handleApplicationMessage (cyclomatic 32): bridge.startBridge.handleApplicationMessage has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5c84a3883a4ca9e1268ff10c0e0dcc6c12c5a8f7ce8fd2765aba677282c7db"}},{"ruleId":"D1","level":"warning","message":{"text":"relay.setupRelay (cyclomatic 32): relay.setupRelay has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 90, 175, 71, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"79527b418b3520db2ff03a6b60521db285c228f6d96c6c0851fae7f179f44a0d"}},{"ruleId":"D1","level":"warning","message":{"text":"backgroundRawTurn (cyclomatic 32): backgroundRawTurn has cyclomatic complexity 32 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3995}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e13a8f04884c553dfbb56acd6cb449bf3faf1072019d85af6cd093891a585c"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.runNextQueuedFollowUp (cyclomatic 32): createDesktopIpcLiveOwner.runNextQueuedFollowUp has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 1815, (anonymous)::canRun, a function literal at line 1854, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1805}}}],"partialFingerprints":{"codehealthFindingId/v1":"65647c3573dd6de9cdfc7b7512caf4fd7f1f1badb951df34639c1c897eeff6f5"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleTurnCompleted (cyclomatic 31): CodexService.handleTurnCompleted has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d75bc6625a8b4843fe847f1997cfefe1983ead55bcab3d2c1b3fc67f2ee287e"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.startRuntimeSettingsUpdate (cyclomatic 31): CodexService.startRuntimeSettingsUpdate has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeSettingsSync.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6d3871b8f47f0fb0dc6575b75aca1f41847669c2c7b84bffdcfd99f8229080"}},{"ruleId":"D1","level":"warning","message":{"text":"AssistantMemoryCitationParser.visibleText (cyclomatic 31): AssistantMemoryCitationParser.visibleText has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/AssistantMemoryCitationParser.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"588ad6d38b72a690481733d0a5a058c274be399d8bc576565ec87cd375467866"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.emitItem (cyclomatic 31): opencode-runtime.createOpenCodeRuntime.emitItem has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e0d10ebdb715adfc4e1b23698cbe8657e7dd0718ddc688017d0c4abc3bb2e8"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.inspectBootstrapRunBoundary (cyclomatic 31): rollout-live-mirror.inspectBootstrapRunBoundary has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b669d3c124a056745723f0a6934d19742c6903580076a4d2f1340e1f992c8b"}},{"ruleId":"D1","level":"warning","message":{"text":"mergeOpenCodeThreadsIntoListResponse (cyclomatic 31): mergeOpenCodeThreadsIntoListResponse has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 10 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5585}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d90cbf6dcfda4f9a17ea7f1562d39e75c31a4b137a277321f91f54b8d9b876f"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.emitItem (cyclomatic 31): createOpenCodeRuntime.emitItem has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"cef07e0c0c7c1248c776ac0081b0c0f516fc302e37cced98aec22b1d3a51f10a"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.appendConfirmedMirroredUserMessage (cyclomatic 30): CodexService.appendConfirmedMirroredUserMessage has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1754}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c55a35ca8bdd6c23f458a1968de8d499f9ac4ca26c6f7ab645532c40e45ab18"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.confirmGitSyncAlertAction (cyclomatic 30): TurnViewModel.confirmGitSyncAlertAction has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"090e2c065ac171c3eb3678907f14f8d16413ad6ebe027760cec182c82bde4ee2"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.readDescendingTurnPage (cyclomatic 30): opencode-runtime.createOpenCodeRuntime.readDescendingTurnPage has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"949cce15421c2bc10f6eec4b584386fd2ed2b37db2b620288d47157f32065ded"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.createThreadRolloutLiveMirror.tick (cyclomatic 30): rollout-live-mirror.createThreadRolloutLiveMirror.tick has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea094ad83e6aea07ea3889c3d17cafa76062d8a0bef92b5469613fa88885267"}},{"ruleId":"D1","level":"warning","message":{"text":"remodex.main (cyclomatic 30): remodex.main 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":"phodex-bridge/bin/remodex.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1e70981582cd3e0f792c7a61be810fd5b21e064cb4d6a010be92f66829376b"}},{"ruleId":"D1","level":"warning","message":{"text":"trimThreadPayloadForRelay (cyclomatic 30): trimThreadPayloadForRelay has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5105}}}],"partialFingerprints":{"codehealthFindingId/v1":"20c6882603e82ea2bbf64547a3a3ad022367baf75534c9667ff31ebb4bf2bc5f"}},{"ruleId":"D1","level":"warning","message":{"text":"projectTurn (cyclomatic 30): projectTurn has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b49da533949670a1d435ead2dd18b7031732cb40421c5a007f73ff33b3da67"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.readDescendingTurnPage (cyclomatic 30): createOpenCodeRuntime.readDescendingTurnPage has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4fd71b1c739ec43560fcdd5dcd479db26f89f772ea08595b8d9031022aa421f"}},{"ruleId":"D1","level":"warning","message":{"text":"createThreadRolloutLiveMirror.tick (cyclomatic 30): createThreadRolloutLiveMirror.tick has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e8475841ab4b0169cc73c7456c84362d0facd29f95d0ddc55a81178da98ea2d"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.extractItemID (cyclomatic 29): CodexService.extractItemID has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2722}}}],"partialFingerprints":{"codehealthFindingId/v1":"13cde794472b2972c4c35f98499c4ce04a8c1ef5e9cafcd9681cf4cf924c44d3"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexDesktopRefresher.runPendingRefresh (cyclomatic 29): CodexDesktopRefresher.runPendingRefresh has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b5e5193591fbb735f86dfcaa6c5c5059288d9d49fcd666b1e18581bd4ea18c"}},{"ruleId":"D1","level":"warning","message":{"text":"push-notification-tracker.createPushNotificationTracker.handleOutbound (cyclomatic 29): push-notification-tracker.createPushNotificationTracker.handleOutbound has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4969d16eb643b87abbdc0220fb82785ed1ccae8becd0c4eca4ce95f4440936"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.runNextQueuedFollowUp (cyclomatic 29): desktop-ipc-live-owner.createDesktopIpcLiveOwner.runNextQueuedFollowUp has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1815, 1820, 1863, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1805}}}],"partialFingerprints":{"codehealthFindingId/v1":"680a7d8cf75db1327b1711a05e5a4d447a6996ad791705e41a6f10a141879962"}},{"ruleId":"D1","level":"warning","message":{"text":"createPushNotificationTracker.handleOutbound (cyclomatic 29): createPushNotificationTracker.handleOutbound has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a536c3e608952252d5e767f333e4364f5cdd4d98e58758d59d1f80120792160"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.extractThreadID (cyclomatic 28): CodexService.extractThreadID has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3595}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eb08ddf327455f2eaa809acaf0da47639cf9d93d1f3413cbf3ea5b2f0592409"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.shouldDisableTurnPagination (cyclomatic 28): CodexService.shouldDisableTurnPagination has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTurnPaginationCompatibility.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21ef27133ce5f319cacdbab1a7d188ad98a9eba127d060d403a4adc6695fd7e"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.tryServeDesktopOwnedRead (cyclomatic 28): desktop-ipc-action-follower.createDesktopIpcActionFollower.tryServeDesktopOwnedRead has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98f9fd4548bdcd5438837d94fb3268bf5f345aeb16ee561bc0ba16bfd027bab"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.tryServeDesktopOwnedRead (cyclomatic 28): createDesktopIpcActionFollower.tryServeDesktopOwnedRead has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21a72fe006e29e377dbdee351ec62d30f761a96fd3f9bb5fee075a44bfeb584"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexAutoApprovalReview.coreActionValue (cyclomatic 27): CodexAutoApprovalReview.coreActionValue has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"221a49fda1bba8783034768fd22c501bff69ab1aeff70c39bc92578fe1f6c2e8"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleLegacyCommandExecutionEvent (cyclomatic 27): CodexService.handleLegacyCommandExecutionEvent has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1995}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f14450fbe0b876b53865d05dd5df5f833b5ceb29616119421f5d4e28addd0a"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.checkMissingCatalogThreads (cyclomatic 27): CodexService.checkMissingCatalogThreads has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcad324df2364377746fc6f4d8b80b6aafbfdd5b8f4773d1a280f7681ba136f4"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.applyImmerPatchCopyOnWrite (cyclomatic 27): desktop-ipc-action-follower.applyImmerPatchCopyOnWrite has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4190}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dae2d74965f47a08a41a244af9039c0f754fbca19695c1cab5fbf9437ad3524"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.areEquivalentRelayHistoryItems (cyclomatic 27): bridge.areEquivalentRelayHistoryItems has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4482}}}],"partialFingerprints":{"codehealthFindingId/v1":"981877773ada1a9f61be1b62a79f3b288e36af68dccdc11f09b458ffbc3d4569"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.resolvedSubagentPresentation (cyclomatic 26): CodexService.resolvedSubagentPresentation has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"e678d04b4c499c2cfc0f989628a8213f5d2f66519bd5ed5bb471636c47efd7b3"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.loadMacScopedDefaultsState (cyclomatic 26): CodexService.loadMacScopedDefaultsState 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"7714c8144b65c2e3f23971a493da2a67d8864dae612b498c500fbc65f1d92a50"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexMessage.== (cyclomatic 25): CodexMessage.== has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexMessage.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd5c89117e691e0cc6aff594a60118fb9d82d0e2af47140a3b0599036c35d2b"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.extractTextDelta (cyclomatic 25): CodexService.extractTextDelta has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2744}}}],"partialFingerprints":{"codehealthFindingId/v1":"b691ceba06a97891f95d3c4b50bad12c9bb88375383e85951988ad3d5ce424db"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnComposerView.composerStack (cyclomatic 25): TurnComposerView.composerStack has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bfcbc2814f62ed9c72775c4e9fc942b1f9e15e8a751ea4b61a4e96aa4ad849"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.triggerGitAction (cyclomatic 25): TurnViewModel.triggerGitAction 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3251}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2ce62377889ffe21c5cea0dd42c67ea7afcd206bba0a3d1ded7a869d16df39"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandHumanizer.extractSearchPatternAndPath (cyclomatic 25): CommandHumanizer.extractSearchPatternAndPath 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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"a25a053eafb48ffe31614bca70183d5b6ab6e9f80940ca2929e3cb64197a3cbc"}},{"ruleId":"D1","level":"warning","message":{"text":"codex-transport.createSpawnTransport (cyclomatic 25): codex-transport.createSpawnTransport has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 110, a function literal at line 129, a function literal at line 97, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-transport.js"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"520cc93e8a4bc12a1dcbb6b019d16a70a5f0a63f5a2d8e40c8799325f0b6fabe"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.observeThreadListResponse (cyclomatic 25): desktop-ipc-action-follower.createDesktopIpcActionFollower.observeThreadListResponse has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5b229ab44d3459dd964bc0302cda80975b2ebae1adbe950c6e0873db3b9eb3"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.observeThreadListResponse (cyclomatic 25): createDesktopIpcActionFollower.observeThreadListResponse has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2edefd55b4d5e359a5db1fcde16fa8202078e157ecbcf1d65651c7c6bd9501"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.appendCompletedAgentText (cyclomatic 24): CodexService.appendCompletedAgentText has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67595547f149af2fb83eb266ae04f15ecf68007096c25b0e80839dff89700ab"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.appendSystemMessage (cyclomatic 24): CodexService.appendSystemMessage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1939}}}],"partialFingerprints":{"codehealthFindingId/v1":"26231187a9c7c780ff5254440c6561cd72017362d6141ae764d6c636b00620e7"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnDiffLineKind.detectVerifiedPatch (cyclomatic 24): TurnDiffLineKind.detectVerifiedPatch has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b6a2b35dc1fcec78f8969715474eefbea13b04b026890e19ff61396331f21b4"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.enforceIntraTurnOrder (cyclomatic 24): TurnTimelineReducer.enforceIntraTurnOrder has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"0351b36cf696e1b91e1fdcbf01603e653132237db0be0d72f57e898c253e41f0"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.anchorLateFileChangesToOwningTurn (cyclomatic 24): TurnTimelineReducer.anchorLateFileChangesToOwningTurn has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"36547bfadb0d2c426c58f01fa5d5fb77629ed6dc115dce3efd03b5f042b476d0"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.shouldMergeUserMessages (cyclomatic 24): TurnTimelineReducer.shouldMergeUserMessages has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"9330356295b351ed951dd7faf317add4ae32585478ed3d9127fae301d18fe167"}},{"ruleId":"D1","level":"warning","message":{"text":"workspace-handler.analyzePatchChunk (cyclomatic 24): workspace-handler.analyzePatchChunk has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 9 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"c14182c06c911d6ccce1c7ecaf976718b660b46afc643868bdf2b919a0979774"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-state-patches.applyPatchToBaselineNode (cyclomatic 24): desktop-ipc-state-patches.applyPatchToBaselineNode has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-state-patches.js"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"adfa6341537d56a72a29d1689741fbd79e777656cdec535dbf9f2aec66d09b63"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.fetchAdaptiveThreadTurnsListForRelay (cyclomatic 24): bridge.fetchAdaptiveThreadTurnsListForRelay has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74b8609d668d040935d87110a6159f9ce502f8e0e2182c493816e0818bb10c0"}},{"ruleId":"D1","level":"warning","message":{"text":"reasoningVariants (cyclomatic 24): reasoningVariants has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c83d8bba1f31653963537b9ff8d545f759fe6fb6d9f45f6fecf276bcdb6d31"}},{"ruleId":"D1","level":"warning","message":{"text":"createPushNotificationTracker.handleGoalUpdated (cyclomatic 24): createPushNotificationTracker.handleGoalUpdated has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"557e6715c0094a54b246268f5946ca76f657c936b279a53ea6cd41d53059c9c2"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexAsyncUserInputProjection.nativeReply (cyclomatic 23): CodexAsyncUserInputProjection.nativeReply has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e43f4738fe4b79446f6a794f5a0548f6e875f163680f9749e275db1cfe7ee8"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.extractIncomingMessageText (cyclomatic 23): CodexService.extractIncomingMessageText has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3793}}}],"partialFingerprints":{"codehealthFindingId/v1":"41e907b65e07ef2ec4ed1ae147b3c9ea6a7b12bd43596f2bf978617468e82c2f"}},{"ruleId":"D1","level":"warning","message":{"text":"SidebarActivityDiffStore.refresh (cyclomatic 23): SidebarActivityDiffStore.refresh has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/SidebarActivityDiffStore.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c5a9880735e747fdb49397142aa0524e9772957637331c4ece9b45a17a01e1"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkspaceRunestoneTheme.textColor (cyclomatic 23): WorkspaceRunestoneTheme.textColor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"284f7bdfdc20e738c8d53668ca7040caf1385609f4102f511d1a87d835777905"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineView.assistantBlockInfo (cyclomatic 23): TurnTimelineView.assistantBlockInfo has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"c25cc272802f1a5e2a5b999bb782f0504583628ae6241a4472d23cedebc0f0dc"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.normalizePart (cyclomatic 23): opencode-runtime.normalizePart has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"005bfb78a0e5017dfd945013b525c46897242c9866709300deff4b8eead09ee3"}},{"ruleId":"D1","level":"warning","message":{"text":"workspace-handler.workspaceReadImage (cyclomatic 23): workspace-handler.workspaceReadImage 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":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d4d3112e4cd59a900a6dde8fd35bce92c266cb5f96b1c3aa270e190a6346da"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-adapter.applyDeltaNotification (cyclomatic 23): desktop-ipc-conversation-adapter.applyDeltaNotification has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6b64f2311c54f738aeecea04b0c5b1c008cc49b0656e3fd2a7871303ae7caf"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.syncProjectedConversationState (cyclomatic 23): desktop-ipc-action-follower.createDesktopIpcActionFollower.syncProjectedConversationState has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eba6cf74cda6d23653d45057185cbab0c0da9b2cfe8f9538acf3059eb353b9f"}},{"ruleId":"D1","level":"warning","message":{"text":"sanitizeThreadHistoryImagesForRelay (cyclomatic 23): sanitizeThreadHistoryImagesForRelay has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3723}}}],"partialFingerprints":{"codehealthFindingId/v1":"c316309fedc2012b9e74e115fa396667d31990ef73283c24b16405640e23dbd2"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.syncProjectedConversationState (cyclomatic 23): createDesktopIpcActionFollower.syncProjectedConversationState has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to 5 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"efd53ac521d5a8af581e5f05b893e587c1befaf33323b77c4701a37a098cdbf6"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.mergedThread (cyclomatic 22): CodexService.mergedThread has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0638cb8bf2065b0f1e9c5280cf7aa6d365f740701e4124ecbf42f063a1edde2"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.decodeItemText (cyclomatic 22): CodexService.decodeItemText 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"0526a73394b723142bd9679bad2b7729496c2d8563e6efd0dac0af4aa382cf52"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.noteDesktopMirroredActivityIfNeeded (cyclomatic 22): CodexService.noteDesktopMirroredActivityIfNeeded 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"37c890effbe3d64ea831d7a1c1ba279996dbd6f9ac6108c65fb2ba9d878bf328"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleThreadStatusChanged (cyclomatic 22): CodexService.handleThreadStatusChanged has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1076}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb165968267eb79e00323cdd2e21c1d4339e254c7a36c4dfdce039c88e38a1d"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.isFileChangeSnapshotPayload (cyclomatic 22): CodexService.isFileChangeSnapshotPayload 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3259}}}],"partialFingerprints":{"codehealthFindingId/v1":"c938868eda72be54e3d80dc996c30d5dfba7fde980c46e43fbfad25df19762cf"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.pruneDuplicateSystemRows (cyclomatic 22): CodexService.pruneDuplicateSystemRows 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3399}}}],"partialFingerprints":{"codehealthFindingId/v1":"126bc3ca0f2a49a3939616dfbe5db00344c4cf91ac21b5197a00a08a1f7cfab7"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.ensureStreamingAssistantMessage (cyclomatic 22): CodexService.ensureStreamingAssistantMessage 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":6631}}}],"partialFingerprints":{"codehealthFindingId/v1":"c38e73143c83d30e62c7606ab1571696d48e5c5684c5030c12be4a4595588d11"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.continueAfterStreamFailure (cyclomatic 22): CodexService.continueAfterStreamFailure 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":"CodexMobile/CodexMobile/Services/CodexService\u002BStreamRecovery.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"30830d52fb8f44c26fbf5ef3e3a00a1ff9efc79303749403d8619a8bee8a7e2e"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.onInputChangedForSkillAutocomplete (cyclomatic 22): TurnViewModel.onInputChangedForSkillAutocomplete 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca99e9aca59b10b5487e3255e7b010dc58069ef362e8bf4feda8199e3e445ce"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.refreshSessionStatuses (cyclomatic 22): opencode-runtime.createOpenCodeRuntime.refreshSessionStatuses has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 802, 778, 787, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"767b70a7c75c3f2cf97bb20705033a64a9a74225fec2204e3787317bb63da1c0"}},{"ruleId":"D1","level":"warning","message":{"text":"git-handler.assertWorktreeHasNoBoundChats (cyclomatic 22): git-handler.assertWorktreeHasNoBoundChats has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: git-handler.handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2253}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dab722edcbde3d868831284b60562c6809c08bcc87cb8c544325985bf59060a"}},{"ruleId":"D1","level":"warning","message":{"text":"apply-patch-changes.parseApplyPatchChanges (cyclomatic 22): apply-patch-changes.parseApplyPatchChanges has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a67d3aa5b8057e355c38635f53f5841d609a9ad751328d941ef41c53a799067"}},{"ruleId":"D1","level":"warning","message":{"text":"session-jsonl-history.shouldSkipResponseItemForHistory (cyclomatic 22): session-jsonl-history.shouldSkipResponseItemForHistory has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: session-jsonl-history.readableToolActivityMessage (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a305a72942236ce91c1f818fe5a95bfce30211d4358a98b25005e1aeb7421ab"}},{"ruleId":"D1","level":"warning","message":{"text":"startBridge.rememberForwardedRequestMethod (cyclomatic 22): startBridge.rememberForwardedRequestMethod 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aafe6032ac5552eecab526fd47d43e6bb21d63382cc8f7012d82170d171adb1"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.emitNormalizedReviewOverlays (cyclomatic 22): createDesktopIpcActionFollower.emitNormalizedReviewOverlays 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2120}}}],"partialFingerprints":{"codehealthFindingId/v1":"081e156d359bc7cdd030674339df40694852a46b303da98fc978f78dde639f74"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.observeInbound (cyclomatic 22): createDesktopIpcLiveOwner.observeInbound 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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54f2b3b3d6f1f4b447f47b86fae1686adf7cae01865d875f91b5b616e36393a"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.refreshSessionStatuses (cyclomatic 22): createOpenCodeRuntime.refreshSessionStatuses has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 802, a function literal at line 778, a function literal at line 787, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"a367f3bbc7213ffea8f677eaf9ca0413afbb0459858a2ac48c642856aec9a2ba"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.handleClientResponse (cyclomatic 22): createOpenCodeRuntime.handleClientResponse has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d530d2440e6f66ea3d799c561217a994608a64ddfb6e18ccc8cee4bf90830c5"}},{"ruleId":"D1","level":"warning","message":{"text":"fileChangePatchKey (cyclomatic 22): fileChangePatchKey has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: readableToolActivityMessage (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"1299f098583098dede242d76db0982dc8a0374475807543a42687b9510794b15"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.existingMessagesForCanonicalSourceReplacement (cyclomatic 21): CodexService.existingMessagesForCanonicalSourceReplacement has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"454225c74af6575df444a805f786ce1b8ed8c036d695d53445bfd7e07b7fde53"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.fallbackUserHistoryMergeIndices (cyclomatic 21): CodexService.fallbackUserHistoryMergeIndices has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd866e7ad290d29804b77e82285eec5c609ad0157414316b65e93b06161b1d4"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.isLikelyIncomingItemPayload (cyclomatic 21): CodexService.isLikelyIncomingItemPayload has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2662}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f971fc304a1eefa7b02639c6f72e5599266c3ea381d69704245c3163307daa"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleItemStarted (cyclomatic 21): CodexService.handleItemStarted 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13fd75579266224ceccfacda13d66a47b72427b03d8211d6466c4b8059e2e76"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.mergeLateReasoningDeltaIfPossible (cyclomatic 21): CodexService.mergeLateReasoningDeltaIfPossible has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3616}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcbda21fd15693c32f186cc2194163bcd0de07bd46ccda6aa67f303045395962"}},{"ruleId":"D1","level":"warning","message":{"text":"GPTVoiceTranscriptionManager.startRecording (cyclomatic 21): GPTVoiceTranscriptionManager.startRecording 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":"CodexMobile/CodexMobile/Services/GPTVoiceTranscriptionManager.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d7ead0405cd29e8a4b7e694883dace87ccf02855f6ad212aa593972085e3b9"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamingInlineMarkupAutoCloser.scanInlineMarkers (cyclomatic 21): StreamingInlineMarkupAutoCloser.scanInlineMarkers 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":"CodexMobile/CodexMobile/Views/Turn/Messages/StreamingInlineMarkupAutoCloser.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"e927a4740cc2f7ca5f1e55fe20b961538ef46be7ae2a402a865ce00b660eedeb"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.fileChangeMessage (cyclomatic 21): TurnTimelineReducer.fileChangeMessage has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a316eeb7752322abf190c58ae188bc7bb31966a77b1fbadb50ccd1aa15fc6fc"}},{"ruleId":"D1","level":"warning","message":{"text":"push-notification-tracker.createPushNotificationTracker.handleGoalUpdated (cyclomatic 21): push-notification-tracker.createPushNotificationTracker.handleGoalUpdated has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6c0d311627dba41e4dde05d45acb6ed9dbaf63a367eca658fe7433abcdef5ec"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.normalizedLiveIndexNeedsRebuild (cyclomatic 21): desktop-ipc-action-follower.normalizedLiveIndexNeedsRebuild 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3490}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ae13d5d2c17bd7fe15b89dabebaddbc7a163d61ae93b32a879e34e5411fa81"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeInbound (cyclomatic 21): desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeInbound 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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bfe15b2e41b42e1da4facbb5facd8d123f8cbaf146e98d4deac9ebe90ef5402"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.startBridge.rememberForwardedRequestMethod (cyclomatic 21): bridge.startBridge.rememberForwardedRequestMethod 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca9845f8aa9fb57286fcafdfb48b0b83513c491f5140ce6791c7f3a1139981e6"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.startBridge.sanitizeRelayBoundCodexMessage (cyclomatic 21): bridge.startBridge.sanitizeRelayBoundCodexMessage has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bccc8726e0f4814f8760c11f09653a1e214bb16bb3e327d777b50b9d91a8283"}},{"ruleId":"D1","level":"warning","message":{"text":"startBridge.sanitizeRelayBoundCodexMessage (cyclomatic 21): startBridge.sanitizeRelayBoundCodexMessage has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b511b88af2ae2b22ad72deb9121423fc86f752d3bcf7d6ce9f77be798863278"}},{"ruleId":"D1","level":"warning","message":{"text":"handleDesktopMethod (cyclomatic 21): handleDesktopMethod has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"519dac25b47e5e3a96fce93816bdd65100368fada04497f8f90849e72be90c51"}},{"ruleId":"D1","level":"warning","message":{"text":"buildConversationTurn (cyclomatic 21): buildConversationTurn has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7e6a6a400221265cf50cfabac5a95edb927c88523809fa575cf8050b0cbeed"}},{"ruleId":"D1","level":"warning","message":{"text":"createPushNotificationServiceClient.postJSON (cyclomatic 21): createPushNotificationServiceClient.postJSON 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":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d5fc6a6acb43aeea9ef362acb61924313271cd80aa75c07a7dd095812c4136"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexAutoApprovalReview.coreFileSystemPermissions (cyclomatic 20): CodexAutoApprovalReview.coreFileSystemPermissions has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe837b19483216cd6ba97ee3f807e1de134f7e54fcf7d67ca33c8aae4179c2ce"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.deliverAsyncUserInput (cyclomatic 20): CodexService.deliverAsyncUserInput has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4b1e01dacc7a8514232892ee28561f3e376f0ee5178094c4f4537b01131d84"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.catchUpRunningThreadIfNeeded (cyclomatic 20): CodexService.catchUpRunningThreadIfNeeded 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":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"fccb5624abec2297e4ad250c281ec9afb1835a765ef53aafa1c7f2b5b3c57679"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.classifyVoiceFailureMessage (cyclomatic 20): CodexService.classifyVoiceFailureMessage 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":"CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f751b942744180a70fe81cd0d762d375231a76a456251aa1d26c6b4afb4ab1"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentViewModel.connectWithAutoRecovery (cyclomatic 20): ContentViewModel.connectWithAutoRecovery has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a615561c60e2cfb50ab769dece08a2afd9b763aef5adb87fc735c8b73d525ee"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.onInputChangedForPluginAutocomplete (cyclomatic 20): TurnViewModel.onInputChangedForPluginAutocomplete has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b178fa964f3c5ca4de4887fb78c6bdbfc13c2e66badbdab704c2f8b0804b38b"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandHumanizer.gitInfo (cyclomatic 20): CommandHumanizer.gitInfo has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"e187755cc547e79d7331a81db3e93532a0c2c7591dc909a8c8969a6d3f17a61b"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.hasInterleavedAssistantActivityFlow (cyclomatic 20): TurnTimelineReducer.hasInterleavedAssistantActivityFlow has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb2a98fab15f28fe453cdfadf2c068da026db992d3f963b25d6671b7cd33e63"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.mergedUserMessage (cyclomatic 20): TurnTimelineReducer.mergedUserMessage 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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"233a0534a0f1812507579765ed89c44aee130d190c604ca3b5117ef00f7e256d"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineReducer.removeDuplicateAssistantMessages (cyclomatic 20): TurnTimelineReducer.removeDuplicateAssistantMessages has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"f175679e34c43be3b48d86a0c639f4840f9fc84d5e117ff6431ac281c47c9b5e"}},{"ruleId":"D1","level":"warning","message":{"text":"push-notification-service-client.createPushNotificationServiceClient.postJSON (cyclomatic 20): push-notification-service-client.createPushNotificationServiceClient.postJSON has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"b123f5f9df017ab3042d128b567efe69968e4907be688a9d476bca67894cb900"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.emitNormalizedReviewOverlays (cyclomatic 20): desktop-ipc-action-follower.createDesktopIpcActionFollower.emitNormalizedReviewOverlays has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2120}}}],"partialFingerprints":{"codehealthFindingId/v1":"66be87126e1ebee4aa4f34f68e22e35ee096a0bf5bb4f6f5abdb4617ad1bcead"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.applyConversationStateChange (cyclomatic 20): desktop-ipc-action-follower.applyConversationStateChange has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3318}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6737def27b1aec2eefcaf068365e70a21aaf9db1ac8b662dcd21c1e456626f"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.sanitizeRelayHistoryTurn (cyclomatic 20): bridge.sanitizeRelayHistoryTurn has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4670, 4696). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4661}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebdd1195d37e666af5da7d69830583622703fce278f22d8a5b83db6870c236ef"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.tryBootstrapDesktopResume (cyclomatic 20): createDesktopIpcActionFollower.tryBootstrapDesktopResume has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 8 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1409}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e150339ffa2f1bf2385e5c804087350dd1cbaec1cda69ceaea1c4df4ff829a9"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.broadcastConversationState (cyclomatic 20): createDesktopIpcLiveOwner.broadcastConversationState has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"a394953ca475875e7a9e07ced8a2354466da52582a0f8af274eb0e15ae507b47"}},{"ruleId":"D1","level":"warning","message":{"text":"reduceItemLifecycle (cyclomatic 20): reduceItemLifecycle has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"acdb86114c9ba3e67b986cf4458841d0900709f71465f8e368a3516253bf21b2"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.scheduleSidebarPrewarmIfNeeded (cyclomatic 19): ContentView.scheduleSidebarPrewarmIfNeeded 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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1497}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a8720e9755d10fb2eee0e60984522f579d6d0045ecc52ce29108d2aac28b83"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexAsyncUserInputProjection.reopenRepliesMissingFromCanonicalHistory (cyclomatic 19): CodexAsyncUserInputProjection.reopenRepliesMissingFromCanonicalHistory 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":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5814214d6243e1077a20d47c62c86b9778c831472297088c50484c3c55f4f5f"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.decodeHistoryBaseDate (cyclomatic 19): CodexService.decodeHistoryBaseDate 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ff59ecddc7ee4f91e43f6e676e503c749d5e3f1876dcfeaa41bd0711892b82f"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.migrateMacScopedState (cyclomatic 19): CodexService.migrateMacScopedState 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"63dcefd680b7919a92f5bc05e08bfb2e1689a737df11085d8f069da041251f37"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.applyLateTerminalAssistantDelta (cyclomatic 19): CodexService.applyLateTerminalAssistantDelta 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3950}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a8bd3a6756b94ed46af4dc29ffb5e4bfb23576e965222d5de7600a3862142d"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.syncManagedPushRegistrationIfNeeded (cyclomatic 19): CodexService.syncManagedPushRegistrationIfNeeded 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":"CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ff4a63431e6c2af2143d418a4309690d879e2269e6a5412db0615f2ecaf993"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.performSecureHandshake (cyclomatic 19): CodexService.performSecureHandshake 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":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"df3b1fbfe192c2f6bc03b2cd4e581623134bf74b5ae94e7960651989368c42dd"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentViewModel.attemptAutoReconnectOnForegroundIfNeeded (cyclomatic 19): ContentViewModel.attemptAutoReconnectOnForegroundIfNeeded 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":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a394a5bbf85da83ae5dbc46e13a590fd146830f6666002107858f44ba4168c0"}},{"ruleId":"D1","level":"warning","message":{"text":"NewChatDraftView.body (cyclomatic 19): NewChatDraftView.body 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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1963c5eb23b8b173b4c4d82121cb69222478176ead81dd45c4ecab3072dcf9f6"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.canRestoreSavedLocalDraft (cyclomatic 19): TurnViewModel.canRestoreSavedLocalDraft 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6540f97c41df23bb46164243b4c7bde4bbc9e6833f5b76dbde401771b22e821"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.steerQueuedDraft (cyclomatic 19): TurnViewModel.steerQueuedDraft 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2019}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d6125079cd5ac234de15795d292693aed4095317127cd1268bee866baf6679"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandHumanizer.humanize (cyclomatic 19): CommandHumanizer.humanize 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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ada8f555d9a85ac259e9c998f9e176c6b3af32bdf40848ad8137dfe7798a4dd"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnTimelineView.scheduleProgressiveTailRevealIfNeeded (cyclomatic 19): TurnTimelineView.scheduleProgressiveTailRevealIfNeeded 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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":965}}}],"partialFingerprints":{"codehealthFindingId/v1":"650fb2bd330405a981bb751156c9b599ec082790c8fc31dc57ced2d066f9000d"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.partsFromInput (cyclomatic 19): opencode-runtime.partsFromInput 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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5003493817d5787d0e77c738f1dc141df775e88a4e6fa31f650d2e20bd853d39"}},{"ruleId":"D1","level":"warning","message":{"text":"account-status.composeAccountStatus (cyclomatic 19): account-status.composeAccountStatus 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":"phodex-bridge/src/account-status.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"eee5120406398d541dcfece4b99da8c3d19f7ae952a6e34afecedfe6b7f0a443"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.broadcastConversationState (cyclomatic 19): desktop-ipc-live-owner.createDesktopIpcLiveOwner.broadcastConversationState has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-live-owner.createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"09564ccde2f9e5c8177fe43a469cc495f9bc72965af9a8e59fca57902ba922ab"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.shouldMergeLatestJsonlTurn (cyclomatic 19): bridge.shouldMergeLatestJsonlTurn has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c932f6056ad4e4743d8c0ea205b73c1e0f6a09077ac3aab5d41c5c20c631afab"}},{"ruleId":"D1","level":"warning","message":{"text":"maybeMergeLatestJsonlTurnIntoTurnsListResponse (cyclomatic 19): maybeMergeLatestJsonlTurnIntoTurnsListResponse has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3214}}}],"partialFingerprints":{"codehealthFindingId/v1":"b151e8014274abac06f98d93a18c9fa283c4f811b16f10b0fcc5cd004ee9aa77"}},{"ruleId":"D1","level":"warning","message":{"text":"normalizeThreadGoal (cyclomatic 19): normalizeThreadGoal 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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1415}}}],"partialFingerprints":{"codehealthFindingId/v1":"14012fb12bf1434dd3e690cbeb1ef7f9b14f69af4b07cb00353d37f148d24c57"}},{"ruleId":"D1","level":"warning","message":{"text":"normalizeProjectedThreadGoal (cyclomatic 19): normalizeProjectedThreadGoal has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d0403cb94b4b8cdc0ce0baad3d4b4cf9c7c0d6e56635d4e91eedb2311499cb4"}},{"ruleId":"D1","level":"warning","message":{"text":"gitCreatePullRequest (cyclomatic 19): gitCreatePullRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file\u0027s highest cyclomatic complexity: handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"8084d1c6b4fc20eebe4978445fce9ed6b1fe776fd0aa6796e74bca1b7c600b64"}},{"ruleId":"D1","level":"warning","message":{"text":"searchDirectoryEntries (cyclomatic 19): searchDirectoryEntries 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":"phodex-bridge/src/project-handler.js"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d00429400d453f7af106aedfb768f367ddf4e136b093a869be29c24d3c5a8ef"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexAsyncUserInputProjection.reconcile (cyclomatic 18): CodexAsyncUserInputProjection.reconcile 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":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fdf3b968c79dfe706d9501f809a6694917785a00457843b4125acf9a8bbdfba"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.init (cyclomatic 18): CodexService.init has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a5e1cf3fc02ee80d17019a650da7661f5a382dfebf4a705f385ea3221ddcce"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.incompatibleBridgeAppVersionError (cyclomatic 18): CodexService.incompatibleBridgeAppVersionError has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f621479a25551fe20c5d2afe1419be403663e4fefb2bd52d2447eaff260bcb"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.preparePlanItemIdentityForUpsert (cyclomatic 18): CodexService.preparePlanItemIdentityForUpsert has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2117}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bdc0a73dabb5cfeac33da4e6560a31a24aed8149486bc6bcfe2a3e48cc2706"}},{"ruleId":"D1","level":"warning","message":{"text":"RemodexTerminalSnapshot.applyTerminalEvent (cyclomatic 18): RemodexTerminalSnapshot.applyTerminalEvent has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Terminal/RemodexTerminalModels.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"1472247dcf036b2a23d698ea69b05bd3834569b743135def245bfc992a388971"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnComposerInputTextView.updateUIView (cyclomatic 18): TurnComposerInputTextView.updateUIView has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9318b59344e76488363eb28c18da958ec0b0b743bf778615ff3cdc847278cb6"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnView.composerWithSubagentAccessory (cyclomatic 18): TurnView.composerWithSubagentAccessory has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3b6d48a9e569c6d907f306318a50a940362e1c52f5d05bb2510afce07e7737"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.rememberMessageInfo (cyclomatic 18): opencode-runtime.createOpenCodeRuntime.rememberMessageInfo has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"938fda89603a6e0ea573e509859a134bb968dac3bce7ca502c54d8943574a2cb"}},{"ruleId":"D1","level":"warning","message":{"text":"git-handler.createWorktreeAtManagedPath (cyclomatic 18): git-handler.createWorktreeAtManagedPath has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: git-handler.handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c237949297c6db4896c5de448582c4e0c627a60f0afb35731d10b58cba78e23"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides (cyclomatic 18): desktop-ipc-live-owner.createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-live-owner.createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8d6045e5713d8b965f5b345f871964274f507aa273a0caa2323feb624f495d"}},{"ruleId":"D1","level":"warning","message":{"text":"session-jsonl-history.readRecentSessionJsonlTurns (cyclomatic 18): session-jsonl-history.readRecentSessionJsonlTurns has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: session-jsonl-history.readableToolActivityMessage (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab899068a3d7d5a1acdafc60eae3c951b8ffa726e577a6282bd15686cb139fe"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest (cyclomatic 18): bridge.createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"d20ccfdf5c7e16c0a195add62d0101edc3a6bfd7b0608686384b354538cc8b4c"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.startBridge.maybeBuildJsonlThreadTurnsListFallback (cyclomatic 18): bridge.startBridge.maybeBuildJsonlThreadTurnsListFallback has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57a16533e76b31fa86e268721b0847cc74032c5ec33ca82b22f93fc1896dc16"}},{"ruleId":"D1","level":"warning","message":{"text":"createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest (cyclomatic 18): createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"25c8a128b2bbcecb2bed7889cf35d03e3fbadfdb427f0ea16923ba4dd2cc4d82"}},{"ruleId":"D1","level":"warning","message":{"text":"startBridge.maybeBuildJsonlThreadTurnsListFallback (cyclomatic 18): startBridge.maybeBuildJsonlThreadTurnsListFallback has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5544ee36fa8311a1ba6689d64968a6e420418f4d88a6f67ca098d2a1ab0aeb5"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides (cyclomatic 18): createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"e807ce9fd8fc423b21aad47ba5f8df5c44d7473bb76f5eec5b9f315e1c422dec"}},{"ruleId":"D1","level":"warning","message":{"text":"gitTransferManagedHandoff (cyclomatic 18): gitTransferManagedHandoff has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac88e1ca071c80e1e2c5f053fc62ac506dd744f00896df0c698740fd89c3f06"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.rememberMessageInfo (cyclomatic 18): createOpenCodeRuntime.rememberMessageInfo has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"a219ae2c3837213f70e820ef47141a6c59c29e79cdb9cbd40f9aa23980688143"}},{"ruleId":"D1","level":"warning","message":{"text":"reduceTurnStarted (cyclomatic 18): reduceTurnStarted has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e7cfff3c5e1703e88f12e98f46e13297b252bf0658c0ee880e836c92689258"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.receiveErrorDisposition (cyclomatic 17): CodexService.receiveErrorDisposition 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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"8772dcd937769478b4fab961d1f8afa3de15c22fc05b60e405a2016bae9d52d9"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart (cyclomatic 17): CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CodexService.existingMessagesForCanonicalSourceReplacement) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"88602b6e5795cc3e462046e0d007188a6402b4efce4a0e7fc40d4dce82111742"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.uniqueAssistantHistoryTextMergeIndex (cyclomatic 17): CodexService.uniqueAssistantHistoryTextMergeIndex 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2750}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fe13f2e015344ba766a1ec87c59791868852fe48be7caec8f6962a310413cd"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.unwrapHistoryShellCommandIfPresent (cyclomatic 17): CodexService.unwrapHistoryShellCommandIfPresent 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3975}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9acc28174c7dabe297d1ba5806ec1f4d81f5c1e5187677270711470847a0f4"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.appendReasoningDelta (cyclomatic 17): CodexService.appendReasoningDelta 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"bee161ab5388b5c7a0d46b1b8c9f4930faf51f60f45ef80ca3996b8e48239d19"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.performPrepareThreadForDisplay (cyclomatic 17): CodexService.performPrepareThreadForDisplay 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"79916bbd6895abc439b0c398358ba28dee506f594a71832358a777b32a5e00ec"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.makeTurnInputPayload (cyclomatic 17): CodexService.makeTurnInputPayload 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2365}}}],"partialFingerprints":{"codehealthFindingId/v1":"d118c0907ecce6c5a5c91b85ae35e09bbc1aae9d41f81b327bf3ab312af0e1b5"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.startWebSocketKeepAliveLoop (cyclomatic 17): CodexService.startWebSocketKeepAliveLoop 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":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3dd00ac52a7d5631b53a8c389064d55e951fd16115dbc7f7d8ad2a03cb9fe3"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.validateVoiceWAVData (cyclomatic 17): CodexService.validateVoiceWAVData 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":"CodexMobile/CodexMobile/Services/CodexService\u002BVoice.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"add27fdce91693e8232c611951b1cd6f785046ae46ab36157efec23c929e9882"}},{"ruleId":"D1","level":"warning","message":{"text":"RemodexNativeSSHTerminal.open (cyclomatic 17): RemodexNativeSSHTerminal.open 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":"CodexMobile/CodexMobile/Services/Terminal/RemodexNativeSSHTerminal.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f12a70f0c9b0ff72f2f44702b2f1307364d9ed6a4a23f6390b824d61463925e"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentViewModel.switchToTrustedMac (cyclomatic 17): ContentViewModel.switchToTrustedMac 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":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad73bb461e8d3ae6464d71764ed9588890c42e392cfd7c95c5eebf5bf5669df"}},{"ruleId":"D1","level":"warning","message":{"text":"UnifiedDiffParser.parse (cyclomatic 17): UnifiedDiffParser.parse has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80b8d1111d5aefb4a54272facb5cd06a7d0ddfae91e20aeaf87c142f6402a4a"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnGitBranchPickerSheet.body (cyclomatic 17): TurnGitBranchPickerSheet.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Git/TurnGitBranchSelector.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24722dd8f29bad49e46286f29713a7ea53e4d4a8031f02b6f0c5779748cad4a"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamingInlineMarkupAutoCloser.autoClosed (cyclomatic 17): StreamingInlineMarkupAutoCloser.autoClosed 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":"CodexMobile/CodexMobile/Views/Turn/Messages/StreamingInlineMarkupAutoCloser.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"988fa0007668223856f8be794a3e770b3cec1941fa79b71c6a194c785de23233"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRowRenderModelCache.buildModel (cyclomatic 17): MessageRowRenderModelCache.buildModel 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":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb71aba1bf2590b5705a5967e3b1a6275df7a6d4f3534c2b33c6ee91dfcd887b"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService\u002BIncomingSupport.swift.unwrapShellCommandIfPresent (cyclomatic 17): CodexService\u002BIncomingSupport.swift.unwrapShellCommandIfPresent 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1918cdcbc32284af64d026611334cd4b8cc4940d422273c3422f2fbc4b78ec2"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-watch.findRecentRolloutFileForContextRead (cyclomatic 17): rollout-watch.findRecentRolloutFileForContextRead 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":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1dd0480cabfee04f841c628ffb099992d2ef05e26365852ee2ec6c1266eca03"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-handler.openThreadOnDesktop (cyclomatic 17): desktop-handler.openThreadOnDesktop has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: 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":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ead987448a87201607b1d42f9f5c7bcfd0ed06480b57ed16f171a5bc3d45cdb"}},{"ruleId":"D1","level":"warning","message":{"text":"secure-transport.createBridgeSecureTransport.handleClientHello (cyclomatic 17): secure-transport.createBridgeSecureTransport.handleClientHello 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":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3145d2e88213f134ab4c499c0d15f0511edc92914f143fa27bde200873f1473"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.toolOutputNotifications (cyclomatic 17): rollout-live-mirror.toolOutputNotifications has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"0696caeaf10016370dc36bbfaef8cf3a26a323aeca253b12bb63bd87cf18361a"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffItem (cyclomatic 17): desktop-ipc-conversation-projector.diffItem has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-conversation-projector.isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ca646d7df2a29b14e3ea10d521a90a8c8e1a493776543923da119651c48cfbc"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.negotiateResumeOwnership (cyclomatic 17): desktop-ipc-action-follower.createDesktopIpcActionFollower.negotiateResumeOwnership 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41fb3bfca079beb0e107ee463e3e81f36f0caea6656d278be1db3f07fac4a1d"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.tryBootstrapDesktopResume (cyclomatic 17): desktop-ipc-action-follower.createDesktopIpcActionFollower.tryBootstrapDesktopResume has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d143fff54845c285ef5aa92d6bf10f93b2b69e1653f9975926af6046ad31f7e6"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.buildDesktopFollowerRoute (cyclomatic 17): desktop-ipc-action-follower.createDesktopIpcActionFollower.buildDesktopFollowerRoute 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2364}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fdca699e93842927c9091c7b37fb8799b76dde33780df8291dfb15d2fabef1"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.normalizeTurnStartForCodex (cyclomatic 17): bridge.normalizeTurnStartForCodex 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":2860}}}],"partialFingerprints":{"codehealthFindingId/v1":"07eb38598086042433f77b62eb28a17125589f1a65cdcca129f87ddd1496317a"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.reconcileLegacyHomeThreadProject (cyclomatic 17): bridge.reconcileLegacyHomeThreadProject 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":3851}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1dd5b9fd61ee0c95bc3b018803bb0528d0abc3bfd5c61c56a5b08b2954171b"}},{"ruleId":"D1","level":"warning","message":{"text":"bridge.augmentRelayHistoryTurnsWithJsonlArtifacts (cyclomatic 17): bridge.augmentRelayHistoryTurnsWithJsonlArtifacts has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4000, 3986). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3978}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc991e833b05cf9a64fac1f19d6ba160c2adbe6a68ac721cb003f720a1c7f605"}},{"ruleId":"D1","level":"warning","message":{"text":"relay.resolveTrustedMacSession (cyclomatic 17): relay.resolveTrustedMacSession 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":"relay/relay.js"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25dcf967023507da4dc66e24f6e3c7be833aff1c566a63c452e533856e7bf16"}},{"ruleId":"D1","level":"warning","message":{"text":"server.handleHTTPRequest (cyclomatic 17): server.handleHTTPRequest 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":"relay/server.js"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"385c55e2459b6e4db01daf66cc96b72fa78f7d7c127f262d564e1ca6cc778e4c"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.negotiateResumeOwnership (cyclomatic 17): createDesktopIpcActionFollower.negotiateResumeOwnership 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"74a9601763d5968ab0e58ce3abcc9ebc0084ce5eaec0ba69e84bf2d1be9f59c3"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.buildDesktopFollowerRoute (cyclomatic 17): createDesktopIpcActionFollower.buildDesktopFollowerRoute 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2364}}}],"partialFingerprints":{"codehealthFindingId/v1":"3090acf2a2cd9b636696b9af97763e4cfd5910f41a747c565ad12d07d5ccb575"}},{"ruleId":"D1","level":"warning","message":{"text":"createBridgeSecureTransport.handleClientHello (cyclomatic 17): createBridgeSecureTransport.handleClientHello 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":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d267b1b5beee74c220dd41c81a49b596136363851397b19b4b277fa83e60e94"}},{"ruleId":"D1","level":"warning","message":{"text":"reduceTurnCompleted (cyclomatic 17): reduceTurnCompleted 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":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6beceb7128f0b3735bb4d4a5b77c9ca25461ca1ca45e53ec2a1a17fcc4a064"}},{"ruleId":"D1","level":"warning","message":{"text":"requestTranscription (cyclomatic 17): requestTranscription has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3f72650cb337fa3b3373f0ea5823afa80b735c00672fd0443e96da818c6575"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.mainContent (cyclomatic 16): ContentView.mainContent 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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d51747b2fb1496c2bd6af82bc4e1dedf5ca86ae793de45a741ad2a66a2216dc"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.decodeBridgeGPTAccountSnapshot (cyclomatic 16): CodexService.decodeBridgeGPTAccountSnapshot has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b23c58e2a49a2c7d66ee206e06dcb17844e656d434bf9a0821be67b00d03ed"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.flushPendingRuntimeOptionRefreshIfPossible (cyclomatic 16): CodexService.flushPendingRuntimeOptionRefreshIfPossible 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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2833769695038a6151e4e42e5fe7d94f9944432d955831b3360d80be67ebc28"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.upsertSubagentIdentity (cyclomatic 16): CodexService.upsertSubagentIdentity 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c57c263400ef0462549f8e2f2a447c05bb9e345a0ebb4eb3ec459237e13e27a"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.canonicalizeUniqueProvisionalTurnMappings (cyclomatic 16): CodexService.canonicalizeUniqueProvisionalTurnMappings has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"218bcd45266d0e57fdb37ef864d68b5ad7b9bdefcdfe47c28bc849ca2edd498c"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.mergeStreamingSnapshotText (cyclomatic 16): CodexService.mergeStreamingSnapshotText 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2860}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6086b4ffaa15771e1ca4e127d5420add86a43ad5df29d760c0ccf0bbc9d9af"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleErrorNotification (cyclomatic 16): CodexService.handleErrorNotification 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"46831618b65ea83787b3141313ff4e81c3ff503b46e25852f99d56b6b82027e5"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.extractTurnID (cyclomatic 16): CodexService.extractTurnID 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3631}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d62e8d7e15c400d6a8eb41c6559595c18877d49128225f5d1852ea2443ed51"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.generatedImageMergeTarget (cyclomatic 16): CodexService.generatedImageMergeTarget has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4681}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a8d68663fc2d0e78e1952d12f5f8c93496733584efb7c30d0a0861840c9a2c"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.absorbAssistantBlockReplayCompletion (cyclomatic 16): CodexService.absorbAssistantBlockReplayCompletion 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4864}}}],"partialFingerprints":{"codehealthFindingId/v1":"f17e3a1d18d1205d15aa2a99aa90233d15241d4221e5d0dadb9c6b1f382e7c91"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.imagePreviewAssistantCompletionIndex (cyclomatic 16): CodexService.imagePreviewAssistantCompletionIndex has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5014}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2e17e48cb1a091340a569850507428dda10e310e728e1829083e96e87de9fa"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.sendRequestWithApprovalPolicyFallback (cyclomatic 16): CodexService.sendRequestWithApprovalPolicyFallback 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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3558b5cf8e23113929c644bad6cff00cdc636dab3a385468aac0ddace7ff90"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.normalizeRuntimeSelectionsAfterModelsUpdate (cyclomatic 16): CodexService.normalizeRuntimeSelectionsAfterModelsUpdate 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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"60db31d2c4e02fab1cc3521038cd6cb3757d99aee282c31b85f07fb2889ea717"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.startSyncLoop (cyclomatic 16): CodexService.startSyncLoop 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":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ff364f8f86063068f39b12b584180bb07b1009d1a65c2fbf21b6faff0affe1"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.handleThreadForkResponse (cyclomatic 16): CodexService.handleThreadForkResponse 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd47e087cc79f0fbe7c67a387a765038b5032f41c1890c48cd482d3ad5942ce"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexService.shouldTreatAsUnsupportedVoiceBridgeMethod (cyclomatic 16): CodexService.shouldTreatAsUnsupportedVoiceBridgeMethod has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"e86943a05449299fd918edeb03191f61e508577cf5673c559785915bce1ad11c"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnViewModel.trailingFileToken (cyclomatic 16): TurnViewModel.trailingFileToken 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2532}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f80ca7343b2fe54fc4b3651cef012f838340601a0f8840a3bd8692244db3f9"}},{"ruleId":"D1","level":"warning","message":{"text":"UnifiedDiffParser.isMetadataLine (cyclomatic 16): UnifiedDiffParser.isMetadataLine has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6748667a7c88d810a47ed509ecc35b5eb8266a5026c277c5e68e66b09d018a9"}},{"ruleId":"D1","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.handleClientResponse (cyclomatic 16): opencode-runtime.createOpenCodeRuntime.handleClientResponse has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"993f64f8667d77974178e5e2f840fca05125101e4ea2faba1afb2211df2707d9"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-shared.sanitizeUserRoleItem (cyclomatic 16): desktop-ipc-shared.sanitizeUserRoleItem has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30d3ed28d19f7a26c407c3680d6e4977ca5beb7a584b317a77b027913968c05"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-shared.createFrameReader.push (cyclomatic 16): desktop-ipc-shared.createFrameReader.push 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":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4fa618efdd0bae3438d9be83d720d0cb3b8c84f1128f771320f12555552663"}},{"ruleId":"D1","level":"warning","message":{"text":"rollout-live-mirror.toolStartNotifications (cyclomatic 16): rollout-live-mirror.toolStartNotifications has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ae157932b72944d429c257a792a34a7003d7435a8f03c5752eb806d94c2493"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-projector.createDesktopConversationProjector.project (cyclomatic 16): desktop-ipc-conversation-projector.createDesktopConversationProjector.project has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-conversation-projector.isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"333f0a86880ba28018580c58717c3c10d981d581e021aa48e26f400ba8ce6f60"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffTurnLifecycle (cyclomatic 16): desktop-ipc-conversation-projector.diffTurnLifecycle has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-conversation-projector.isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f75e348e4b07551087ec5c64a0146aa400e6d31839e42ef156722b074772ae6"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffTurnItems (cyclomatic 16): desktop-ipc-conversation-projector.diffTurnItems has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-conversation-projector.isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"764232ce796df13d2a534e747fce5f2869770dde2333228d106c1b897f745219"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-conversation-projector.matchDesktopTurnIdentityContinuities (cyclomatic 16): desktop-ipc-conversation-projector.matchDesktopTurnIdentityContinuities has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (applyMaximumMatchesForScore::tryAssign, applyMaximumMatchesForScore, a function literal at line 906, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-conversation-projector.isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"43382bbdfb46375172db9e4eb810383ed49910a052173a2567280b535b88e1ca"}},{"ruleId":"D1","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.handlePeerBroadcast (cyclomatic 16): desktop-ipc-live-owner.createDesktopIpcLiveOwner.handlePeerBroadcast has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: desktop-ipc-live-owner.createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf4582126ecc5a98db04b4c2de6ef5cee338b69e28e244da46dda0d1c75f21f"}},{"ruleId":"D1","level":"warning","message":{"text":"thread-row-enrichment.forEachThreadRowInResponse (cyclomatic 16): thread-row-enrichment.forEachThreadRowInResponse 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":"phodex-bridge/src/thread-row-enrichment.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4448c7ae99721a8f2162fc06e47725c6b7ad602d77907720a95ba0245fdd1db"}},{"ruleId":"D1","level":"warning","message":{"text":"session-jsonl-history.normalizeReadableToolItemForHistory (cyclomatic 16): session-jsonl-history.normalizeReadableToolItemForHistory has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: session-jsonl-history.readableToolActivityMessage (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9651737318bc885ba52f5e25b398b0f67f43ef7ef4a21506e094c104a003a2d"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus (cyclomatic 16): createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc1c4f93025b6a9b6c742efc6fac58f59909723e1172b5872696301f565825d"}},{"ruleId":"D1","level":"warning","message":{"text":"desktopFollowerPayloadForResponse (cyclomatic 16): desktopFollowerPayloadForResponse 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3135}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb94624278906c8c6362723ae101bfdda1ea58ff7323be122aa9f919f311482"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopConversationProjector.project (cyclomatic 16): createDesktopConversationProjector.project has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"59bbebfee30b85d9ff6d9b85a2d7fd3752ab6f9de58917d3d09acd658b468c7f"}},{"ruleId":"D1","level":"warning","message":{"text":"projectAutoApprovalReviewItem (cyclomatic 16): projectAutoApprovalReviewItem has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isSupportedItemType (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b2e69f2d89dbbc5186ed892f502811682467491f6314b1e2e3157487e5b49d"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.markThreadReadByPhone (cyclomatic 16): createDesktopIpcLiveOwner.markThreadReadByPhone has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"170f620202d69c233c5a7c768c963847fc578f544e1b3f2b3fa476adb537f113"}},{"ruleId":"D1","level":"warning","message":{"text":"createDesktopIpcLiveOwner.handlePeerBroadcast (cyclomatic 16): createDesktopIpcLiveOwner.handlePeerBroadcast has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: createDesktopIpcLiveOwner.handleFollowerRequest (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afe5eb71fd8c69d6fd4b3e1751aeb9cfcaaf47f42ce739e30abd6b2d82d7fe5"}},{"ruleId":"D1","level":"warning","message":{"text":"createFrameReader.push (cyclomatic 16): createFrameReader.push 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":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"5db7bc52102e410f08bb40650dab5b35f5c68b8de5d1f33839b2258bea012e76"}},{"ruleId":"D1","level":"warning","message":{"text":"gitBranches (cyclomatic 16): gitBranches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"67639b0c4a8a2f48aa14b65da7ceafff5830162d4a6e2e4cf50da1fe7867ee3d"}},{"ruleId":"D1","level":"warning","message":{"text":"gitRemoveWorktree (cyclomatic 16): gitRemoveWorktree has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: handleGitMethod (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"2522ebb3dcde11d3593d4e533a3a245f7ffe9a456aec66b9817835f6c68296f7"}},{"ruleId":"D1","level":"warning","message":{"text":"createOpenCodeRuntime.emitPartDelta (cyclomatic 16): createOpenCodeRuntime.emitPartDelta has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"213cd9a16b6536cab0c4ff29ebd5411063855fac37d93f586e56022106629f40"}},{"ruleId":"D1","level":"warning","message":{"text":"contextUsageFromTokenCountPayload (cyclomatic 16): contextUsageFromTokenCountPayload has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"113f93a7945b6afa1edb949fe4794ac20e6eb99d7b53ba083959bf66d4caec49"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.mergeHistoryMessages (cognitive 229): CodexService.mergeHistoryMessages has cognitive complexity 229 (threshold 15). Drivers by points: boolean chains 119, if/else 46 (107 pts), loops 2 (3 pts) (nesting depth added 62). Of this number, 227 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"141a7a9faa8d62b460310a9f08c89fca300680a8605b2aeb313bda4363a554ee"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.upsertStreamingSystemItemMessage (cognitive 193): CodexService.upsertStreamingSystemItemMessage has cognitive complexity 193 (threshold 15). Drivers by points: if/else 56 (112 pts), boolean chains 73, loops 1 (5 pts), ternaries 3 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2692}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a94425429cbe2b6487a50a8fc8dca1b16eaec920234c239b17cc0503c69c786"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.loadThreadHistoryIfNeeded (cognitive 181): CodexService.loadThreadHistoryIfNeeded has cognitive complexity 181 (threshold 15). Drivers by points: if/else 61 (125 pts), boolean chains 44, error handling 3 (8 pts), ternaries 3 (4 pts) (nesting depth added 70). Of this number, 179 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db49ef05229b5f65987a7e9254047502ff2fffd24fc4923b8461519bc1c56b1"}},{"ruleId":"D2","level":"warning","message":{"text":"parseSessionJsonlTurns (cognitive 155): parseSessionJsonlTurns has cognitive complexity 155 (threshold 15). Drivers by points: if/else 31 (108 pts), boolean chains 23, ternaries 4 (17 pts), loops 2 (4 pts), error handling 1 (2 pts), other 1 (nesting depth added 93). 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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"624806c1ad1d0e8dc2c676f17926ca56ffa769cf2404ff641b00a50036969f5c"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.completeAssistantMessage (cognitive 111): CodexService.completeAssistantMessage has cognitive complexity 111 (threshold 15). Drivers by points: if/else 39 (70 pts), boolean chains 40, ternaries 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4013}}}],"partialFingerprints":{"codehealthFindingId/v1":"a22dadeb333801048e9b0e097cb1c55d17058dd5151f4d6101afe6bcfbe0c228"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.reconcileExistingMessage (cognitive 106): CodexService.reconcileExistingMessage has cognitive complexity 106 (threshold 15). Drivers by points: boolean chains 52, if/else 33 (47 pts), ternaries 3 (7 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"696fa30451bf229ac3225c9bb7e9b9825af468e13d7e671eb6f0dbcf7a028f42"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-adapter.applyAppServerMessageToConversationState (cognitive 97): desktop-ipc-conversation-adapter.applyAppServerMessageToConversationState has cognitive complexity 97 (threshold 15). Drivers by points: if/else 30 (59 pts), boolean chains 35, ternaries 1 (2 pts), match/switch 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa5a8011c068d5ad2850787c0a6ff1483f1670939a27b6d265bb7eea4991ba6"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.observeInbound (cognitive 95): createDesktopIpcActionFollower.observeInbound has cognitive complexity 95 (threshold 15). Drivers by points: if/else 32 (60 pts), boolean chains 17, ternaries 1 (7 pts), error handling 2 (5 pts), loops 1 (5 pts), other 1 (nesting depth added 41). Of this number, 73 points are the body\u0027s own statements and 22 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"740767ffb5cd7db96918b9fc8a31476821fecae582d5396973f43b17caf57ca9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.markTurnCompleted (cognitive 91): CodexService.markTurnCompleted has cognitive complexity 91 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 27, loops 3 (7 pts), ternaries 1 (4 pts), match/switch 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5308}}}],"partialFingerprints":{"codehealthFindingId/v1":"c035672cdaa4fbb1190d1bbbe19911e8d0b6146e7d3f307e7e57456780628edb"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.observeInbound (cognitive 87): desktop-ipc-action-follower.createDesktopIpcActionFollower.observeInbound has cognitive complexity 87 (threshold 15). Drivers by points: if/else 32 (58 pts), boolean chains 17, ternaries 1 (7 pts), loops 1 (5 pts) (nesting depth added 36). Of this number, 67 points are the body\u0027s own statements and 20 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe876f9c935c817fc50885809df0119b61796b8740bf5273d0c3d6f3376cd16"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineRenderProjection.renderItems (cognitive 86): TurnTimelineRenderProjection.renderItems has cognitive complexity 86 (threshold 15). Drivers by points: if/else 34 (56 pts), boolean chains 29, loops 1 (nesting depth added 22). Of this number, 55 points are the body\u0027s own statements and 31 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"4884edfe69c90cd33bf04217f3a5186961c24c4532b5b09ee4523150c10a806b"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-live-mirror.synthesizeNotificationsFromRolloutEntry (cognitive 83): rollout-live-mirror.synthesizeNotificationsFromRolloutEntry has cognitive complexity 83 (threshold 15). Drivers by points: if/else 33 (60 pts), boolean chains 14, ternaries 3 (9 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"21dada687ef29085dd3cdbd5e3cbe65662f49bb30db2b9dde5616ab1585c650b"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnFileChangeSummaryParser.parse (cognitive 82): TurnFileChangeSummaryParser.parse has cognitive complexity 82 (threshold 15). Drivers by points: if/else 24 (62 pts), boolean chains 15, loops 2 (4 pts), ternaries 1 (nesting depth added 40). 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"7790d7e9c8de0a34cf4fa5243972d94d3ca1f042417d132870a47d89a79d5729"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRow.assistantView (cognitive 82): MessageRow.assistantView has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 26, ternaries 13 (16 pts), match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b0b36c05bf2c89c9e26811c47cb4be9e33b9340e6f6af6b91ce008f17d75a3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeMessagesFromThreadRead (cognitive 81): CodexService.decodeMessagesFromThreadRead has cognitive complexity 81 (threshold 15). Drivers by points: if/else 12 (39 pts), ternaries 8 (32 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"928e5752d595e207d1b6a8c361160cf41de5cdd131e2dd8cf75058ca04281f80"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.handleRequest (cognitive 73): opencode-runtime.createOpenCodeRuntime.handleRequest has cognitive complexity 73 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 19, ternaries 8 (15 pts), error handling 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc456c55f0157dc8b5f28ee370ed6ef53bfb33995742e7c9d51a5ac67ae3c9d"}},{"ruleId":"D2","level":"warning","message":{"text":"refreshTouchedNormalizedActiveTurns (cognitive 73): refreshTouchedNormalizedActiveTurns has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 12 (30 pts), if/else 10 (23 pts), boolean chains 15, loops 4 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3521}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26b5002708da8005da8062c69ef5723a311d534712b4bb1a9a80a545f924f01"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.handleRequest (cognitive 73): createOpenCodeRuntime.handleRequest has cognitive complexity 73 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 19, ternaries 8 (15 pts), error handling 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b10c67974f6edb8f3bfe734c14d615605b4919dbcd3f2913f5783b962fd8426"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.loadOlderThreadHistoryPage (cognitive 70): CodexService.loadOlderThreadHistoryPage has cognitive complexity 70 (threshold 15). Drivers by points: if/else 15 (46 pts), boolean chains 20, error handling 2, loops 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ec24d6e844c6eaa90c112ff2bd4c6c2034f59b9a948e6d5bb2b2603319d0f5"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.ensureThreadResumed (cognitive 70): CodexService.ensureThreadResumed has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 14, ternaries 3 (5 pts), error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da8ce0a991ea97f3c4d0af05212f5fb34bd49abc16ea5f30a41eab4e9094a0c"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleTurnStarted (cognitive 68): CodexService.handleTurnStarted has cognitive complexity 68 (threshold 15). Drivers by points: if/else 22 (40 pts), boolean chains 28 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd82f024644f31a467ba922644001c5dcd6fb183cfbaba5f591fd67af890de06"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.interruptTurn (cognitive 68): CodexService.interruptTurn has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (34 pts), error handling 6 (21 pts), boolean chains 13 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c10d0c47e762fbd4f5d14c267d7dda459f3cb00cbebd66c51ebcd46fe4e115"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.onEnvelope (cognitive 64): desktop-ipc-action-follower.createDesktopIpcActionFollower.onEnvelope has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 19, loops 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ed76d4ad70bc846ab855038e9181487c0b8485af09fd7e85b8fc5bcd7252c2"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.onEnvelope (cognitive 64): createDesktopIpcActionFollower.onEnvelope has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 19, loops 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"823022576868d35a511959ab1e1fbe3e1971517bf52ea39cd567165e676825e4"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge (cognitive 62): bridge.startBridge has cognitive complexity 62 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 18, ternaries 9, error handling 2 (3 pts) (nesting depth added 9). Of this number, 32 points are the body\u0027s own statements and 30 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"a16e63ed9dee27784654e193637523f400f52f2db3c13ffaee57e3539712dd70"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.startThreadImpl (cognitive 61): CodexService.startThreadImpl has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 13, ternaries 4 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"c740717cb1d1912978c6c718e6284460315905cb605fc3bd093b493dd4ade13f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.applyCanonicalHistoryOrder (cognitive 60): CodexService.applyCanonicalHistoryOrder has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (36 pts), loops 12 (16 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 18). Of this number, 57 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18d4baa81bed89517cd56b0b24f5c6fe9c08ba13270c9942d9911173355d7fc"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantMemoryCitationParser.visibleText (cognitive 60): AssistantMemoryCitationParser.visibleText has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 10, loops 2 (nesting depth added 29). 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":"CodexMobile/CodexMobile/Views/Turn/Messages/AssistantMemoryCitationParser.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d40dd62d5f26d72a72a2025c876b580540110cd3c7da850ffc5b64a56078c8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.repairCanonicalAssistantSourceIdentityRotations (cognitive 59): CodexService.repairCanonicalAssistantSourceIdentityRotations has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 20, loops 6 (9 pts), ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1708}}}],"partialFingerprints":{"codehealthFindingId/v1":"3853db0577419db94b1bed373aa562d67b172bc7c05fdbb351e526c80b4a43be"}},{"ruleId":"D2","level":"warning","message":{"text":"phodex-backend-relay.setupRelay (cognitive 59): phodex-backend-relay.setupRelay has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 5 (10 pts), boolean chains 8, ternaries 1 (nesting depth added 23). None of this is in the body itself: all 59 points belong to 4 function literals inside it that branch (lines 55, 159, 141, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c84d0b3245ea4b3c56c47e42c8f84643d8ca8ad176e5daa07d99cfda46b0ecf"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.steerTurn (cognitive 58): CodexService.steerTurn has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 13, error handling 3 (8 pts), ternaries 3 (5 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1992}}}],"partialFingerprints":{"codehealthFindingId/v1":"088f2ce89651b92713ea3f7d1128f41935484874d308c9c4c57f96e836e54a1f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.resolvedSubagentPresentation (cognitive 56): CodexService.resolvedSubagentPresentation has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 31). Of this number, 45 points are the body\u0027s own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"289bd5479356c89f157dfff34bcf2a0eb30323b0bbf26840f02b640a88be936f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleStructuredItemLifecycle (cognitive 55): CodexService.handleStructuredItemLifecycle has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 21, ternaries 3 (6 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"50103ad4dc46a2855f5c799cce43967e1313ab074c73414d2b8659455ffac3ee"}},{"ruleId":"D2","level":"warning","message":{"text":"mergeRelayHistoryItemsWithJsonlItems (cognitive 53): mergeRelayHistoryItemsWithJsonlItems has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 12, ternaries 2 (4 pts), loops 2 (nesting depth added 18). Of this number, 43 points are the body\u0027s own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"93807176ab415d460e115466893d541840bfae04ea370eaac52c3db9d12b5b08"}},{"ruleId":"D2","level":"warning","message":{"text":"createNormalizedLiveIndex (cognitive 53): createNormalizedLiveIndex has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 8 (12 pts), ternaries 5 (11 pts), boolean chains 7, other 2 (nesting depth added 20). Of this number, 49 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3396}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a0e1b9e46956a64d2bbfa7978e60d3c3b7758982e40f702511f2d05ee611331"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.observeOutbound (cognitive 53): createDesktopIpcLiveOwner.observeOutbound has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 15, ternaries 2 (3 pts), other 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"142626a4d78bd0ae68be9d6b5d585b964a50ebdee06a36135ed12e4d20c04a6a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.startRuntimeSettingsUpdate (cognitive 52): CodexService.startRuntimeSettingsUpdate has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 15, loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeSettingsSync.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a5e3c51748c593c11e64228b25d005d3cb985200cea204041aef31b25d8e26"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeOutbound (cognitive 52): desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeOutbound has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 15, ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"73f6b72ed97cebb73830dedc183a38306923767a9499a893ba422660427ac508"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnView.body (cognitive 50): TurnView.body has cognitive complexity 50 (threshold 15). Drivers by points: if/else 26, boolean chains 13, ternaries 10, error handling 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"6790579881cdb266b276602fbc43aabc9cc58cde9373fce6d7c48451db4e0222"}},{"ruleId":"D2","level":"warning","message":{"text":"remodex-jsonl-diagnose.diagnoseSessionJsonl (cognitive 49): remodex-jsonl-diagnose.diagnoseSessionJsonl has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 12, loops 3 (7 pts), ternaries 4 (5 pts), error handling 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex-jsonl-diagnose.js"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"75199360683129050b296329b6581429df96b926e4d37bc7269cd953154bc07b"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.readDescendingTurnPage (cognitive 48): opencode-runtime.createOpenCodeRuntime.readDescendingTurnPage has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 12, ternaries 2 (6 pts), error handling 1 (2 pts), loops 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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e7883e596269a4fb7fb042406c228547ca30ac930c22f869fef47b36d83ec3"}},{"ruleId":"D2","level":"warning","message":{"text":"relay.setupRelay (cognitive 48): relay.setupRelay has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 10, loops 3 (5 pts), ternaries 1 (nesting depth added 13). None of this is in the body itself: all 48 points belong to 4 function literals inside it that branch (lines 90, 175, 200, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aae2b84a781f02cea5fcc4c3796c8941e4346a413e805e32dfc2e48ec1703f5"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.readDescendingTurnPage (cognitive 48): createOpenCodeRuntime.readDescendingTurnPage has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 12, ternaries 2 (6 pts), error handling 1 (2 pts), loops 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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0d422e52d88a9ee9e4ad9f3c7cceaf7fe6603d81dbdcae7fd0152a2c21c7818"}},{"ruleId":"D2","level":"warning","message":{"text":"bootstrapFromExistingRollout (cognitive 48): bootstrapFromExistingRollout has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 11, ternaries 2 (4 pts), loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f04a5a4997bb36868fa3cce52300fdaca9914d978a849f106bb7ac37b7adbd"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleNotification (cognitive 47): CodexService.handleNotification has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (36 pts), boolean chains 7, match/switch 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca26d6f556c949061ca47d5f8ba04cebbac3122dd488e882b4d5175f9e3eed4b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleTurnCompleted (cognitive 47): CodexService.handleTurnCompleted has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 11, ternaries 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a78daad29e852ea4cd2d25c8c3b1dfb549161ddf2ad2a5f4afb480d26572dd0"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.reconcileLocalThreadsWithServer (cognitive 45): CodexService.reconcileLocalThreadsWithServer has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 11, loops 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"f109468ad6dab5621f01c62ea64e13db218a3a6c055bec4000fbd3120ee7a2b2"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandHumanizer.extractSearchPatternAndPath (cognitive 45): CommandHumanizer.extractSearchPatternAndPath has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 5 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcf30b342216ea98de4f9a0b30bd39907a83f116614bd32ed227e854ed36b4b"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingInlineMarkupAutoCloser.scanInlineMarkers (cognitive 45): StreamingInlineMarkupAutoCloser.scanInlineMarkers has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 4, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/StreamingInlineMarkupAutoCloser.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"61abc770259c5828a09f26ab463330f73a98fc7a4199b0a73e74b467b05809cc"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.removeDuplicateAssistantMessages (cognitive 44): TurnTimelineReducer.removeDuplicateAssistantMessages has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (38 pts), boolean chains 5, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1138f112026cd3a824575d66135734c316ab06721b9452d9a88290f15f2067f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.scheduleCanonicalHistoryReconcileIfNeeded (cognitive 43): CodexService.scheduleCanonicalHistoryReconcileIfNeeded has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 22, if/else 12 (19 pts), error handling 2 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"c42266f2cab453ffc6f910cf3f73a8cbee9ccb2976edd4145e72ab632dc90936"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-live-mirror.inspectBootstrapRunBoundary (cognitive 43): rollout-live-mirror.inspectBootstrapRunBoundary has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 14, ternaries 2 (4 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0248572f21e88ff81a2746972ae86a07daba7ed88702350e1e4f1a29921c9a5"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.applyImmerPatchCopyOnWrite (cognitive 43): desktop-ipc-action-follower.applyImmerPatchCopyOnWrite has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4190}}}],"partialFingerprints":{"codehealthFindingId/v1":"10269f3cfe72575547fd87ca79030dea59f26edcf1d4b3b7dfb0766f66d796e7"}},{"ruleId":"D2","level":"warning","message":{"text":"synchronizeDesktopConversationCompatibility (cognitive 43): synchronizeDesktopConversationCompatibility has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 14, ternaries 9 (13 pts), other 11, if/else 3 (4 pts), loops 1 (nesting depth added 5). Of this number, 42 points are the body\u0027s own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"83cef3d173a30fd4f6ca042e01b786c8df8a18547b53b38e13c5d418824416ec"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.watchTurn::poll (cognitive 43): createOpenCodeRuntime.watchTurn::poll has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (11 pts), ternaries 4 (9 pts), loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de151d77b3bd86d11040fabb386838c9ead7b15148503797b8f617849de5e4d"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendConfirmedMirroredUserMessage (cognitive 41): CodexService.appendConfirmedMirroredUserMessage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 14 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1754}}}],"partialFingerprints":{"codehealthFindingId/v1":"55058989f500a2f7557f55e211392f4c044b211d67edeeee3365d4abdc0ebf6e"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.confirmGitSyncAlertAction (cognitive 41): TurnViewModel.confirmGitSyncAlertAction has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 11, error handling 3 (6 pts), match/switch 1 (nesting depth added 16). 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dd98d2e685d6777eee42c1aefe5e0980a1078d0a1b0dba95602fbedae4588a"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.triggerGitAction (cognitive 41): TurnViewModel.triggerGitAction has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 2 (4 pts), ternaries 1 (4 pts), error handling 2, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3251}}}],"partialFingerprints":{"codehealthFindingId/v1":"684ba032002e36cb247e535d4b32f86f759180eb8df3b0fbb171b23e5df8e30b"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.enforceIntraTurnOrder (cognitive 41): TurnTimelineReducer.enforceIntraTurnOrder has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 9, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"b28658d4c9f2d46388535a81ee37902ca51b0576d10947753d42a2adbc4e50b7"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.handleApplicationMessage (cognitive 41): startBridge.handleApplicationMessage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 33 points are the body\u0027s own statements and 8 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b726be0a979e3756c1c7638a986de33530546a8a28adc99418c5f4ac1eaa7af"}},{"ruleId":"D2","level":"warning","message":{"text":"fetchAdaptiveThreadTurnsListForRelay (cognitive 41): fetchAdaptiveThreadTurnsListForRelay has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 4, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"44545946fa857aea722c46c7ace8691659556387a6f7c351446dd1d47915b061"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.watchTurn::poll (cognitive 40): opencode-runtime.createOpenCodeRuntime.watchTurn::poll has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (11 pts), ternaries 3 (7 pts), loops 2 (3 pts), error handling 1 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85368c82817e3ee40fe5fcf781a4c655cb78c3ddf20a9817b23f8d083938893"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.submitDesktopFollowerRequest (cognitive 40): createDesktopIpcActionFollower.submitDesktopFollowerRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, ternaries 6 (12 pts), error handling 2 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 2512, 2486, 2456). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f67aa33eb2e183fef57f597a9453b84ef8c8aff27bd8f10c13125135dfc62f"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.onInputChangedForSkillAutocomplete (cognitive 39): TurnViewModel.onInputChangedForSkillAutocomplete has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 5, error handling 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"443c3784dca989d131bdc9417a498af4417a47e3d20f3481798b71fb1595b487"}},{"ruleId":"D2","level":"warning","message":{"text":"push-notification-tracker.createPushNotificationTracker.handleOutbound (cognitive 39): push-notification-tracker.createPushNotificationTracker.handleOutbound has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 11, ternaries 1 (nesting depth added 13). Of this number, 22 points are the body\u0027s own statements and 17 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e75396a5728157178901914460d0570d974e9f75527a7321018d89e65032ad"}},{"ruleId":"D2","level":"warning","message":{"text":"backgroundHistoryTurns (cognitive 39): backgroundHistoryTurns has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (8 pts), ternaries 5 (8 pts), loops 5 (7 pts), other 2 (nesting depth added 7). Of this number, 28 points are the body\u0027s own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3923}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8a85fd80e6760b8c6d3a91c1790c42bdce501637bb9cefbddee5a8c89ee277"}},{"ruleId":"D2","level":"warning","message":{"text":"createPushNotificationTracker.handleOutbound (cognitive 39): createPushNotificationTracker.handleOutbound has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 11, ternaries 1 (nesting depth added 13). Of this number, 22 points are the body\u0027s own statements and 17 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"be2056880dcf7fc172b3b76d81d2f87e6f5d0d5ef8d98200491a679ffe92e64c"}},{"ruleId":"D2","level":"warning","message":{"text":"createThreadRolloutLiveMirror.tick (cognitive 39): createThreadRolloutLiveMirror.tick has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b1952cfc0a29f351b97d2b2d06c413cd784ce2f4f7c04c8b548720a3013e6ba"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.ensureStreamingAssistantMessage (cognitive 38): CodexService.ensureStreamingAssistantMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 9 (nesting depth added 16). 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":6631}}}],"partialFingerprints":{"codehealthFindingId/v1":"780e8bb2c8060b60cee74e76f4036dc773a875224adcf15202b389045efaacb3"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnComposerHostView.body (cognitive 38): TurnComposerHostView.body has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 22, ternaries 8, if/else 6, match/switch 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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3df367e3565af12685128566eb8ea5c98b4e37fd592510854153b08f32fc9b7"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.loadMacScopedDefaultsState (cognitive 37): CodexService.loadMacScopedDefaultsState has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23, boolean chains 12, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfdfcb99da647f9447cd6e1c99d741ac747349616a96d83223057e8b92bd28a6"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.steerQueuedDraft (cognitive 37): TurnViewModel.steerQueuedDraft has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2019}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9eeb8be47362fee7f4d0a044ca6c47f438f7d9f7b78dd4a473883e2bf61432b"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-live-mirror.createThreadRolloutLiveMirror.tick (cognitive 37): rollout-live-mirror.createThreadRolloutLiveMirror.tick has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"078db8b3652432965fbd185bfc9789acf7230e1561e21fa9c926f36f722a801b"}},{"ruleId":"D2","level":"warning","message":{"text":"remodex.main (cognitive 37): remodex.main has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 9, error handling 3 (6 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"437f40a3288566e077f12e4d2a861e61aa0fb0e5eebb64ef5f492d17f4d7039e"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleLegacyCommandExecutionEvent (cognitive 36): CodexService.handleLegacyCommandExecutionEvent has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 10 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1995}}}],"partialFingerprints":{"codehealthFindingId/v1":"322e13b63f1802c5c58a7926029d51f24ca6836ae65cac5cee17389790a59d76"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentViewModel.attemptAutoReconnectOnForegroundIfNeeded (cognitive 36): ContentViewModel.attemptAutoReconnectOnForegroundIfNeeded has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"193ffd329489c11033e6409c44785d1b17fab8221dd1b7be0cab8f977ee92751"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentViewModel.connectWithAutoRecovery (cognitive 36): ContentViewModel.connectWithAutoRecovery has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 4, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f69bb1edfd2270339c1e9350a97edec5c6eccb0921340a169f1b819b63c139"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineView.assistantBlockInfo (cognitive 36): TurnTimelineView.assistantBlockInfo has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 11, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3d1ac09133ed47b64351691dcfa9401257602d465daf507396a828206e50de"}},{"ruleId":"D2","level":"warning","message":{"text":"trimThreadPayloadForRelay (cognitive 35): trimThreadPayloadForRelay has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 3 (6 pts), other 5, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5105}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7539c20ae292730e4ebfceaa5bdb6cc4a9e0feca48c6011c113628597c420d"}},{"ruleId":"D2","level":"warning","message":{"text":"AIUnifiedPatchParser.analyzeChunk (cognitive 34): AIUnifiedPatchParser.analyzeChunk has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 20, if/else 8 (11 pts), ternaries 2, loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"432421caecc8a822afd545da688adbd84e3007189407ea6d0dedc1ff64f63006"}},{"ruleId":"D2","level":"warning","message":{"text":"git-handler.assertWorktreeHasNoBoundChats (cognitive 34): git-handler.assertWorktreeHasNoBoundChats has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, error handling 2 (4 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a09deee636ee4e193465b2117ba3037b5f8ac9d03d7967206e0ae1e89d8bd2"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendSystemMessage (cognitive 33): CodexService.appendSystemMessage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 14 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1939}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcec5b4620f61609a999962b1f5fed79650bc12c4519101868ceee922b28433a"}},{"ruleId":"D2","level":"warning","message":{"text":"git-handler.gitRunStackedAction (cognitive 33): git-handler.gitRunStackedAction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 13, ternaries 3 (nesting depth added 4). Of this number, 31 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f83d9a75a05ccaa918d0b378a73304c11c09173c9b0cfaa6dfabf6806eb0b3"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.submitDesktopFollowerRequest (cognitive 33): desktop-ipc-action-follower.createDesktopIpcActionFollower.submitDesktopFollowerRequest has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 6 (9 pts), error handling 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 33 points belong to 3 function literals inside it that branch (lines 2512, 2486, 2456). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"33b19d0de486db5029a440b3c68a598eecac9a47e8de2e6f45c92045aaaf03d9"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-state-patches.applyPatchToBaselineNode (cognitive 33): desktop-ipc-state-patches.applyPatchToBaselineNode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-state-patches.js"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"0245923bc44608ecac79ccbd9a1af3add1bd9925c7bebe0d91df5ffeab12595e"}},{"ruleId":"D2","level":"warning","message":{"text":"searchDirectoryEntries (cognitive 33): searchDirectoryEntries has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts), other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab930e41c09df7fe83ec6c2c10a5de6746e8923757ea805df53015c3aa168de8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.extractIncomingMessageText (cognitive 32): CodexService.extractIncomingMessageText has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 10, ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3793}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8988c99d6c4117c542e8df99d0b2d7947d37beb32e3c1acc8dc67f52f89955"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.checkMissingCatalogThreads (cognitive 32): CodexService.checkMissingCatalogThreads has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (12 pts), error handling 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"013938e9d6b32ca36812059e3d0fd9b755237b8f225fb9918a2092b05be54f49"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffTurnItems (cognitive 32): desktop-ipc-conversation-projector.diffTurnItems has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf27a51cbe0c5ab0efa9075b6bff3bf7ca5effc1d4d2e5f246793de36e480c26"}},{"ruleId":"D2","level":"warning","message":{"text":"buildConversationStateFromThread (cognitive 32): buildConversationStateFromThread has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 29, other 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"62226099f9cfa590b2303d6db4d8f83f691c80f7aa4f5f385c403d5060a7bc17"}},{"ruleId":"D2","level":"warning","message":{"text":"createPushNotificationServiceClient.postJSON (cognitive 32): createPushNotificationServiceClient.postJSON has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1, other 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"a950882434589d5197b87d841b9213fec5fe0ae2cd4c139acc007a233e972566"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.deliverAsyncUserInput (cognitive 31): CodexService.deliverAsyncUserInput has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, 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":"CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b62ed3fcfc1b7dfd8545fc3ff5bac10b1e50a3268fe19f8ce75af2323c830a"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.onInputChangedForPluginAutocomplete (cognitive 31): TurnViewModel.onInputChangedForPluginAutocomplete has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 5, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64b7a73e9574ae4a520a29352dac6d0ee39f43d78c9b347c85f548dbd9f7c45"}},{"ruleId":"D2","level":"warning","message":{"text":"push-notification-service-client.createPushNotificationServiceClient.postJSON (cognitive 31): push-notification-service-client.createPushNotificationServiceClient.postJSON has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"debdef8d983e88cca86c457255b570b22dfcf41009eb3822a5f2b05124c9a4d2"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.tryServeDesktopOwnedRead (cognitive 31): desktop-ipc-action-follower.createDesktopIpcActionFollower.tryServeDesktopOwnedRead has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (13 pts), boolean chains 5 (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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9e7d42e7826427fd433f1412adc438245615c91e26fa79fc99970538a12134"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.handleApplicationMessage (cognitive 31): bridge.startBridge.handleApplicationMessage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 4 (nesting depth added 4). Of this number, 26 points are the body\u0027s own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f9434bfb6475d3bf11b7a94ad9a5d95b2cf1512a20057d13c063c40f7e3d2e"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.observeThreadListResponse (cognitive 31): createDesktopIpcActionFollower.observeThreadListResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, loops 3 (4 pts), ternaries 2 (nesting depth added 9). Of this number, 30 points are the body\u0027s own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4b2ab5f83acf52edc5694a2ac0b7e84e153912457677ca33d581e27448982b"}},{"ruleId":"D2","level":"warning","message":{"text":"RawFileChangeDiffSectionParser.parse (cognitive 30): RawFileChangeDiffSectionParser.parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"1576b6e75f355e29d38ab1cd9dd687ab95c95c3a3919cebfe39e149c85324108"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkspaceRunestoneTheme.textColor (cognitive 30): WorkspaceRunestoneTheme.textColor has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 9, boolean chains 5 (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":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"633b4d6aea9093d9af1ed482ad1ef7fc2453d5a8c9a2df58ffa01cec41ea4f53"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.anchorLateFileChangesToOwningTurn (cognitive 30): TurnTimelineReducer.anchorLateFileChangesToOwningTurn has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 11, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d248164539655415deed287fef407f604b68f77209158dcbf71787e977013d"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.emitItem (cognitive 30): opencode-runtime.createOpenCodeRuntime.emitItem has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 10 (11 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"95be865cb91d80a35cf6b2d782625d337ffdd0e7a9216abbddfc2fea1adb9bdc"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-shared.createFrameReader.push (cognitive 30): desktop-ipc-shared.createFrameReader.push has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d95c08fa31828a2b8957d0120ec9660af503a5701ac6839d93d70363b45e93"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.observeThreadListResponse (cognitive 30): desktop-ipc-action-follower.createDesktopIpcActionFollower.observeThreadListResponse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, loops 3 (4 pts), ternaries 1 (nesting depth added 9). Of this number, 29 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f495d832776ba982ab123b17db2ab752534c708c3982f2a254604893638f999"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeRelayBoundJsonRpcMessage (cognitive 30): normalizeRelayBoundJsonRpcMessage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 12, other 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3618}}}],"partialFingerprints":{"codehealthFindingId/v1":"422d86ecc76f35a5155b8c0422e759686ddcdd30ba63365fe632f8d50d13d51c"}},{"ruleId":"D2","level":"warning","message":{"text":"mergeOpenCodeThreadsIntoListResponse (cognitive 30): mergeOpenCodeThreadsIntoListResponse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, ternaries 5, other 3, loops 1 (nesting depth added 3). Of this number, 22 points are the body\u0027s own statements and 8 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5585}}}],"partialFingerprints":{"codehealthFindingId/v1":"24bbdaa5bee294983554f11eef681aca56f4decf07e41ac5a4ee1a1178f2b20b"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.tryServeDesktopOwnedRead (cognitive 30): createDesktopIpcActionFollower.tryServeDesktopOwnedRead has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (12 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b27cfc5ca3f5101a43b603e3c59bc34f0148c52e897f1324a783121153cfb8c"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.observeInbound (cognitive 30): createDesktopIpcLiveOwner.observeInbound has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 3, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a4df584c195d210dcc33c39e3a37e858ff905eed04550fd46ad129a5e260d9"}},{"ruleId":"D2","level":"warning","message":{"text":"createFrameReader.push (cognitive 30): createFrameReader.push has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"efae7c1bd3963f71b8c190fe1992f7f97ebdb768f8f30c719131a4129bd6d54d"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.emitItem (cognitive 30): createOpenCodeRuntime.emitItem has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 10 (11 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79ec56e58a0a28567b5cd1f93ce4617780a14d3b13da328fd2042ae8df6de97"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexAutoApprovalReview.coreFileSystemPermissions (cognitive 29): CodexAutoApprovalReview.coreFileSystemPermissions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ceeb134f94ad09cd30c40ab4404dca2b2d37facacf93642ab356b18bc87dee9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.makeTurnInputPayload (cognitive 29): CodexService.makeTurnInputPayload has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2365}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a57d9f44791d31f97d88ec63b7337e4149bd2cbde34cb9946b20236c44dc53"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.shouldDisableTurnPagination (cognitive 29): CodexService.shouldDisableTurnPagination has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 22, if/else 4 (6 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTurnPaginationCompatibility.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c9e5e3548b7f73568fcef328b5b562baead2283328a1f543c21b598f6048153"}},{"ruleId":"D2","level":"warning","message":{"text":"RemodexNativeSSHTerminal.open (cognitive 29): RemodexNativeSSHTerminal.open has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Terminal/RemodexNativeSSHTerminal.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c964b7bca812fe0669d38bd7689b5d647ce6f0664da432cca4b0deead50d22"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnComposerView.composerStack (cognitive 29): TurnComposerView.composerStack has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 9 (10 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89fde22a65d214a38ccce54c8ed0f5884e7afe6f390ed45aab9b922c322c8c4"}},{"ruleId":"D2","level":"warning","message":{"text":"UnifiedDiffParser.parse (cognitive 29): UnifiedDiffParser.parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 11). Of this number, 26 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"833d8fca300b352cfd9c091b8b5da306560729ac01cb9ff8318243ff63a322e1"}},{"ruleId":"D2","level":"warning","message":{"text":"git-handler.createWorktreeAtManagedPath (cognitive 29): git-handler.createWorktreeAtManagedPath has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"59908a4ed83d8a2c5284d3e8a820a7cdc91aeb439577c0528a8d57b497b84e78"}},{"ruleId":"D2","level":"warning","message":{"text":"apply-patch-changes.parseApplyPatchChanges (cognitive 29): apply-patch-changes.parseApplyPatchChanges has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 6, loops 1 (nesting depth added 10). Of this number, 25 points are the body\u0027s own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"299e5d9e6d815f3f9da9d1cb01a6a68cab1344c24643aece89a59a6f691d6878"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeInbound (cognitive 29): desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeInbound has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf90596585b4ab00c0c3ee49fb2b6ceb16ac52654aa54cc187d15d8ad513a7f"}},{"ruleId":"D2","level":"warning","message":{"text":"projectTurn (cognitive 29): projectTurn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, other 4, ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"87017f4fe5194b3093a274779c75581b7a4063a2fbaa164dc75fc5837b9b09c6"}},{"ruleId":"D2","level":"warning","message":{"text":"reasoningVariants (cognitive 29): reasoningVariants has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, ternaries 2 (5 pts), loops 2 (3 pts), other 1 (nesting depth added 10). Of this number, 20 points are the body\u0027s own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4a21a0395a0caec2c4a27bdb01fe04afad189f016b5fd5b5ac9faf4bffe947f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexAsyncUserInputProjection.reopenRepliesMissingFromCanonicalHistory (cognitive 28): CodexAsyncUserInputProjection.reopenRepliesMissingFromCanonicalHistory has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"8190a585adf1e6faca970c5660d8a6a7f61f02809f83a3fe0dbc4d70c226e1a3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexAutoApprovalReview.coreActionValue (cognitive 28): CodexAutoApprovalReview.coreActionValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 13, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"73311a578d66e9d14a16579dfee844459993418e7b65833b166e984dab3bc75c"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.extractItemID (cognitive 28): CodexService.extractItemID has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 14. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2722}}}],"partialFingerprints":{"codehealthFindingId/v1":"e643b79d67f1a6ebc5d2e914e053e91ba57304d461f6035473281bc6634281e1"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendCompletedAgentText (cognitive 28): CodexService.appendCompletedAgentText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 6, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c476a16de3b59d757a782d1e32e8132436e8edaff730ac6230ac6da80ce2ce"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTVoiceTranscriptionManager.startRecording (cognitive 28): GPTVoiceTranscriptionManager.startRecording has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, error handling 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/GPTVoiceTranscriptionManager.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9d28b44debb5e897cadca5fb7c277e035caefd6c99308aec9969a190756cdf"}},{"ruleId":"D2","level":"warning","message":{"text":"FileChangeSummaryBox.body (cognitive 28): FileChangeSummaryBox.body has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (12 pts), boolean chains 2, match/switch 1 (nesting depth added 16). 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryViews.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece74a5bf50dc2eccaf24253f855a62a5b6c8236e3b3b8cab503226f5b67a83c"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.hasInterleavedAssistantActivityFlow (cognitive 28): TurnTimelineReducer.hasInterleavedAssistantActivityFlow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3900630f6a8ee54450471ccd9942f7486410c71770d4bffb5290a8bf4ba096d"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.processEvent (cognitive 28): opencode-runtime.createOpenCodeRuntime.processEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, ternaries 1 (4 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"27af520156a55b5c99101f15a8107645b7fb95ff859527fa81b272c1e4da7ac4"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-adapter.applyDeltaNotification (cognitive 28): desktop-ipc-conversation-adapter.applyDeltaNotification has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 3 (7 pts) (nesting depth added 5). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55f69599b32e1681076fa8bae11136d03caf1801517ccbb495fcbdc845fbdd9"}},{"ruleId":"D2","level":"warning","message":{"text":"runPendingRefresh (cognitive 28): runPendingRefresh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 6 (7 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9f83fc4c3c1bb68e3a5f8ff62bf6cbf21e0e8c734e0ef2f78c05d7c563328e"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.runNextQueuedFollowUp (cognitive 28): createDesktopIpcLiveOwner.runNextQueuedFollowUp has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11, other 2, error handling 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 1815, a function literal at line 1854, (anonymous)::canRun, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1805}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ac6713788f296b9b52ec629b03a4acdc0bf1857c28ad739957f671d78b77cad"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.processEvent (cognitive 28): createOpenCodeRuntime.processEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, ternaries 1 (4 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ac50e64b50fd1d98ca26860ac1a0e82232b050a15963c0405687ff8c06914b"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.mainContent (cognitive 27): ContentView.mainContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf14e455ce7a8920290d7a80a3226af636100e62dca686b98488c27c3ca299d"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.extractThreadID (cognitive 27): CodexService.extractThreadID has cognitive complexity 27 (threshold 15). Drivers by points: if/else 27. 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3595}}}],"partialFingerprints":{"codehealthFindingId/v1":"310eef429d134ff906d9b4a6a5f1b65e6e3f177e2a1928a9c9a1fe843a7b48e3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.continueAfterStreamFailure (cognitive 27): CodexService.continueAfterStreamFailure has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BStreamRecovery.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"b03023f221fa924f30eaf74e05d65d634e311b409f399d719071ae22a051d078"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnDiffLineKind.detectVerifiedPatch (cognitive 27): TurnDiffLineKind.detectVerifiedPatch has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 7 (11 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"1819797850ca49e0e702409e2a0376238e539ee729f53b708e3e6e5c697ac64b"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-watch.findRecentRolloutFileForContextRead (cognitive 27): rollout-watch.findRecentRolloutFileForContextRead has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"8316a09aba516a3d9eda950ed7298f3e8bb833f45ea9daf468ed4411b6805649"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.partsFromInput (cognitive 27): opencode-runtime.partsFromInput has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, ternaries 2 (4 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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53cdf30ad7abde61b9aaccabaa8567c2e56058554bd8fa73153234b2ba95ad5"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.handleClientResponse (cognitive 27): opencode-runtime.createOpenCodeRuntime.handleClientResponse has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (17 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 12). Of this number, 19 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"09531480c4df6db8694f1be5047b1cdf924fbe34d0328718cc44b7429e3afb86"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-adapter.normalizeTurnInitialPrompt (cognitive 27): desktop-ipc-conversation-adapter.normalizeTurnInitialPrompt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1033}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2dd216b11180055f296e63cfdc514e708eca3fc7c565881bc5a1aa2ac00b65"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.normalizedLiveIndexNeedsRebuild (cognitive 27): desktop-ipc-action-follower.normalizedLiveIndexNeedsRebuild has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3490}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a63dcf24ace693e856ead43067f5491e2422d5951104483232f316d43a90bed"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.handleClientResponse (cognitive 27): createOpenCodeRuntime.handleClientResponse has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 5 (6 pts), boolean chains 4, other 3 (nesting depth added 9). Of this number, 20 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"047d3dfdca9389b66d7bd006f9786f450c29dedd5aa45caf559838bfc627bf08"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeItemText (cognitive 26): CodexService.decodeItemText has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a8f3e216c0650a6238b5cc4e456b8f9b939158d10249746919f36114bc29df"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleErrorNotification (cognitive 26): CodexService.handleErrorNotification has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cdd7a127fa0c9d9c0b1804c0fd9b97e99f82ef4c72b06d2af247d58858adb4f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.isFileChangeSnapshotPayload (cognitive 26): CodexService.isFileChangeSnapshotPayload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3259}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41403f956f0535014b7f96e73601539c7900c8fadbfa60bfca2d577bfed41d0"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.pruneDuplicateSystemRows (cognitive 26): CodexService.pruneDuplicateSystemRows has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 10 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3399}}}],"partialFingerprints":{"codehealthFindingId/v1":"4350f4984c84473faacca704adcd844331ef06e1f0cec832f634c749e14f9852"}},{"ruleId":"D2","level":"warning","message":{"text":"SidebarActivityDiffStore.refresh (cognitive 26): SidebarActivityDiffStore.refresh has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (10 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/SidebarActivityDiffStore.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a52f9e8a083e103a7012d3a3c12c59fc6fe890219f4615750e1da1b0fadf51"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentViewModel.switchToTrustedMac (cognitive 26): ContentViewModel.switchToTrustedMac has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, ternaries 1 (3 pts), error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"3381d91deb540358e2e5b3e775dfdb3a6fad3ef5177e822f81a8ceee859c4a24"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.syncProjectedConversationState (cognitive 26): desktop-ipc-action-follower.createDesktopIpcActionFollower.syncProjectedConversationState has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"00122847b5d7c54ed76bd17fe5430c56b1e4021b2743167fcb248adf11c08e8b"}},{"ruleId":"D2","level":"warning","message":{"text":"session-jsonl-history.readRecentSessionJsonlTurns (cognitive 26): session-jsonl-history.readRecentSessionJsonlTurns has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 10). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b46583536108316fb690a9a24f8dfc5b408ef4f229805150e646c3affa0de3"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus (cognitive 26): createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 11). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1536, 1547). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"34669fe8bd00b82c0f442b4fdf2daca544eeeafb4c7ca6b8ae871493624553c7"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.syncProjectedConversationState (cognitive 26): createDesktopIpcActionFollower.syncProjectedConversationState has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 25 points are the body\u0027s own statements and 1 belongs to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a41d3810e54d0a2fd1fc72f1858b3f00a6e43c595b38d938dc0e44b22fa58be"}},{"ruleId":"D2","level":"warning","message":{"text":"gitBranches (cognitive 26): gitBranches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9967ea1e80ecf86085a19964084577f869ea174a0c104354b98a8c5cd41eb50"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.refreshSessionStatuses (cognitive 26): createOpenCodeRuntime.refreshSessionStatuses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 1 (3 pts), error handling 2 (nesting depth added 6). None of this is in the body itself: all 26 points belong to 5 function items inside it that branch (a function literal at line 802, a function literal at line 778, a function literal at line 787, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1e9070ea9445140c00494b2218eeb3ed14fc3299cbbb17b17af0be1615df76"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexAsyncUserInputProjection.reconcile (cognitive 25): CodexAsyncUserInputProjection.reconcile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 10, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a69faba58bef6edf5847830af96bab65183c8c83456a836625a685a3e2eb09e"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.noteDesktopMirroredActivityIfNeeded (cognitive 25): CodexService.noteDesktopMirroredActivityIfNeeded has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 11 (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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78092fecedb1990e0f25a2c269b831c926d990b2725deccad7e35743c44a04a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleThreadStatusChanged (cognitive 25): CodexService.handleThreadStatusChanged has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (11 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1076}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db1738b2cd7f8642af7c7cb1c2dad336ceb19f90bb256d3195caf970b08a121"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.startSyncLoop (cognitive 25): CodexService.startSyncLoop has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (8 pts), boolean chains 3, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a51e3ce494e46820faf8adfee751f434e9aadfa80bca906e9f576d536e7d8ed"}},{"ruleId":"D2","level":"warning","message":{"text":"AudioSampleCollector.copyMonoFloatSamples (cognitive 25): AudioSampleCollector.copyMonoFloatSamples has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/GPTVoiceTranscriptionManager.swift"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"187810c2a526cd901e96128e3cfb27a9ec12ae3e443c12ceeae5638f74de1be7"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.shouldMergeUserMessages (cognitive 25): TurnTimelineReducer.shouldMergeUserMessages has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"498f4dad511d38c70c44e97ed79403a3bddd3549c06bb5f29b763ed596b0d3a5"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.refreshSessionStatuses (cognitive 25): opencode-runtime.createOpenCodeRuntime.refreshSessionStatuses has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, ternaries 1 (3 pts), error handling 2 (nesting depth added 6). None of this is in the body itself: all 25 points belong to 5 function literals inside it that branch (lines 802, 778, 787, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d5137ec3cff62191c297fe63170ed0a9ee1b45274419d24c5096d5b7489584"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.rememberForwardedRequestMethod (cognitive 25): startBridge.rememberForwardedRequestMethod has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 6 (7 pts), other 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb55a90c0607f6438743b0f987b305ea3a717f55a688a78cac5b2071894c4771"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.emitNormalizedReviewOverlays (cognitive 25): createDesktopIpcActionFollower.emitNormalizedReviewOverlays has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 3 (5 pts), loops 2 (3 pts), other 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2120}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9fc83bdb7b1c9e2a9cacb3ac365136548eda12cb98f9e079565dba944fa7fa0"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexAsyncUserInputProjection.nativeReply (cognitive 24): CodexAsyncUserInputProjection.nativeReply has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (7 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAsyncUserInputProjection.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb3d6b1636ea43199874a9ff4577b62a3c4fa606d30ecdeea099fa3bb08711c"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexMessage.== (cognitive 24): CodexMessage.== has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 24. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexMessage.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce9181ae9a404f224a19d6d5c22e3f398c3378564ef17f4a99a44eb7008620a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.extractTextDelta (cognitive 24): CodexService.extractTextDelta has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 12. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2744}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3e690806075fe127fa2162f5aa980951a4c7434fdffe6797447724452a0d4b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.sendRequestWithApprovalPolicyFallback (cognitive 24): CodexService.sendRequestWithApprovalPolicyFallback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 7, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f924340aee3193d6cb76649ca9b920e42c1f58330e4a5c5b8f190c493ad622"}},{"ruleId":"D2","level":"warning","message":{"text":"NewChatDraftView.body (cognitive 24): NewChatDraftView.body has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c561eebb463b25e5cacd6e69af5f325e57228763ad64f361bd41147becbd35"}},{"ruleId":"D2","level":"warning","message":{"text":"PerFileDiffParser.singleChunkFallback (cognitive 24): PerFileDiffParser.singleChunkFallback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3b0a15fc3618366e51a3577c71e42f7228f730c5bd4b508a18133eeb23734d"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandHumanizer.gitInfo (cognitive 24): CommandHumanizer.gitInfo has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a097a51ca602744e27313a5a86afed192f313ed0e0b7d7717cbcfbcdc80120"}},{"ruleId":"D2","level":"warning","message":{"text":"UserBubbleMentionExtractor.renderModel (cognitive 24): UserBubbleMentionExtractor.renderModel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/UserMessageBubble.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6aae5d84d66ba7c2fb0dc67a5c0b54aaf23b376dcdce2596ec697f49466f1b"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffItem (cognitive 24): desktop-ipc-conversation-projector.diffItem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c6d181c9504be675d7c49e9a24fc84263c250442a2b3527aff956930375c45a"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.tryBootstrapDesktopResume (cognitive 24): createDesktopIpcActionFollower.tryBootstrapDesktopResume has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (7 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1440, 1426, 1434, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1409}}}],"partialFingerprints":{"codehealthFindingId/v1":"5017fdd53b2a28c3cac88f329f42f8606b77d778efa4a05522e041033c5d0aa8"}},{"ruleId":"D2","level":"warning","message":{"text":"fileChangePatchKey (cognitive 24): fileChangePatchKey has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, ternaries 3 (4 pts), loops 2 (3 pts), other 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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9d214d84d7049d03a8a4d530c5b0be9c3424cc3c226d829314f2870753c936"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.existingMessagesForCanonicalSourceReplacement (cognitive 23): CodexService.existingMessagesForCanonicalSourceReplacement has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 31, if/else 19 (24 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d15ec54fb7c1e340eeb44f89cd52e9cdee37fe1a472f43301f485804bf6d901"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.normalizedFileChangePathKeys (cognitive 23): CodexService.normalizedFileChangePathKeys has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3038}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d008243d44556596e968f3732f0fc9ffe8b2b814c42c75095c096b0f7e47e19"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.beginAssistantMessage (cognitive 23): CodexService.beginAssistantMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3779}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2439952ba31dedefa259f468ef72c01d9897b9850d49ee8a7ab939857c16b51"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantMarkdownImageReferenceParser.contentSegmentsPreservingTemporaryImages (cognitive 23): AssistantMarkdownImageReferenceParser.contentSegmentsPreservingTemporaryImages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 20 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce436df4f09a6047672b2e5862cd09d758856e05badf12beaf2928049c0d64a0"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService\u002BIncomingSupport.swift.flattenNestedText (cognitive 23): CodexService\u002BIncomingSupport.swift.flattenNestedText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"024cb506c04a71eeef8a6b4fc7a5343707c0e0aeb72f3f084aba2eaa2dfa6d86"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.emitNormalizedReviewOverlays (cognitive 23): desktop-ipc-action-follower.createDesktopIpcActionFollower.emitNormalizedReviewOverlays has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2120}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf6e098fc27fd599e23f80a07364e4bfa36937c84ba68c47d15dc614d8e99fc"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.runNextQueuedFollowUp (cognitive 23): desktop-ipc-live-owner.createDesktopIpcLiveOwner.runNextQueuedFollowUp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1815, 1820, 1863, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1805}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4117fb23772259abcd68db58018222cc63a51678937d34567964ecbc1e35945"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.sanitizeRelayBoundCodexMessage (cognitive 23): bridge.startBridge.sanitizeRelayBoundCodexMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 1 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39dcc9ed5bd8a681a86b9b60f6751c30b3e14a166dacd015f739921b55de15d"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.areEquivalentRelayHistoryItems (cognitive 23): bridge.areEquivalentRelayHistoryItems has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 11 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4482}}}],"partialFingerprints":{"codehealthFindingId/v1":"03ef7b7b814c25c2129abb9930654013754f85166ee9a26d08b6f53a322fb4a8"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.sanitizeRelayBoundCodexMessage (cognitive 23): startBridge.sanitizeRelayBoundCodexMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 1 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a31c7b9e06fc22d4f906a6c9231a72720ee417a31f83e2cd39c2b537c761e7"}},{"ruleId":"D2","level":"warning","message":{"text":"projectConversationState (cognitive 23): projectConversationState has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 17, other 5, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f467e0f804cfa684788d9f089d880b4954243fd668ae1840124e1219d57fb2"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.broadcastConversationState (cognitive 23): createDesktopIpcLiveOwner.broadcastConversationState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9, other 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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"c490cfa26da09eae6844bd5cdc53ad20d101a6175ec19670c10ca4cb2cacc807"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.edgeDragGesture (cognitive 22): ContentView.edgeDragGesture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3a10c7b749805a47149dff407ae2ab13dc48630ba507ec06a7fe1460e8e923"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryBaseDate (cognitive 22): CodexService.decodeHistoryBaseDate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba165c29942e993d45be582cfae6926e969e53307906b3b339e7c99a7bfeec7"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.mergeLateReasoningDeltaIfPossible (cognitive 22): CodexService.mergeLateReasoningDeltaIfPossible has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3616}}}],"partialFingerprints":{"codehealthFindingId/v1":"3608cb2e5311169199a6b56c64df0dd5dfd21c3b18dafbb39313671220fab350"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.catchUpRunningThreadIfNeeded (cognitive 22): CodexService.catchUpRunningThreadIfNeeded has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"841e242b871d60f3b1ea314a35eac15312850ca58ee57fe8d8a6fd8998a4b881"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.startWebSocketKeepAliveLoop (cognitive 22): CodexService.startWebSocketKeepAliveLoop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9e82a9c1affcb6442299da0309abf194cc0d02a4938f7285ca82e73094265b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.validateVoiceWAVData (cognitive 22): CodexService.validateVoiceWAVData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BVoice.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded486d03d3c0021e8581bfe2266ce252c0af312bcb74d4f62fb45ec1bad058c"}},{"ruleId":"D2","level":"warning","message":{"text":"SidebarThreadListView.visibleSubagentThreadIDs (cognitive 22): SidebarThreadListView.visibleSubagentThreadIDs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (10 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"819aa4784ad23cc5a8edb7508a6bd02694f6c3a3b84b4d998cde41212ca1685e"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandHumanizer.humanize (cognitive 22): CommandHumanizer.humanize has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5cab12418db3a4b67de545013445f4890632bd93106e2b4f3087186fca0587"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingMarkdownBlockSplitter.split (cognitive 22): StreamingMarkdownBlockSplitter.split has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/StreamingMarkdownBlockSplitter.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa802be1978c5329e1c3637a1030ac90cefe328eea85e775514409df4dff76b8"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRowRenderModelCache.buildModel (cognitive 22): MessageRowRenderModelCache.buildModel has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (19 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceaddc6629e7bc5a09dfcfeb2e2cbeeeb244647e057987865e37e2fb6fcc4af5"}},{"ruleId":"D2","level":"warning","message":{"text":"codex-transport.createSpawnTransport (cognitive 22): codex-transport.createSpawnTransport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 129, a function literal at line 154, a function literal at line 97, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-transport.js"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"559a3978511d097f505a3126af72b364b335ca11932b78506c27f10ca9706f94"}},{"ruleId":"D2","level":"warning","message":{"text":"workspace-handler.workspaceReadImage (cognitive 22): workspace-handler.workspaceReadImage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"886f6919df2c661ab4ee225b7266f628cdfdd50804f49ec5b0108205a6db5797"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus (cognitive 22): desktop-ipc-action-follower.createDesktopIpcActionFollower.routeExpiredHeldRequestThroughBus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1536, 1547). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c50607745f34e55304e7b7040dab4a934bee48c763aa2191fd895eb926061a"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.applyConversationStateChange (cognitive 22): desktop-ipc-action-follower.applyConversationStateChange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3318}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca0b7a8de3523af653a30b2986c4b4fdeaf896ecaa0c6079509e684d70411c4"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.broadcastConversationState (cognitive 22): desktop-ipc-live-owner.createDesktopIpcLiveOwner.broadcastConversationState has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51f567cc223eefc934cb42b1cc7013f509ba47437389d3720ed61fad00f5e58"}},{"ruleId":"D2","level":"warning","message":{"text":"session-jsonl-history.shouldSkipResponseItemForHistory (cognitive 22): session-jsonl-history.shouldSkipResponseItemForHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45c076558cd5a943a42b9f7248bbbbdcc09a6fb34528aec126fb16c4aa4625c"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.observeAppServerActivity (cognitive 22): bridge.startBridge.observeAppServerActivity has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce21356f1585402ce59775b5d05ef0e9d14f8f8120d32998f11f2ccd756129a1"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.observeAppServerActivity (cognitive 22): startBridge.observeAppServerActivity has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbfd6a0a875ccc662396b7544c2e0f3395beda1707088595bff96e91a541513"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeModels (cognitive 22): normalizeModels has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (12 pts), boolean chains 5, loops 2 (3 pts), if/else 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f86355d946b2b3e2a3b11544318819e55d2c4fbee67b97dff079b56e81e874b"}},{"ruleId":"D2","level":"warning","message":{"text":"createPushNotificationTracker.handleGoalUpdated (cognitive 22): createPushNotificationTracker.handleGoalUpdated has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, other 2, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5f6b35bf73733689b15f385eb2191a4548e0245868ce99f95c9173ee680221"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.init (cognitive 21): CodexService.init has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 7, ternaries 3. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"01e836e4f8fe29a9bbeacdb8d07c1d1304f2ab867b3f26f5ca4347a1354a7a76"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.mergedThread (cognitive 21): CodexService.mergedThread has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7edb28276d2566e744fb1909af4126a628d7e3b05c252e71905e68e8233f175"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.unwrapHistoryShellCommandIfPresent (cognitive 21): CodexService.unwrapHistoryShellCommandIfPresent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3975}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b1914b3f60e3ca47525da34054d2cc14cc4200adf0aeb707a90b3fe41c26c5"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryStringParts (cognitive 21): CodexService.decodeHistoryStringParts has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4555}}}],"partialFingerprints":{"codehealthFindingId/v1":"3073941bb7a0755feb23502bbe90099c2494bb31cb5e6ca244b64f639b9d2323"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendReasoningDelta (cognitive 21): CodexService.appendReasoningDelta has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1ed389017ff69ab0ea9f689ff2219b57fa863d9a7dcabe07800dc09a3f3cec"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleLegacyCodexEnvelopeEvent (cognitive 21): CodexService.handleLegacyCodexEnvelopeEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4910af2561e893cff5dd4de830aba2789c3d3ce3737f176582901ac7aeb9889"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeStringParts (cognitive 21): CodexService.decodeStringParts has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3301}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cf5fca43fd3aa2bc0b1a62dba50e98531a936b77ff56a809fc4cdb04e94ccb"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleItemStarted (cognitive 21): CodexService.handleItemStarted has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"edccabab0eda71c70cacf5e3ec4c2f994ecd29c43a330a54c27606e7401cdc66"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.finalizeAllStreamingState (cognitive 21): CodexService.finalizeAllStreamingState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5553}}}],"partialFingerprints":{"codehealthFindingId/v1":"6144d8272e256701f32091e7de3ef138e0877677df20aa29021a9b7a089730c4"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.syncManagedPushRegistrationIfNeeded (cognitive 21): CodexService.syncManagedPushRegistrationIfNeeded has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"db12acc4278f01c76b34a9c220a24697c53f46dc151f1cb20954e308a20dd88f"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.routePendingNotificationOpenIfPossible (cognitive 21): CodexService.routePendingNotificationOpenIfPossible has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efdea3da61ec1cb05e52666ff1b01523f73f5b9d132a30b0fa1c118f4aeea96"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.normalizeRuntimeSelectionsAfterModelsUpdate (cognitive 21): CodexService.normalizeRuntimeSelectionsAfterModelsUpdate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"afdf6970ef035df38781f25b3bd0bff0b1bee2f5b673ea6c55bc8d55615a6aea"}},{"ruleId":"D2","level":"warning","message":{"text":"RevenueCatPaywallView.bottomSection (cognitive 21): RevenueCatPaywallView.bottomSection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80cd9efa5495a71b74c08a97af1da24e801cda50b5c8c60c5290237983208ec"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingInlineMarkupAutoCloser.autoClosed (cognitive 21): StreamingInlineMarkupAutoCloser.autoClosed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/StreamingInlineMarkupAutoCloser.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f4797a3893f564218c5c1e7a54be9b194081c53ede673d18673388a04297c5"}},{"ruleId":"D2","level":"warning","message":{"text":"InferredPlanQuestionnaireParser.parseQuestionBlock (cognitive 21): InferredPlanQuestionnaireParser.parseQuestionBlock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24a04a3a6f31e1e301dc720965ea2f90a5196c9583adfd0e3602a12ed6e282d"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.fileChangeMessage (cognitive 21): TurnTimelineReducer.fileChangeMessage has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3de5a4670aaed4168e46034a2cb8ccd7f09175e98c7e868a9c3d1dc787eb1d"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineView.scheduleProgressiveTailRevealIfNeeded (cognitive 21): TurnTimelineView.scheduleProgressiveTailRevealIfNeeded has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":965}}}],"partialFingerprints":{"codehealthFindingId/v1":"956f6b33fce58e0547c30b61db6d244ee9c944ee425e9b8efdb13e9d08c75079"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService\u002BIncomingSupport.swift.unwrapShellCommandIfPresent (cognitive 21): CodexService\u002BIncomingSupport.swift.unwrapShellCommandIfPresent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"a73b9feaf82d0792f7e4f95716771d99074c48c40e27dff6fa422b73427d6ce0"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.normalizePart (cognitive 21): opencode-runtime.normalizePart has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3323d189ddb79687121508d596f4c64afc5ea391d72190524e44c0d3d51e25"}},{"ruleId":"D2","level":"warning","message":{"text":"push-notification-tracker.readCompletionTimestamp (cognitive 21): push-notification-tracker.readCompletionTimestamp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"051bac8f0c0b353e145b7ddfb8f8f28a41774c33c3afd32aba3e2a2cc23c5df2"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest (cognitive 21): bridge.createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (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":"phodex-bridge/src/bridge.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c0dafeca104c4d313aafc99da09a45ceee9be6997ea82c69e33b393df16be3"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.rememberForwardedRequestMethod (cognitive 21): bridge.startBridge.rememberForwardedRequestMethod has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 4 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f215fb2e8b9d8acd8ed6b909d5bc1072bc7ad3731799b6a5ef26c487f1bef46"}},{"ruleId":"D2","level":"warning","message":{"text":"server.handleHTTPRequest (cognitive 21): server.handleHTTPRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/server.js"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fcb307cccd3ae952c7300eeef7fcc6850dce137266782a742e370ff50852dd6"}},{"ruleId":"D2","level":"warning","message":{"text":"createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest (cognitive 21): createThreadTurnsListFastPageCoordinator.resolveCanonicalRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (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":"phodex-bridge/src/bridge.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfc1a42c808e28e2c2fa85729aa87bafe56302a60bab7b622194d7c7eb5df73"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.updatePendingAuthLoginFromCodexMessage (cognitive 21): startBridge.updatePendingAuthLoginFromCodexMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, other 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2121}}}],"partialFingerprints":{"codehealthFindingId/v1":"b089925ab44d4d9e79a821b04ba311cd351d05bd7fa1aa1ad2ab950b382e5d36"}},{"ruleId":"D2","level":"warning","message":{"text":"handleInbound (cognitive 21): handleInbound has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"af465b09da7f36395c7b285ccd24faa998e3a50488c81690d53b5e934d3788da"}},{"ruleId":"D2","level":"warning","message":{"text":"openThreadOnDesktop (cognitive 21): openThreadOnDesktop has cognitive complexity 21 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (6 pts), ternaries 5, boolean chains 3 (nesting depth added 4). Of this number, 18 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"860304f4b35df416a33bd9414bf6c84247930bdfa5b54ac7e9a0f109b38c1543"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.ensureStarted (cognitive 21): createOpenCodeRuntime.ensureStarted has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 1, error handling 1, other 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 471, 446, 436, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e49fdd699c85fac8eb16b099d53d04e115aa13eafcd641734870e35a007e48"}},{"ruleId":"D2","level":"warning","message":{"text":"forEachThreadRowInResponse (cognitive 21): forEachThreadRowInResponse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 1 (3 pts), 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":"phodex-bridge/src/thread-row-enrichment.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"cef09f699349ac7bc093288628f497abb78fffe4f3a029c4a9ab056641455cb3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.canonicalizeUniqueProvisionalTurnMappings (cognitive 20): CodexService.canonicalizeUniqueProvisionalTurnMappings has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac5c341f5db6986d8ebc7b2e76176bef0923b91e9fecdf82b8b8df9fd061b7cf"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.mergeStreamingSnapshotText (cognitive 20): CodexService.mergeStreamingSnapshotText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2860}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a4d374c0fcb2b2503387b658aa89d3ea3d3ba3cef282b765921b80d5ffe766"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.fallbackUserHistoryMergeIndices (cognitive 20): CodexService.fallbackUserHistoryMergeIndices has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3f5f7cebf351082a013ebf5b92ea1240e93133de7109755e495206acd26d0a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryFileChangeEntries (cognitive 20): CodexService.decodeHistoryFileChangeEntries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4250}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b784cfa557d2e95db65800e0dd08c9a9d48c6ce901d43ad64ced0fa51ff1c5"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.isLikelyIncomingItemPayload (cognitive 20): CodexService.isLikelyIncomingItemPayload has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2662}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf1d977e9d5c338a760936327722fc6c85f73266da1b14af2a7a550db758d41"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.performPrepareThreadForDisplay (cognitive 20): CodexService.performPrepareThreadForDisplay has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3a71b485ade29b6b48415601fd248502dfc98846f7ffc4f164487a0707e8e8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.bufferSecureControlMessage (cognitive 20): CodexService.bufferSecureControlMessage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b932f950aca2d185eecc231ae5fa3ec7b4551282fcf509a2b8658389ebe7ab2"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.openTerminal (cognitive 20): CodexService.openTerminal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, error handling 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":"CodexMobile/CodexMobile/Services/Terminal/CodexService\u002BTerminal.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"50888df24d03277a459f7f17f60865d62c0e081691519896760068be27f95c5e"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnView.composerWithSubagentAccessory (cognitive 20): TurnView.composerWithSubagentAccessory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"1965459895ee557fb9aa1efef3e138e34f9f4dea137e902c6b059c78207fa0de"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnDiffPresentationBuilder.extractPath (cognitive 20): TurnDiffPresentationBuilder.extractPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e9e67c9f8320025a15bec2b9e158637adad392855e6567af4f733c30b374f1"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnGitBranchPickerSheet.body (cognitive 20): TurnGitBranchPickerSheet.body has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Git/TurnGitBranchSelector.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8b64bcb1a475875a65ce09899d28a4084a1e1e2249d61f7951364591ee4de3"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandOutputImageReferenceParser.shellTokens (cognitive 20): CommandOutputImageReferenceParser.shellTokens has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"79981049328f8917b3cba1c32818a072d88b212f6383967dbba1cc12f5e0eabe"}},{"ruleId":"D2","level":"warning","message":{"text":"SubagentActionCard.readableStatus (cognitive 20): SubagentActionCard.readableStatus has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 7 (nesting depth added 6). 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":"CodexMobile/CodexMobile/Views/Turn/Messages/SubagentViews.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"3273cc748a5ea993a5ea23171afda09d9b8addc028e2d1b1e339088a3f0513ea"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.removeDuplicateFileChangeMessages (cognitive 20): TurnTimelineReducer.removeDuplicateFileChangeMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":1156}}}],"partialFingerprints":{"codehealthFindingId/v1":"91b9304d416dbce53bfb7a6309dc62754126cd84a9c32f333040c52df3218c47"}},{"ruleId":"D2","level":"warning","message":{"text":"push-notification-tracker.createPushNotificationTracker.handleGoalUpdated (cognitive 20): push-notification-tracker.createPushNotificationTracker.handleGoalUpdated has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d107d66ce26af29589578a2a8d332e3faaf4138f19991e2c68d7f7cd787e8d"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.updatePendingAuthLoginFromCodexMessage (cognitive 20): bridge.startBridge.updatePendingAuthLoginFromCodexMessage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2121}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f8f7e8cbc2ae8237f20897dfebe48b53b342b67b50045b58a7c2d6717072ac"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeTurnStartForCodex (cognitive 20): normalizeTurnStartForCodex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 2, 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":2860}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc881ff07fe68a34a99d96fcf308878d63d6da4bfca75a3385bf6cf94fb95351"}},{"ruleId":"D2","level":"warning","message":{"text":"sanitizeRelayHistoryTurn (cognitive 20): sanitizeRelayHistoryTurn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4670, 4696). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4661}}}],"partialFingerprints":{"codehealthFindingId/v1":"9489ce54b3f7b1986bf8ca6d7ea877eb2e776dea55e5ce444c968696ac96fa52"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcClient.dispatchEnvelope (cognitive 20): createDesktopIpcClient.dispatchEnvelope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (9 pts), boolean chains 1, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3023}}}],"partialFingerprints":{"codehealthFindingId/v1":"a078444e1c635aca6146715d2310c03a1dfaaf586d5f123e83a1c8abe2d77b4a"}},{"ruleId":"D2","level":"warning","message":{"text":"backgroundRawTurn (cognitive 20): backgroundRawTurn has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 4, other 2. Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3995}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78845b37bc7f7dd07b140628d5efb8f627734672e2a9ca7b25dc1ea668d3876"}},{"ruleId":"D2","level":"warning","message":{"text":"reduceTurnStarted (cognitive 20): reduceTurnStarted has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, other 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"267e1e3c0ab1fc73f7f068987ee147c6aba8ad5e403234be27dec9bfe88a8650"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.absorbAssistantBlockReplayCompletion (cognitive 19): CodexService.absorbAssistantBlockReplayCompletion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4864}}}],"partialFingerprints":{"codehealthFindingId/v1":"80aeaa94970908a8cf7271a9451faef27e319707a5761206c1ed9ca12bff5ae1"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.imageMergedReplayMessage (cognitive 19): CodexService.imageMergedReplayMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4947}}}],"partialFingerprints":{"codehealthFindingId/v1":"09b0dc56773b482ca82e60dcda5a8e5a1e14209715c31b467fab2809c155ae3b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.performSecureHandshake (cognitive 19): CodexService.performSecureHandshake has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b7bcdb7c26e5695c7eecd37ee90174ef1a025ded422428499e1d45770c17a2e"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.userFacingTurnErrorMessage (cognitive 19): CodexService.userFacingTurnErrorMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 3, 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2178}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddaa575ab62328ccb3b11bebe2056b10adcd0bd84cb58cd053c3db995850a608"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeSkillMetadata (cognitive 19): CodexService.decodeSkillMetadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3103}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f88fc40f31ecd08dd38a69903e54eb6bd808228e4007efdf4cf0c9b7b23731"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.classifyVoiceFailureMessage (cognitive 19): CodexService.classifyVoiceFailureMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"d896530f459531383f2781eb582b7a9caf81226b1b76b4af5c246dd72efc20d4"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnDiffRenderingPolicy.section (cognitive 19): TurnDiffRenderingPolicy.section has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d869610d25975b953b355ea8eb7f9a27434e2322a4fd5e7b52f95a7599e6fe"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineReducer.mergedUserMessage (cognitive 19): TurnTimelineReducer.mergedUserMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"7721e073d42171b71b5cbe6bd60ccb4273fd08e47b2571d91fd22f4600627776"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnTimelineRenderProjection.finalAssistantIndexByTurn (cognitive 19): TurnTimelineRenderProjection.finalAssistantIndexByTurn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d6d1ae216f997de3716f521ea14e7a770a5f6e450165cbf72735e974d7872bd"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.listAllSessions (cognitive 19): opencode-runtime.createOpenCodeRuntime.listAllSessions has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 3 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8eb8d8bfe91276039625d64b41078e5593449310a9efa0a539141b9221bec5"}},{"ruleId":"D2","level":"warning","message":{"text":"account-status.composeAccountStatus (cognitive 19): account-status.composeAccountStatus has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/account-status.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"68739643cd08211d8d0abebc03f7e13b037ccbea82825d29c7496784bbc17965"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcClient.dispatchEnvelope (cognitive 19): desktop-ipc-action-follower.createDesktopIpcClient.dispatchEnvelope has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3023}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb00f5e1439d18f29d0ce395ed60273d02aa99ddf4321bc55795e32b8d38d35"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.createThreadTurnsListFastPageCoordinator.extendCanonicalResponseThroughAnchor (cognitive 19): bridge.createThreadTurnsListFastPageCoordinator.extendCanonicalResponseThroughAnchor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c9d1ffc7b605785c0228ba988d8e6686352d3d2f59cd99ae09767eb4887a88"}},{"ruleId":"D2","level":"warning","message":{"text":"createThreadTurnsListFastPageCoordinator.extendCanonicalResponseThroughAnchor (cognitive 19): createThreadTurnsListFastPageCoordinator.extendCanonicalResponseThroughAnchor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c84c4fba42f434cbebebbfa360c2f5fa9da5ad93d5ab5f6e486056127c95ad0"}},{"ruleId":"D2","level":"warning","message":{"text":"sanitizeThreadHistoryImagesForRelay (cognitive 19): sanitizeThreadHistoryImagesForRelay has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (6 pts), if/else 4, other 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3723}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e89ce407ceee4d824e0a78187d70933283f7ce16b039732a7fe59470a130e07"}},{"ruleId":"D2","level":"warning","message":{"text":"trimTurnsListPayloadForRelay (cognitive 19): trimTurnsListPayloadForRelay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), other 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5230}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b38777987e2d8df2acfcc69dbdf94440aedfe108f06d5b92dd63ecf9ac2d69"}},{"ruleId":"D2","level":"warning","message":{"text":"gitCreatePullRequest (cognitive 19): gitCreatePullRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 3 (4 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf172f282cb4dfc9da0a5ff999174dbcef8649d2c85d85e042db30507e9f52d"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeTurns (cognitive 19): normalizeTurns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb919a247a377e0b5e73d4f83e77e97b09ffddc7623cddf190d35ec85b48ac9"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.listAllSessions (cognitive 19): createOpenCodeRuntime.listAllSessions has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 3 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"0630d6703a2209c92a5dd5efc264372785de051dbe0839115c8cd88cbb58d927"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.scheduleSidebarPrewarmIfNeeded (cognitive 18): ContentView.scheduleSidebarPrewarmIfNeeded 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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1497}}}],"partialFingerprints":{"codehealthFindingId/v1":"9918f8bfee711e6fb6f881b64170cc65188ee3dd966fdc22068ea04b50d9ea86"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.scheduleAsyncAnswerVerification (cognitive 18): CodexService.scheduleAsyncAnswerVerification has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 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":"CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f41e0b4ce60e4da3ace6bef1782615f4c3f8532de9e58ae93ad0d8d75787434"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.incompatibleBridgeAppVersionError (cognitive 18): CodexService.incompatibleBridgeAppVersionError has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd71d8dddf325008c66373d5940debe725de24e718f9fe56978ac3142b898e9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart (cognitive 18): CodexService.existingMessagesForCanonicalSourceReplacement::hasCanonicalCounterpart has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CodexService.existingMessagesForCanonicalSourceReplacement) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eacd17f81ad8cc75f4bf7757543a5c097f1d74ff66cd760f18653f49ca02645"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryFlattenText (cognitive 18): CodexService.decodeHistoryFlattenText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4511}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6e4218a9a4ed5703c1cdeb084a773fd3d8641fcd84eac41b0988127c0aeea1"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeFileChangeEntries (cognitive 18): CodexService.decodeFileChangeEntries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3028}}}],"partialFingerprints":{"codehealthFindingId/v1":"d146feb56422281c0c7b42bef7d780a1c3a64d985d2945a33f0b05c4b74caf0a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.migrateMacScopedState (cognitive 18): CodexService.migrateMacScopedState 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":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d3f9a06d5d8a32d1488357ed5d0c5fa2c82093618b39865f3b2395c7fbc99e"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.preparePlanItemIdentityForUpsert (cognitive 18): CodexService.preparePlanItemIdentityForUpsert has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f2cc0752424dcb416465a02ea5a2b6a30c4b8834aca9e76547c52a103daf695"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.applyLateTerminalAssistantDelta (cognitive 18): CodexService.applyLateTerminalAssistantDelta has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3950}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c267c5b3f312a837372f28a298cec24d7053eae406d135edccf799111967409"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.turnStateSnapshot (cognitive 18): CodexService.turnStateSnapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3415}}}],"partialFingerprints":{"codehealthFindingId/v1":"a937670e9c6f43d7c24bb7f37272bd577d3caf62cddc728dde39b1644ed4fb29"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.receiveNextMessage (cognitive 18): CodexService.receiveNextMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"e607a3f6bffc96d7f9b97cf0c90cb750286f19f5e205d64468fd2e84daf052fe"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.parseManualWebSocketFrame (cognitive 18): CodexService.parseManualWebSocketFrame has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 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":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"a84391180f77f650248f6220180dba3adf1ed60755cd4a71feca651530dc6ce1"}},{"ruleId":"D2","level":"warning","message":{"text":"RemodexTerminalSnapshot.applyTerminalEvent (cognitive 18): RemodexTerminalSnapshot.applyTerminalEvent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Terminal/RemodexTerminalModels.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4640f8fd0a67583e8b748af92c6ed923c67169bf5d95310c7e802173a2f0fc8b"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentViewModel.trustedReconnectResolution (cognitive 18): ContentViewModel.trustedReconnectResolution has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"789047f5eddfa0b9ad947562d6111576f067a6f1accd1f03de39d3312782f593"}},{"ruleId":"D2","level":"warning","message":{"text":"UserBubbleCollapsedMarkdownPreview.truncatedPreview (cognitive 18): UserBubbleCollapsedMarkdownPreview.truncatedPreview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/UserBubbleInlineMarkdownText.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e5f18fc82d51ab09df62ba6d035d222aa8b77efae1c54ff40c3d0d36519bba"}},{"ruleId":"D2","level":"warning","message":{"text":"UserBubbleMentionExtractor.skillInlineResult (cognitive 18): UserBubbleMentionExtractor.skillInlineResult has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/UserMessageBubble.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"178f24ea4429dee658148e8e45418f6300c92ec7e21c86bcec43c0e4c31b5d17"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-shared.sanitizeUserRoleItem (cognitive 18): desktop-ipc-shared.sanitizeUserRoleItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d3a48fb67a406259b935149f0fa7aba4ff763e1d288975505d81e8ead346f5"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-live-mirror.toolOutputNotifications (cognitive 18): rollout-live-mirror.toolOutputNotifications has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 2). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"e963defa8df7a60fae84044d9924d9401d759002aa78b477c7adff5dce41d785"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-projector.diffTurnLifecycle (cognitive 18): desktop-ipc-conversation-projector.diffTurnLifecycle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44cbd5a688ff07dd55d134cebddb198df8a4ccc3d897098b554d1ae569c14b2"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.negotiateResumeOwnership (cognitive 18): desktop-ipc-action-follower.createDesktopIpcActionFollower.negotiateResumeOwnership has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"964c1d5b11bc9de37fc8f83baa5a43859e7aa74cd78d80ed8d6ee0958d557f3f"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.negotiateResumeOwnership (cognitive 18): createDesktopIpcActionFollower.negotiateResumeOwnership has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"c205d2588a07952bd55b2b2ec6d2f53428dce7d7fd837534db3c85c246627fbf"}},{"ruleId":"D2","level":"warning","message":{"text":"reduceItemLifecycle (cognitive 18): reduceItemLifecycle has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 3, other 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e72f5b7f21a469521bb31285a1bf56086d27529222838a2c8fb14f08c54139"}},{"ruleId":"D2","level":"warning","message":{"text":"requestTranscription (cognitive 18): requestTranscription has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 4, error handling 2 (nesting depth added 2). Of this number, 9 points are the body\u0027s own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c9171a1104aabcc4005e7e64b11f2590d1dbb97ee51799b0511ade997da42e7"}},{"ruleId":"D2","level":"warning","message":{"text":"AIUnifiedPatchParser.extractPath (cognitive 17): AIUnifiedPatchParser.extractPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8a5c307daebae86a768b31ae662be0bbecb8a39bfbdbd4e005755f02b95d28"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.receiveErrorDisposition (cognitive 17): CodexService.receiveErrorDisposition has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"56e76de0e8923e70cb7c0febb985ea8522f6885a74bd2db10e4394bf7ff5ea13"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.upsertSubagentIdentity (cognitive 17): CodexService.upsertSubagentIdentity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"46d01d1e78168939d94d1448d33d86c08d8f30bf303b4661332ca7a11b750502"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeImageAttachments (cognitive 17): CodexService.decodeImageAttachments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"c057a0535ebe8beb429c59a26b89060b75ab803d6cddf677dd63dfc872f26612"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.historyMessagesMergingGeneratedImageArtifacts (cognitive 17): CodexService.historyMessagesMergingGeneratedImageArtifacts has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3299}}}],"partialFingerprints":{"codehealthFindingId/v1":"2021075dbfcaa106d601b7379caf6fcc34a63d379e5da3e8f1835616542116ae"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryFirstString (cognitive 17): CodexService.decodeHistoryFirstString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4444}}}],"partialFingerprints":{"codehealthFindingId/v1":"989aba6200232027222d0dcf3bfb0403b84d4b9726460ec64daad41dd618fb0a"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendToolCallDelta (cognitive 17): CodexService.appendToolCallDelta has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a8dff9b0add5940c5aa63ca3be840c6c0ee9e26f0622116bcd1c06473e3cba"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendGeneratedImageReference (cognitive 17): CodexService.appendGeneratedImageReference has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4611}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ed746721ce3dcb03c4c84812d07dd4bf38aa00449b2edd2f62a6370946770b7"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.setForegroundState (cognitive 17): CodexService.setForegroundState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"850a462a382d5845ede753025bdbda6ae97916a36d46bc6b94d44fc22737ddb9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleThreadForkResponse (cognitive 17): CodexService.handleThreadForkResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c4371f06c0b88f233c80bf21a7f1e248ed210164b61297cff400f361b990122"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnComposerInputTextView.updateUIView (cognitive 17): TurnComposerInputTextView.updateUIView has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"8362b269b43521c890ae0d8f855ed4bf19e32f3d3c341aef982e890f631d29fb"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.canRestoreSavedLocalDraft (cognitive 17): TurnViewModel.canRestoreSavedLocalDraft has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4, loops 1, match/switch 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"43bdc6563b9e5d43c49406b29ba494bb981fb09d456d2b361e21e49984e7550f"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.trailingFileToken (cognitive 17): TurnViewModel.trailingFileToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2532}}}],"partialFingerprints":{"codehealthFindingId/v1":"5adfbb1910b030f43c922a5bb050762ac6b2f16dce38a29af68ec25ee0b9067c"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantMemoryCitationParser.updateInlineBackticks (cognitive 17): AssistantMemoryCitationParser.updateInlineBackticks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 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":"CodexMobile/CodexMobile/Views/Turn/Messages/AssistantMemoryCitationParser.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd04d17147565c749c5a91196f95f97d271b4d59c32e1953ecea542f405b8fcb"}},{"ruleId":"D2","level":"warning","message":{"text":"AsyncUserInputCardView.body (cognitive 17): AsyncUserInputCardView.body has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 4 (5 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/AsyncUserInputCardView.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d347269997f215996085c013b24352d0734cd17848f918ea7aefb331825ee91"}},{"ruleId":"D2","level":"warning","message":{"text":"rollout-live-mirror.processAwaitingCoherentBoundary (cognitive 17): rollout-live-mirror.processAwaitingCoherentBoundary has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc5954244c4e7b51b9b3c4b357920d9e47de730b2a4d40cba85502ed9d83949"}},{"ruleId":"D2","level":"warning","message":{"text":"thread-activity-projector.projectDesktopThreadActivity (cognitive 17): thread-activity-projector.projectDesktopThreadActivity has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 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, 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":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"0596eeba60a0fc6b232d83d93427d3d2bc42831c133e98d91c32e85a52c96e7e"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-conversation-projector.matchDesktopTurnIdentityContinuities (cognitive 17): desktop-ipc-conversation-projector.matchDesktopTurnIdentityContinuities has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 3 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 4 function items inside it that branch (applyMaximumMatchesForScore::tryAssign, applyMaximumMatchesForScore, a function literal at line 906, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"b77b5f63fa8487e8bff6d8c3bc8784f3f4a051523fb52cf8a688b5cf0752a576"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.boundedIndexedDesktopLiveTurns (cognitive 17): desktop-ipc-action-follower.boundedIndexedDesktopLiveTurns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 3, ternaries 2 (nesting depth added 3). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3741}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3f14b972934c4abc6a6becd164c3718e93e684bd823fc288eb79e8783a760a8"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides (cognitive 17): desktop-ipc-live-owner.createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed2ebe78c0f08c88c1d2eaea5fe4398e4e2cbd68ab0795406c4f5867c5f1d4d"}},{"ruleId":"D2","level":"warning","message":{"text":"session-jsonl-history.parseSessionJsonlMetadata (cognitive 17): session-jsonl-history.parseSessionJsonlMetadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"789fc5bf4bb42092fcce0b30c662b2731cadaf1abaa79bdc2b028d5c4f63d22a"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.startBridge.maybeBuildJsonlThreadTurnsListFallback (cognitive 17): bridge.startBridge.maybeBuildJsonlThreadTurnsListFallback has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 4, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca9eec6b590fda4c58b35d6d6aa98ea55185722d7a0cddaa56433317f323706c"}},{"ruleId":"D2","level":"warning","message":{"text":"bridge.sanitizeLiveUserNotification (cognitive 17): bridge.sanitizeLiveUserNotification has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (7 pts), boolean chains 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":4755}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2881cd2dbbf879db3cebd1c91329ed40639acf45a0185d86472302af1736ee9"}},{"ruleId":"D2","level":"warning","message":{"text":"startBridge.maybeBuildJsonlThreadTurnsListFallback (cognitive 17): startBridge.maybeBuildJsonlThreadTurnsListFallback has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 4, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32c8b07da2d50ce925350c76bc4664ff4c15e7b4d0b8d506232b57c41193a58"}},{"ruleId":"D2","level":"warning","message":{"text":"truncateHistoryItemTextForRelay (cognitive 17): truncateHistoryItemTextForRelay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 4). Of this number, 11 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5379}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab601bd2ebdff439a184bc09a9fde82a98ed872b197fa891e6b4389eebdebea"}},{"ruleId":"D2","level":"warning","message":{"text":"handleOutbound (cognitive 17): handleOutbound has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, other 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":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd66f5752f3526052d39d8a0e41d4f31baa199cdb234a92330ace20e606554bc"}},{"ruleId":"D2","level":"warning","message":{"text":"handleDesktopMethod (cognitive 17): handleDesktopMethod has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), other 4, match/switch 1 (nesting depth added 2). 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":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"55fa9f2ccc1853c5fb980dd482730b69f8407939397eaa15be40da571bd4edd8"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides (cognitive 17): createDesktopIpcLiveOwner.mergeFollowerRuntimeOverrides has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5a1568a16a447bc6da6f363ac1712f791a210cac6d3c587a95923609e8b6d0"}},{"ruleId":"D2","level":"warning","message":{"text":"buildThreadReadStateContext (cognitive 17): buildThreadReadStateContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, other 3, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd7701e14219bc7c17ed97a380852a8ff8cb0335b1ba31a01d02d3b2361e45c"}},{"ruleId":"D2","level":"warning","message":{"text":"observedTaskStartedTurnIDs (cognitive 17): observedTaskStartedTurnIDs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1, other 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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"58210c91d354fc74a539e9d71707cffeb1c7475456361f2883821431c87b1e69"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeBridgeGPTAccountSnapshot (cognitive 16): CodexService.decodeBridgeGPTAccountSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d6ec6b8692589b8cc8db3fea5218e78ec9a453e19ba15258c4146d7930e6ba9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.connect (cognitive 16): CodexService.connect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c279dd68beafe2389cd212c47f7a8aa23a205f0d8d6b2c7b232089a874cfa65"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.flushPendingRuntimeOptionRefreshIfPossible (cognitive 16): CodexService.flushPendingRuntimeOptionRefreshIfPossible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"8078a3ea5f93b720ba0df5f800a645735ebf90701e7b6972d341d76d801e8297"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.healExactDuplicateProviderRows (cognitive 16): CodexService.healExactDuplicateProviderRows has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (6 pts), loops 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1649}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d4398b9c1b6056623a98a6b015b346198d952dd41be20251a1f2418daff286"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryTimestamp (cognitive 16): CodexService.decodeHistoryTimestamp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1971}}}],"partialFingerprints":{"codehealthFindingId/v1":"a159b02ac022267be8c3397b6d3c74bc065e2f0dcc386cec4c1100d6be3317d4"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.uniqueAssistantHistoryTextMergeIndex (cognitive 16): CodexService.uniqueAssistantHistoryTextMergeIndex has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2750}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad56254af1de02228d5775223b38c8bef22979797d4c0409e66bc5b729e6a4a8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.decodeHistoryFirstValue (cognitive 16): CodexService.decodeHistoryFirstValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4482}}}],"partialFingerprints":{"codehealthFindingId/v1":"98d622f20fc09ecb412324a71ccd6033bd91c75d9bda699c612f1dcc62c2ae45"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.handleServerRequest (cognitive 16): CodexService.handleServerRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, error handling 1 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"1605c8e8928450d48bf19e67a15d024fe8b1ec7e9c4c67cf56ee30b137f8f23b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.appendThinkingActivityLine (cognitive 16): CodexService.appendThinkingActivityLine has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2528}}}],"partialFingerprints":{"codehealthFindingId/v1":"823351417b479012c4a2048f1ff44fe02a02391e562daa85c6e8d4c806dd89e8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.toolActivityTargetIndex (cognitive 16): CodexService.toolActivityTargetIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2643}}}],"partialFingerprints":{"codehealthFindingId/v1":"004ad66e77dd9b98fecf0626d34be94e88f5333b879fefcfc0cf6b16c3f213c5"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.mergeGeneratedImageArtifactsIntoAssistantMessage (cognitive 16): CodexService.mergeGeneratedImageArtifactsIntoAssistantMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4725}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d447a68caaeb8d1891211c3f6fd939e80bd4128393e71888f132bbb7f39adc"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.flushPendingAssistantDeltas (cognitive 16): CodexService.flushPendingAssistantDeltas has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5852}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e6effbf04389a4d5a041c0d0d17f393477a4eb41bfbc17dfb0a8ad852457e47"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.resetSecureTransportState (cognitive 16): CodexService.resetSecureTransportState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 4 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79095d0feace4d89091f8b4c39a26ec18702b4bfad9f0b10342b139ccb351d8"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService.buildTurnStartRequestParams (cognitive 16): CodexService.buildTurnStartRequestParams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2607}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c7d18e98a36a2b803d7a28eb9c9d50ffe80816f8524ba9ddefd1a5d5cc26b6"}},{"ruleId":"D2","level":"warning","message":{"text":"PetCompanionStore.loadSelectedPet (cognitive 16): PetCompanionStore.loadSelectedPet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/PetCompanionStore.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"725dd64f3409e549d2c68f494117333ca958fcdcd45198acda40a9cd2fc267b2"}},{"ruleId":"D2","level":"warning","message":{"text":"SidebarActivityRowContent.body (cognitive 16): SidebarActivityRowContent.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarActivityRowContent.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d688740718c4db87784beba0d8823eb1153c1ed98fa8b3609188e2e5de6e6e"}},{"ruleId":"D2","level":"warning","message":{"text":"FileAutocompletePanel.body (cognitive 16): FileAutocompletePanel.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f926b993a8e5721b0e1ff476266adbfc2f7fc05268a88258d8cdfa033edd9165"}},{"ruleId":"D2","level":"warning","message":{"text":"NewChatDraftView.draftContextRows (cognitive 16): NewChatDraftView.draftContextRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8cd6804f3763b519d3994a415e2ce9ce5c47a569795d2cd6bf13814e1fe28d6"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.onInputChangedForFileAutocomplete (cognitive 16): TurnViewModel.onInputChangedForFileAutocomplete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab885e44785dad596bd75296cbca2ccf4ffa4a54d2c9e97e1005fdd4c535888"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnViewModel.hasClosedConfirmedFileMentionPrefix (cognitive 16): TurnViewModel.hasClosedConfirmedFileMentionPrefix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2452}}}],"partialFingerprints":{"codehealthFindingId/v1":"37ac042916f4c80aaa27e638ba95c1b7e36cc1ab33ebcfe215dc67b4fb88a7c2"}},{"ruleId":"D2","level":"warning","message":{"text":"InferredPlanQuestionnaireParser.parse (cognitive 16): InferredPlanQuestionnaireParser.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, 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":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"54fa11c0a289e84bb20b72c2b8efecd0183d839fb6a9ca53c3ff8496a3c02a5b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexService\u002BIncomingSupport.swift.firstValue (cognitive 16): CodexService\u002BIncomingSupport.swift.firstValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6103609e4b5db3bf6f8c8ee83af6bbbe4d79a1cafac579621b612d3e7e4f9844"}},{"ruleId":"D2","level":"warning","message":{"text":"QRScannerPairingValidator.swift.validatePairingQRCode (cognitive 16): QRScannerPairingValidator.swift.validatePairingQRCode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 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":"CodexMobile/CodexMobile/Views/QRScannerPairingValidator.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5da83886c0bc181a8685dc0fa6572df7bbe3629b24406d59307a1c2ed1bc26"}},{"ruleId":"D2","level":"warning","message":{"text":"opencode-runtime.createOpenCodeRuntime.startEvents (cognitive 16): opencode-runtime.createOpenCodeRuntime.startEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 951, 965). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6f4b763b56405ac851708eb4df1e880a509b11d9fdae00e28d4ba3886f983f"}},{"ruleId":"D2","level":"warning","message":{"text":"workspace-handler.analyzePatchChunk (cognitive 16): workspace-handler.analyzePatchChunk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 1 (nesting depth added 2). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea4ae4337444d69a63b37b237253a23b0e0d228a59c18340f7f6369b132e96e"}},{"ruleId":"D2","level":"warning","message":{"text":"secure-transport.createBridgeSecureTransport.handleClientHello (cognitive 16): secure-transport.createBridgeSecureTransport.handleClientHello has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"365973b4f858e8045d82ab72de6a1cce920ed0a8b8b4d8ec428d830dacff3c3b"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-shared.sanitizeUserInputEntries (cognitive 16): desktop-ipc-shared.sanitizeUserInputEntries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f032e4fabef3019b07a922c0e71b81f8b67ec7a5f0837d25562a9ca67b5f5af"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-action-follower.createDesktopIpcActionFollower.releaseHeldFollowerRequests (cognitive 16): desktop-ipc-action-follower.createDesktopIpcActionFollower.releaseHeldFollowerRequests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"9affd033474288feb3e3a6ffe640f1b396dbf4274bf2d53b59d3b36f050c2ec0"}},{"ruleId":"D2","level":"warning","message":{"text":"desktop-ipc-live-owner.createDesktopIpcLiveOwner.handlePeerBroadcast (cognitive 16): desktop-ipc-live-owner.createDesktopIpcLiveOwner.handlePeerBroadcast has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd4b821e362c42f646c2dfe347dca468a78a1c044fc3b1b86b36b2a52d895846"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.releaseHeldFollowerRequests (cognitive 16): createDesktopIpcActionFollower.releaseHeldFollowerRequests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c134bfe85e89e08fff1eddbe2a9310e28de7a0ff06e7cc72be7329d2abe8eb"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcActionFollower.buildDesktopFollowerRoute (cognitive 16): createDesktopIpcActionFollower.buildDesktopFollowerRoute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2364}}}],"partialFingerprints":{"codehealthFindingId/v1":"404175667432afa9acbf68a87bf6a966b103f5002ef39556fc234e7bd6ffa939"}},{"ruleId":"D2","level":"warning","message":{"text":"desktopFollowerPayloadForResponse (cognitive 16): desktopFollowerPayloadForResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, other 3 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3135}}}],"partialFingerprints":{"codehealthFindingId/v1":"3996a980cbc6900d91067aeaee5b6e2702b7152a037fe4f8ffc0992ffd9b6fc7"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.markThreadReadByPhone (cognitive 16): createDesktopIpcLiveOwner.markThreadReadByPhone has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1 (nesting depth added 1). Of this number, 8 points are the body\u0027s own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf23fd1989d687ee290ff7e066b849ff7d57ae79dc6ad68a5dfdd0819f1eb75"}},{"ruleId":"D2","level":"warning","message":{"text":"createDesktopIpcLiveOwner.handlePeerBroadcast (cognitive 16): createDesktopIpcLiveOwner.handlePeerBroadcast has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f74e422a3c52a78615ee266be5094b13effea3397426fa2193563144b6f702"}},{"ruleId":"D2","level":"warning","message":{"text":"gitTransferManagedHandoff (cognitive 16): gitTransferManagedHandoff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, other 4, boolean chains 3, error handling 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c5bc45ebcafebff23a3ba5138acb5a30d356d250b14a6601be8046ba5ee9003"}},{"ruleId":"D2","level":"warning","message":{"text":"gitRemoveWorktree (cognitive 16): gitRemoveWorktree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 3 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bdc752466b3e0e8b9364bda3a9206081cf6aa5c9ba8fee71f83365eb7ed137a"}},{"ruleId":"D2","level":"warning","message":{"text":"createOpenCodeRuntime.startEvents (cognitive 16): createOpenCodeRuntime.startEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 951, a function literal at line 965, a function literal at line 956, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"48eccf7b4b944640ce8d04405d4557fbaf46546be101006daa046195e57859de"}},{"ruleId":"D2","level":"warning","message":{"text":"createBridgeSecureTransport.handleClientHello (cognitive 16): createBridgeSecureTransport.handleClientHello has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"428a6976da40e261f8bcdf08c5c4316a8ad55333227b668b730ba0d1b5c880f7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CodexService: TooManyMethods \u2014 1345 methods, declared across 38 files: Services/CodexService\u002BMessages.swift (204), Services/CodexService\u002BHistory.swift (135), Services/CodexService\u002BThreadsTurns.swift (126), Services/CodexService\u002BIncoming.swift (124), \u002B34 more file(s). The bar is 30 methods; this is 1315 over it, 44.83\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c589907f1072a5f13b1738948bdbe0e395ded7115ac24a35c0d6341cc24dbb3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-action-follower.createDesktopIpcActionFollower: FunctionTooLong \u2014 createDesktopIpcActionFollower runs 1765 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1665 over it, 17.65\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"91db59ff88a8f54f90c1962570a75f0ad115eb66225b660b7bdd974b228393eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: bridge.startBridge: FunctionTooLong \u2014 startBridge runs 1290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1190 over it, 12.90\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"26dceb738ebb7d8daecd25b32d8914b889cebd5c636acd126edb99c71c5ab334"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-live-owner.createDesktopIpcLiveOwner: FunctionTooLong \u2014 createDesktopIpcLiveOwner runs 1282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1182 over it, 12.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90b3149ccb3acee2ac79c0b3f55d263134ec7d26e5c1ccc86a9bb90d0bcd58f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BMessages.swift: FileTooLong \u2014 4804 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4304 over it, 9.61\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a14fca75c2937cbe62c186366bcc5fbd8309370772fed7624f82cfa9a4bf3a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: git-handler.tokenizeThreadTitleWords: FunctionTooLong \u2014 tokenizeThreadTitleWords runs 884 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 784 over it, 8.84\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"04440fd5f05d527bb370e67aeab324ebbecdd21a13b8ca5b670e840054b8f1de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/bridge.js: FileTooLong \u2014 3898 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 3398 over it, 7.80\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ea66a597dd51732d4df1ea71dfbbadeefd5da38bd40b7543a0496459fd97af"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BHistory.swift: FileTooLong \u2014 3189 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2689 over it, 6.38\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4fd12353440e4b7382538c4fb28e2f2e9211ea98fc5ecec681cf064ce9e78f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TurnViewModel: ClassTooLong \u2014 2357 significant lines (blank, comment-only and punctuation-only lines excluded), 159 methods. The bar is 400 significant lines; this is 1957 over it, 5.89\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"0edf1b1388e90836f3fc7cbb4b7ee094cee9ceefcb9289a0581b7d9572a1777a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/desktop-ipc-action-follower.js: FileTooLong \u2014 2919 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 60% of them inside a single declaration: createDesktopIpcActionFollower (240-2836). The bar is 500 significant lines; this is 2419 over it, 5.84\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe14e3ca7dc03927577312d4cb6e3a158013471cc2a199f8efa82a847c200247"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TurnViewModel: TooManyMethods \u2014 159 methods. The bar is 30 methods; this is 129 over it, 5.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0904dc89dc96c4c8ec194c6ed0327c952e342a84e78b44359c8d4fe0bc5a68"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BIncoming.swift: FileTooLong \u2014 2641 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2141 over it, 5.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"15467623308ca2a92dc56604e799f7dc44b17ec3e1db9a9e8e54955a0dbd5829"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: secure-transport.createBridgeSecureTransport: FunctionTooLong \u2014 createBridgeSecureTransport runs 523 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 423 over it, 5.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7769cef471ad72491291d178d6026938e8a1e6675ce82297d5cd2854c990e68d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Core/TurnViewModel.swift: FileTooLong \u2014 2556 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: TurnViewModel (166-3635). The bar is 500 significant lines; this is 2056 over it, 5.11\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4007a01a88e7618d5659b09ae079240e2604556c60b13bc5da8c45bda805cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BThreadsTurns.swift: FileTooLong \u2014 2417 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1917 over it, 4.83\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9476a48ed0f386b9e516873c151a02ff58565396b4bdbd7dbed071ce2bf04510"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnView.body: MethodTooLong \u2014 body runs 417 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 317 over it, 4.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"b88ed64781be377103696327b19ca98b3da2dbb60d07f79cb40525b8f138b4e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/git-handler.js: FileTooLong \u2014 2043 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1543 over it, 4.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"072673885a2fb23ea39bf2c31081c03079df44e01676dd0eb979031f2caa6228"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.completeAssistantMessage: MethodTooLong \u2014 completeAssistantMessage runs 353 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 253 over it, 3.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4013}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7651b37557569ad72f9a95d7c68d7d0e5ca9a74cb66f983cabd1ca463be009c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ContentView: ClassTooLong \u2014 1408 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 1008 over it, 3.52\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"4264e7fd7ac55a26f93e8ea22862e5d917db15701584aba20820777686814ba9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: push-notification-tracker.createPushNotificationTracker: FunctionTooLong \u2014 createPushNotificationTracker runs 348 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 248 over it, 3.48\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd7ae4b1bc92a33a3aaea78eebe565fb1854b01bf377c3b8bb76fa16d5fdc20"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.mergeHistoryMessages: MethodTooLong \u2014 mergeHistoryMessages runs 337 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 237 over it, 3.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e04ed3347a738ef9e8748a0a62c3785a20223dd0a72ea3d672c2d79fc6ee920"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.loadThreadHistoryIfNeeded: MethodTooLong \u2014 loadThreadHistoryIfNeeded runs 330 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 230 over it, 3.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"43185bbec7ef6c62ad83d5f5ecdf029411f53bbe3143334864cd65b874c374bc"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TurnView: ClassTooLong \u2014 1289 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 889 over it, 3.22\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64b682fdf5ae5d99f2de8a717438d53443f2f05504cc0479fe4248c126a4818"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/rollout-live-mirror.js: FileTooLong \u2014 1530 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1030 over it, 3.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2667eeabda242b12b18532f37a09a256d38717cac9d84cf070fff4a50f2ed770"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/desktop-ipc-live-owner.js: FileTooLong \u2014 1506 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 85% of them inside a single declaration: createDesktopIpcLiveOwner (138-1994). The bar is 500 significant lines; this is 1006 over it, 3.01\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"159650b13d2520418904f91a39d262f0cf0b2c26c965dc92bc4e75d1ee9f203a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GhosttyTerminalView: TooManyMethods \u2014 89 methods. The bar is 30 methods; this is 59 over it, 2.97\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"35ffdb3d21f8ab6ca94cf117a4ab33349aa80a429d7724faaf39a4b6d2a05655"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: CodexMobile/ContentView.swift: FileTooLong \u2014 1469 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ContentView (45-2207). The bar is 500 significant lines; this is 969 over it, 2.94\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcf6d6f7d78e123b10a146915e5050b8e7e86fe1665a2c7ee5ce2ca5d76c1e5a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-owner-transport.createDesktopIpcRouterServer: FunctionTooLong \u2014 createDesktopIpcRouterServer runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e09784cba3d6dbb76b8861f9e8b62c9013d97e856a69242b7fd775c9f145521"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnComposerHostView.body: MethodTooLong \u2014 body runs 278 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 178 over it, 2.78\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce282e07e89e7a98ce68f665d184ac751612aa383f7b3fb5d76867edb3e8d7bd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.upsertStreamingSystemItemMessage: MethodTooLong \u2014 upsertStreamingSystemItemMessage runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2692}}}],"partialFingerprints":{"codehealthFindingId/v1":"d879502b9f37302cfcd6ee01de157b8d68d26e8413b97763e48039edff7d9f9f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ContentView: TooManyMethods \u2014 79 methods. The bar is 30 methods; this is 49 over it, 2.63\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c84b2d5c2297ff0848683613753f50d55c3a899ad26e0c99f14b054bb15772"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.decodeMessagesFromThreadRead: MethodTooLong \u2014 decodeMessagesFromThreadRead runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa22cde415b7da4cc95ae43f0517103c70ecce142b29de87309fa36606f8eb22"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Core/TurnView.swift: FileTooLong \u2014 1301 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: TurnView (18-1870). The bar is 500 significant lines; this is 801 over it, 2.60\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7bcc4259f2ee9587fc9f63dda85a45c88655954e9d9e3ff74a6088db8372df2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GhosttyTerminalView: ClassTooLong \u2014 1023 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods. The bar is 400 significant lines; this is 623 over it, 2.56\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cea52e350e5653176349ff3bc6af08ca5f49b6c728d2dd9ad375f95a7d9400"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: bridge.createThreadTurnsListFastPageCoordinator: FunctionTooLong \u2014 createThreadTurnsListFastPageCoordinator runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0914f574416e378f3f2a954e509a06c68e885d15aba1f72507172e25aed93b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-conversation-adapter.applyAppServerMessageToConversationState: FunctionTooLong \u2014 applyAppServerMessageToConversationState runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc1fc807a033629f756304e9216d028c63d00a90bd86f9c09f258dfe951a65d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Terminal/GhosttyTerminalView.swift: FileTooLong \u2014 1210 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: GhosttyTerminalView (288-1756). The bar is 500 significant lines; this is 710 over it, 2.42\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a5da85143daa6fa05f1069d7e15a9b9b40270bf8be90cfbb5cd924edbbb1718"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-owner-transport.createDesktopOwnerIpcClient: FunctionTooLong \u2014 createDesktopOwnerIpcClient runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b365b566017cb2ae581d95281a8cf3233c48e306558ec90df4a33a9743ba57"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/session-jsonl-history.js: FileTooLong \u2014 1153 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 653 over it, 2.31\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"74219c8b5a29af89ae7ef7a4587293a1de4ccf3793c514d8f9616463484cceef"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/desktop-ipc-conversation-adapter.js: FileTooLong \u2014 1115 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 615 over it, 2.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba921e3236234da3606aa09cad011a19ab004de2bc0d2e792b1c414333f7aa8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TurnTimelineReducer: ClassTooLong \u2014 877 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 477 over it, 2.19\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf979a9724ddee9e6f2a7c1ac83c400c634f8ff94ffa0be90179e2eac7439c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/opencode-runtime.js: FileTooLong \u2014 1087 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 587 over it, 2.17\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c17d8cafb25cd52f99297ac429e356cdffb86cd2fd93a10ae28a2302334c53"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TurnTimelineView: TooManyMethods \u2014 65 methods, declared across 2 files: Timeline/TurnTimelineView.swift (49), Timeline/TurnTimelineBlockAccessories.swift (16). The bar is 30 methods; this is 35 over it, 2.17\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"c824398916453ca897941c6a7ded315f4e10bd430c7f3f6e3920df64f1bed2c7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NewChatDraftView: ClassTooLong \u2014 849 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 449 over it, 2.12\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e12c52571375a0b415489f6b97d8ab01b96f74d2f9982bcbcabd91fc35126f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TurnTimelineView: ClassTooLong \u2014 835 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 435 over it, 2.09\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f574e5067a70390fb8ef02e7b5340f42c28d3d59a2729734ca4f96f16e962528"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Messages/WorkspaceImagePreview.swift: FileTooLong \u2014 1039 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 539 over it, 2.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aea833069133ffbd3baa639bca11ea9d18624f49211001662b831a5d0f32706"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BSecureTransport.swift: FileTooLong \u2014 1038 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 538 over it, 2.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dce5a8e16e3e42635e231f04960202c2d51d83c2f59e77259a88b19ad49896b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-action-follower.createDesktopIpcClient: FunctionTooLong \u2014 createDesktopIpcClient runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2839}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c518e7f335e2840a998262251408cdacb74f6a8a97bf8a9f118eeff4a425ee"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Timeline/TurnTimelineView.swift: FileTooLong \u2014 958 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: TurnTimelineView (29-1290). The bar is 500 significant lines; this is 458 over it, 1.92\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5529d3e76a85c899d5627470b4ed10bbefb58ef7b6076de04e10c21e9f13f617"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: thread-activity-store.createThreadActivityStore: FunctionTooLong \u2014 createThreadActivityStore runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-store.js"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"835f84a15c9d7f41b715e439728f9bf396253c85b53395e0dd72de42e632ff4e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/workspace-handler.js: FileTooLong \u2014 933 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 433 over it, 1.87\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b58ae0854cb5e5cbaad23e1ed197354b51e963c6dd68d7a59ea4f327dad3da0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TurnTimelineRenderProjection: ClassTooLong \u2014 744 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 344 over it, 1.86\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b1ffb1d873a1dc777746ceeea28dcd67e54cf3e98a2083beff5228c6d5a123"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BConnection.swift: FileTooLong \u2014 920 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 420 over it, 1.84\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"900e0624ffeaf281c3e3556031dd1cb49fad16335fa71dc24f6ec019998b7f59"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: rollout-live-mirror.createThreadRolloutLiveMirror: FunctionTooLong \u2014 createThreadRolloutLiveMirror runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5181e43809ff757ecc051689774b43cf79607499cabe6d344baba7e04b2b1c2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Core/NewChatDraftView.swift: FileTooLong \u2014 911 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: NewChatDraftView (59-1314). The bar is 500 significant lines; this is 411 over it, 1.82\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdef80cba9be8e780af724d0a164730c578c244062073ed8019e5c9f6f297ad6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.loadOlderThreadHistoryPage: MethodTooLong \u2014 loadOlderThreadHistoryPage runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d2e20e5c2f5c1af898babd08f57e4146bd555202c7b9fa6b3d5d53820cb07c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Timeline/TurnTimelineReducer.swift: FileTooLong \u2014 892 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: TurnTimelineReducer (13-1457). The bar is 500 significant lines; this is 392 over it, 1.78\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e6869fb92ed486d1a3b0009ca72fc512d0d074a465f3c20501a272859df5352"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService.swift: FileTooLong \u2014 890 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: CodexService (424-1277). The bar is 500 significant lines; this is 390 over it, 1.78\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81de4540b66255ac6f034cc09dc63ff695a5be6e6af8f21e9df40a5f3fb0d297"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/desktop-ipc-conversation-projector.js: FileTooLong \u2014 882 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 382 over it, 1.76\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a11e92ca468d9a621434fb7f353f6673db90929153db65c23a5bfb13c8b89fa7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MessageRow.assistantView: MethodTooLong \u2014 assistantView runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"db201e2d7de7901c1d79d263aa3cefb1ce1d454594cb45b99350828e15da782a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnTimelineRenderProjection.renderItems: MethodTooLong \u2014 renderItems runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ebe9246d356b2aa6ef015699d1c24c58eaaa1fbc0edfc02b4c3eb8b9bc8bacb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BAccount.swift: FileTooLong \u2014 861 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 361 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c67a4039c252dad79a1a5350ae1aae629fd3d8dcfa5208d70037cf0ba1793d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Home/ContentViewModel.swift: FileTooLong \u2014 861 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: MacSwitchInterruptTimeout (326-1234). The bar is 500 significant lines; this is 361 over it, 1.72\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4cd59f5cc3370dac8faaa1da0a8188dc26e5af64bc66b7ca81a19e2053ade3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BSync.swift: FileTooLong \u2014 841 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 341 over it, 1.68\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c5d36d10ca7bb688970da086a752c85cf5daf9e22a1f40e9a032b7c4bf4c661"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Timeline/TurnTimelineRenderProjection.swift: FileTooLong \u2014 835 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: TurnTimelineRenderProjection (151-1278). The bar is 500 significant lines; this is 335 over it, 1.67\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf8b50fe42c298f6ba746f62e42636afce62f530a034d3869710bb7af3eb6fb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.handleNotification: MethodTooLong \u2014 handleNotification runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"abdd4b5455d0b263ba76dddd91765d60b89737a3b973cdf5168520605045d430"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MacSwitchInterruptTimeout: ClassTooLong \u2014 655 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 255 over it, 1.64\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfe2bf893fa0bd7f53dc0eae07499d9e49bc10bf2c51cdb95fd0e722e765817"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: push-service.createPushSessionService: FunctionTooLong \u2014 createPushSessionService runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/push-service.js"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2a256e410ea72a10e5daefd722dc89cb90b4136349941c7a3a760c6fee2a15"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BTransport.swift: FileTooLong \u2014 802 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 302 over it, 1.60\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faf3a0e07509a1ca20555bbf6a112efe9e695ea0f6f43ba89cf5b553ad0dcbb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.handleStructuredItemLifecycle: MethodTooLong \u2014 handleStructuredItemLifecycle runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"057d7ed3c9e414048886d96e46701317e9934ae4ede6e26ad97322bafe639675"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.performSecureHandshake: MethodTooLong \u2014 performSecureHandshake runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"b58b1f1580cf5e2d1e52898f75d2ad56fb9f8c47a863597ef1592bc0a58748cc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TurnView: TooManyMethods \u2014 47 methods. The bar is 30 methods; this is 17 over it, 1.57\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd614eac0eb48fd8642e3244e7491101318900c2ab7b69ec826f8ea22a5ee0bf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.applyCanonicalHistoryOrder: MethodTooLong \u2014 applyCanonicalHistoryOrder runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a151aed48ff120edef0e40d9742404b5a0f5751be6770b41e849d365f84eb93"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: StructuredUserInputCardView.swift.top-level code: FunctionTooLong \u2014 top-level code runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/StructuredUserInputCardView.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c16aed7011ccda0993e24ffc9491a8214a54504fe18f655261040d32daf854"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Plan/TurnPlanModeComponents.swift: FileTooLong \u2014 727 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 227 over it, 1.45\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b7f396687ae52e4e19039ed6e6fc8e75402a9cff64c4660558801ede8ab0a57"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.ensureThreadResumed: MethodTooLong \u2014 ensureThreadResumed runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3d6923e2ab4b26bfae6c6845248e025caf3b1760a1cc84fc85929cb6b416ec"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CodexService: ClassTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded), 1345 methods. The bar is 400 significant lines; this is 178 over it, 1.45\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6663a05c59b5b252fff3ca0510346ac47d4c6817701c29f20cd7b012212c7c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.reconcileExistingMessage: MethodTooLong \u2014 reconcileExistingMessage runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"de9ac252ca150d7b0d4cf99797f30890338b53fb3da5a82ef5779f731ecdd385"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-action-follower.createDesktopIpcActionFollower.observeInbound: FunctionTooLong \u2014 createDesktopIpcActionFollower.observeInbound runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"786457176f023d5e1ba904973092c860682581ff5aefb5963cfff95235d53cee"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.steerTurn: MethodTooLong \u2014 steerTurn runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1992}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a8b08c2cdd0b1c5007098496aaf0bb1fb103dcbebab305ef80fd9e4ed08717"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/secure-transport.js: FileTooLong \u2014 692 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 76% of them inside a single declaration: createBridgeSecureTransport (36-786). The bar is 500 significant lines; this is 192 over it, 1.38\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3c0f2562c0fd0a881b5a628281adae0ec9a6a67a35c228757721f7e45a8894a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BMacContext.swift: FileTooLong \u2014 690 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 190 over it, 1.38\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9d762b896ffd8ec1ca6989005e757e4b14c318a7a0123a30976aa1949a5fb1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Messages/CommandExecutionViews.swift: FileTooLong \u2014 690 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 190 over it, 1.38\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e5c4ef5cace243fde482d69f60f2092a970b8e47db16cbd57d9a0cf4391435"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BRuntimeConfig.swift: FileTooLong \u2014 686 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 186 over it, 1.37\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1288c0a2767dc01da22b0794bbb6c5bab2e850978f781d3b2282a4aeacdee98"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ContentViewModel: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ed454c81488f057bb5f65e8906c6c4f8295bd0dcfcbf5e32f26f33a344140b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/codex-desktop-refresher.js: FileTooLong \u2014 681 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 69% of them inside a single declaration: CodexDesktopRefresher (25-692). The bar is 500 significant lines; this is 181 over it, 1.36\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa1eed01b24605d2b79f587b418535b2de74796501c3c4832f1af991bfd20d1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.sendTurnStart: MethodTooLong \u2014 sendTurnStart runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1664}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa09a63ca3c5fdd78583576e58071b40e24742c6c89e0ed71d3fdeaa08a45f1e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: rollout-live-mirror.synthesizeNotificationsFromRolloutEntry: FunctionTooLong \u2014 synthesizeNotificationsFromRolloutEntry runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6dd93b9da45462fac76249d4755e3bc9fce8ad20f13ffd5acd63ef85de1a4cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/push-notification-tracker.js: FileTooLong \u2014 673 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 173 over it, 1.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bd0e410a69eae88872808cff227238c37b84cfac65ab2c3d580ae22bddb741f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.repairCanonicalAssistantSourceIdentityRotations: MethodTooLong \u2014 repairCanonicalAssistantSourceIdentityRotations runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":1708}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ecab6758958bb83494ed0a40c92f0bbad94d448e352ff271541fa25e6f2cc45"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NewChatDraftView.body: MethodTooLong \u2014 body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f8745749b33ba63e3a42f8c391678f7f0606559b979177b4499ad6c4d96a64"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Composer/TurnComposerView.swift: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5741d3f891ae7442f694a282b9a884a95cd0a395167a5b9483c700a46f01dc16"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Core/TurnViewModel\u002BGitBranchWorktree.swift: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ebb572877554180fae51aa9dba7e127bd8ebde40adf44b9d57e4df3c2ca1b47"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BThreadHistoryPagination.swift: FileTooLong \u2014 650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 150 over it, 1.30\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"140a88e5f7744a2987bbf75f61f9000a785404aef66c08b81496d5b9289ae1e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Messages/TurnMermaidRenderer.swift: FileTooLong \u2014 649 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 149 over it, 1.30\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff1d87e367afe963fe5ba31558d10d391a95d072122b99eae40eaf58d1a6228"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.markTurnCompleted: MethodTooLong \u2014 markTurnCompleted runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":5308}}}],"partialFingerprints":{"codehealthFindingId/v1":"3da76fcb780049e4958f5a24472a39d0ec077c906febbd617222661863932637"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SidebarView: ClassTooLong \u2014 515 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 115 over it, 1.29\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/SidebarView.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"82526bf89699b8fd4aac8d48aa45eae24fdeb194287db63826dce3c456de6826"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/rollout-watch.js: FileTooLong \u2014 642 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 142 over it, 1.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d3eca6723406ed9458e5923285672beee389eae66e096d82d623c4d3384b57"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnComposerView.composerStack: MethodTooLong \u2014 composerStack runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"512c4481b2bcf77907a060b7dc4cffde4066ad2c8e9fcbb307bb4f84d5823a44"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Messages/TurnMessageComponents.swift: FileTooLong \u2014 628 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: MessageRow (349-903). The bar is 500 significant lines; this is 128 over it, 1.26\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a9784f052f27c45872b69b3e2aceac00bd3341809fc0843a4474e59dd29416"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BHelpers.swift: FileTooLong \u2014 625 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 125 over it, 1.25\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"043ccaa5c6607f7358469921f3a302779cac63ff4a1eb3cbbdd81d22bf5c0756"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnViewModel.triggerGitAction: MethodTooLong \u2014 triggerGitAction runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3251}}}],"partialFingerprints":{"codehealthFindingId/v1":"f508b39448615258e4babbf6c66d00cabc64b5b3ce8fb8fd6d7e24ae11f96930"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/SidebarView.swift: FileTooLong \u2014 622 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: SidebarView (29-814). The bar is 500 significant lines; this is 122 over it, 1.24\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/SidebarView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b877d5cf1810821a07c1834a4c0e69753795ac9328a58f2a6551fbd02263af6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-handler.openThreadOnDesktop: FunctionTooLong \u2014 openThreadOnDesktop runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fbdd5eb6897253bb382ed1410bfcce7829a49a1a53873081b7da86f61ceca3e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TerminalScreen: ClassTooLong \u2014 495 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 95 over it, 1.24\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"954d356b1ff14802637db05c371c021b25330b7c69241fff3dfa3f1bf9321664"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TerminalScreen: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"644a0c5b01bf5957c89bad7f481c0bdbe2fac722441cb30f5409572907c03580"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ComposerPreviewContent.body: MethodTooLong \u2014 body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa39ccbe44604b40a79a3a324cbc9bbccc08f51ab8290f931e55e7fa306914f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: rollout-watch.createThreadRolloutActivityWatcher: FunctionTooLong \u2014 createThreadRolloutActivityWatcher runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"1560152cd3374231c2177ff20eb64c49344828dd8ee849c5b4541dbfe903cc86"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/desktop-ipc-owner-transport.js: FileTooLong \u2014 585 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 85 over it, 1.17\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a650db12f3c36929159edc790fdc0b38e150c833b3bc4086aa0e8cccdd04b54"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnView.composerWithSubagentAccessory: MethodTooLong \u2014 composerWithSubagentAccessory runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11cbd4449f425f871b00898d34254990840fc34c4d507d7282a3bd406352aa6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnFileChangeSummaryParser.parse: MethodTooLong \u2014 parse runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad3d8ff3a8f99595328bb9589400abe184b49daab6af81b10a87e6f816f4ddb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: rollout-live-mirror.createThreadRolloutLiveMirror.tick: FunctionTooLong \u2014 createThreadRolloutLiveMirror.tick runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc97a15632d38ca709ab97b7d2ed7a725ee9a7ef22f1bbe059cd9f84370497d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: rollout-live-mirror.bootstrapFromExistingRollout: FunctionTooLong \u2014 bootstrapFromExistingRollout runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbf889973b51c925b1909e9a70299802344bebc357e80d2260902bcdac5247e5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CodexDesktopRefresher: ClassTooLong \u2014 467 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 67 over it, 1.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2093a002a14e89023f5543e7976652e62e482302ece98979112464def27296a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BridgeControlService: TooManyMethods \u2014 35 methods. The bar is 30 methods; this is 5 over it, 1.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/RemodexMenuBar/BridgeControlService.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"764552aa38d7ebf5e12f71199cae69b85bf0c86bb349c752cee1dbac0c66a16e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Models/CodexThread.swift: FileTooLong \u2014 571 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 71 over it, 1.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexThread.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ec68e61d987dd46b8e299a8fd1f1ee9b1e3ce6f0d344d35685333972853913"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: secure-transport.createBridgeSecureTransport.handleClientAuth: FunctionTooLong \u2014 createBridgeSecureTransport.handleClientAuth runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"b124266803f258220395584b9c3aaf0e59e87c820707c572d953f2855783ba74"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.interruptTurn: MethodTooLong \u2014 interruptTurn 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e2908374e68c558b39623db4bebe4db7b6fc299be0501993342bc728795384"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.refreshInFlightTurnState: MethodTooLong \u2014 refreshInFlightTurnState 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1502}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4223af78ff91eb28b99fc145e9541f2ce79ee86e59d38d56605ab8cf6ffec46"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: bridge.mergeRelayHistoryItemsWithJsonlItems: FunctionTooLong \u2014 mergeRelayHistoryItemsWithJsonlItems 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d44d0f7d7f0c13b9aa4f369ac64f36aaad887e8775eab826bd601d9a4a66829"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: bridge.fetchAdaptiveThreadTurnsListForRelay: FunctionTooLong \u2014 fetchAdaptiveThreadTurnsListForRelay runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f37e75c9371e03904abdd6ed0754264281e246a237d3758dd2d28d8a866877b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BIncomingSupport.swift: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc254d545c245ee5264524f80fc8e1aca6a9c7bdc65543ae49707fa4a254ea1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/GPTVoiceTranscriptionManager.swift: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: GPTVoiceTranscriptionManager (57-632). The bar is 500 significant lines; this is 38 over it, 1.08\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/GPTVoiceTranscriptionManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d7ce793073326437f2e0d378591525c0ac17486fc69ff4cc05c439b09e6909"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.appendCompletedAgentText: MethodTooLong \u2014 appendCompletedAgentText runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b5531889b549cdcfe929f47d5600854284fee840d5acd4b8c5631f08c3cf69"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentViewModel.switchToTrustedMac: MethodTooLong \u2014 switchToTrustedMac runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"2040f1d01119ffd59cd939dc979ee951363b6fa6c7fca4dcf74e819dee207e39"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: desktop-ipc-conversation-adapter.synchronizeDesktopConversationCompatibility: FunctionTooLong \u2014 synchronizeDesktopConversationCompatibility runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff9f4de71615229fc6ef70c5c86e6c7ae2a0ef9ba0c9de93cec801f35efaf24"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/macos-launch-agent.js: FileTooLong \u2014 527 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 27 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a842561604e4af3933e0e18e8ed0a1361a406c305c74f644d6031f3d3dbbfc5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CodexService\u002BAIChangeSets.swift: FileTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAIChangeSets.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"250202017a050f8c9c6273622ff4447676f84143cfb51fb56ca78ff61aaeaed8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.loadMacScopedDefaultsState: MethodTooLong \u2014 loadMacScopedDefaultsState runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ec477ac9a6fcbfdf61fc4006e7575de637d93945bf53577991fd53ed232dde5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Coordination/WorktreeFlowCoordinator.swift: FileTooLong \u2014 522 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d5a23b5c30618ffdf23501a658617e78f69acff792ef3906c43ab4d4f22552"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: secure-transport.createBridgeSecureTransport.handleClientHello: FunctionTooLong \u2014 createBridgeSecureTransport.handleClientHello runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcde845447d5a3ffe5e981ed5e69fe8fd49614a023bc075508e6a547b28a55ce"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CodexDesktopRefresher: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b120524114c2b98cb32a9367cbf63fc716c20db9287d829ceb946ccd55f8d4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Terminal/TerminalScreen.swift: FileTooLong \u2014 511 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: TerminalScreen (11-741). The bar is 500 significant lines; this is 11 over it, 1.02\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"801dd3363522029dec412106aafbf5d486955258fae8581eac9a59ef141216d8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexService.existingMessagesForCanonicalSourceReplacement: MethodTooLong \u2014 existingMessagesForCanonicalSourceReplacement runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb7fd54621e2613a194c7c10750025dda39692ed0507b920bca8b7dc5fdf316"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MessageRowRenderModelCache.buildModel: MethodTooLong \u2014 buildModel runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0bb6886a4fc1fddf388a7a78cf00098a8cad5d3e745067384abcc6d5ac16a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: push-notification-service-client.createPushNotificationServiceClient: FunctionTooLong \u2014 createPushNotificationServiceClient runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06382c4e4bccd0b55ced80f5cfc6953afbcc7fc7b71d27eac704bffc8c23310"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:825-849 | CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.swift:64-90 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb5bd95218f89ce8782f2b7d25189d3a17d10890ceeac8b0d56809f73c86c31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:349-361 | CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:388-405 \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":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"267870f49c8c48d73148552ed777f1bf2fbf823ede8a3962b75991b54cb6e578"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift:25-44 | CodexMobile/CodexMobile/Services/CodexService\u002BStatus.swift:281-298 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3180-3197 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3294-3307 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3503-3516 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"79987a443ccbfe09d3ff772a36afbd0b4bbaf9324d8ce073255a54551ff2abe7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift:92-118 | CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:57-78 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:68-88 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:54-74 \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":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4bad9909ae001aba45dae09addf7955041756ca48e51fc4b521a985f519b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4120-4204 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4288-4315 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3065-3092 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:149-182 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4120}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c491a76a3872ca60a20aa0aca7e8bf7b10bb7ff1b5e35aac30681dc638eda9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1742-1789 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1863-1907 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1933-1993 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1995-2131 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1742}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdf1480336360e0278059ab5869e730139c732c60449bcb6a5c2e03170f45ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:364-460 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:464-508 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1664-1839 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1992-2176 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc5dac37f79e70805504a5114fb2b5e215fb24f7c079f05eb441dac3be35675"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:44-74 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:110-133 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:135-156 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:159-177 \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":"CodexMobile/CodexMobile/Services/DesktopHandoffService.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc82345473e7779e05691ac50ec84e9b904a675ca6d3a86e6af58fc602a5ef9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:45-139 | CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:24-94 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:55-111 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:173-201 \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":"CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1bb562db3f51503f41995b1997bb8333b24d121c36aa0243047b2a5c362427e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:358-445 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:448-507 \u2014 These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"240bcc6615f36fee44745086e4af216cfe2c3ed46d51ff087f65aca2510cc8d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3975-4014 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:549-588 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3975}}}],"partialFingerprints":{"codehealthFindingId/v1":"5703ee42a630afe1caa7e9367d2d2ffaf4556f91d17087e7328cae82010c75a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (57 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1127-1194 | CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1261-1317 \u2014 These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1127}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8cb47e3b58c6e5c9b5dbd615a6c8cea393a090dcdeb3750e4e6495ad5e45b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1375-1424 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1427-1476 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"146ab8236e2842da3401ec128dc541583c07c4c31806e8280b047b7b702e2799"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:462-518 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:521-570 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cc25fa00b8d810791505506583120e36e121478109d91cbc23ae04da1becc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionStatusCard.swift:74-123 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:253-297 \u2014 These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionStatusCard.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd041f62a9b498ee709e5a9152dbd760368e35c986ecc0bcb32582d6f95f8dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4400-4435 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3177-3210 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4400}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddd2184a71f68bc29dbc5a3e897081364d9755209535b051ed73600dc8cf0cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4250-4286 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3028-3063 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4250}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10b17f972a551c279f60b2339286eb9ade2b7b7e4af4b05f83913d63773fc1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2528-2588 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2591-2639 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2528}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9446c0ab4c265f0dedfdd236d85fe73c5f0f8a06a6c51f8454f3f05d82d0722"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:379-419 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:1261-1316 \u2014 These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5a3c62fdcda139a3e710f634bcc12042cdb99760ef2ad71ea278f891ae663d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4027-4049 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2822-2844 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4027}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c7fd4b5848793e4eb096532a8576918b8766a6c7d6a207791196fc85555eb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6550-6583 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6604-6629 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":6550}}}],"partialFingerprints":{"codehealthFindingId/v1":"564d0eceb5ee5edf07d8346cff9b25822c4c44fed6e02163cdf9c35837cd5eab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4511-4538 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:410-442 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4511}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea88151b8803ffa911eace549561201651643c80a659db48dc79905880a638a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:112-149 | CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:152-193 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b7757e33a6e537a0c91a650022af3fffad7e94a4637d545d8fd4554acc4f2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:214-268 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:408-455 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c4309c9c7664776f7147800f0da2e16f9bf4086d96b1a783474c85bb1c30ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:106-143 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:145-190 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fe44eb113504a98bb5e0eb4b33d94bb7b912549eaab65ca678ec9c65b636279"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:664-704 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:743-781 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"772001a5722cafbad6b4312552c20a42aa8ece132d8e0732c72852a86a04f2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1299-1352 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1392-1439 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1299}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aed383ba9f4dd4a9155b2303db4572567da67a533ab7ba9528ee955abb53fa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:152-211 | CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:687-738 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fffca3840452304a982a8ad13d24b56434264a8dc4f14c897882de4f6cc9865"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4555-4586 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3301-3331 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4555}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5bae1bfc4058f76461e011558ca43eb6043efc2ac0d5da4e3fdbe446e65b98"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3392-3414 | CodexMobile/CodexMobile/Views/Turn/Composer/TurnAttachmentPipeline.swift:89-110 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3392}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f85b5c03f23f111499eecead4156b2bebb41e819d6a98750ef6b33d6cc8d4cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:537-570 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:573-605 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"344f406f715433f1867d93a3c1e0666a54a9304d756e4f5b58e4b39bc42be8ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:798-837 | CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:880-908 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e6d816fe4972fbd2486f727a01b0482857515e2986396e0d6f37b303200f350"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift:359-379 | CodexMobile/CodexMobile/Views/Turn/Git/TurnGitActionsToolbar.swift:188-210 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bce2950119d0ed056ae5c107c159ce180935927a79a0dae4087280e1cef3fa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:411-436 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:464-486 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"74b837f61dd1b275b9f9b76ceb92cd3fe6a6b5d68646282fda3b858ed963548e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:983-1033 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2713-2760 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"7392191fca0ff6fe93d5fb9ee4175d8ac7a6817a10ac17e4e20dadd2c01427e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:386-402 | CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:404-420 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"05475f760283794a76b716b39596194481e38d387a3a64ad3adf5a0b11019ef9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Composer/TurnAttachmentPipeline.swift:64-86 | CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift:674-692 \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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnAttachmentPipeline.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0beaf1ef575b34ab80a12e7d6cd58ada2b03843f76b4349393415bef5c65a24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 29\u002B corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:63-91 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:93-130 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:132-170 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7b3f1ef93ce0e05be614f1dc237e2f817ebaf6b343d57d3ae65a630168d20f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BReview.swift:147-174 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2947-2980 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BReview.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"3922e747a9ffee4dad2a9399c1c19c1244f05a6f8f7319c13de147acbeee12e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4347-4379 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3124-3156 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4347}}}],"partialFingerprints":{"codehealthFindingId/v1":"56bcc02266d136ad7381352d421d3a17d21a31e1f9575d7dc6deae0b817b3c10"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4482-4509 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:374-397 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4482}}}],"partialFingerprints":{"codehealthFindingId/v1":"34768e4dadfc5b1025764652ebdf5afcd6e50e98b599f4789eaed6e44798065e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Models/GitActionModels.swift:177-186 | CodexMobile/CodexMobile/Models/GitActionModels.swift:357-371 \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":"CodexMobile/CodexMobile/Models/GitActionModels.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"37ea6a540dab23c55c1fb6e908f0e0b1c1fa0982cc4b6d697a9e0da05664f8f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:332-370 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:372-406 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85fc9561fecd859d10386aafc4ab4fc060fbdb401e0e4ed4c582105af5ba63c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift:144-169 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift:224-244 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd4519313395ce604d4eb325e399b405007b500956e2ee5fdfc6e0b448edd20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3017-3035 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3038-3056 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3017}}}],"partialFingerprints":{"codehealthFindingId/v1":"f69fc3c2874730528ffcc445f8e3b86733d639b30550b8d9bede0e501f566410"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): CodexMobile/CodexMobile/Views/Onboarding/OnboardingView.swift:134-156 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:188-212 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Onboarding/OnboardingView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc2989ae39b72ec80eb16191fdff789d2212ad56834e5c04e33d4bff1d1795be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3155-3171 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:659-686 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3155}}}],"partialFingerprints":{"codehealthFindingId/v1":"99fa768dd0c3a0d7cb168ede153f5f35f064272a62515473125c6822e6e79f36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:628-647 | CodexMobile/CodexMobile/Views/Turn/Voice/GPTVoiceSetupSheet.swift:75-94 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"9065975605a1a1dd4cd6bd06c8508b86f35d0584e28c8b6f37b41de76ee13c1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:321-340 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:342-359 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift:42-55 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4c32e9e672b8f0d70d9243a36051cb2217064c5d36ab416a0e8ed5e75e56ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:588-612 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:374-393 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:446-463 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f8fe5d4f1ab44d397f203be83fab68f51882279b5e88932586e7b06671bf7b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3416-3433 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2787-2804 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3416}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf00c6b7a7c4d24a180d2cd383a80d75c747ec83be2521c5f8f2765c06232095"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 14\u002B corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:264-286 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:289-307 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:322-335 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:337-353 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"267f84fd48ecbf889475301a164a64673ba11737b5c2dd8fdef1a5a03a2f9500"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3189-3210 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3230-3247 \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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3189}}}],"partialFingerprints":{"codehealthFindingId/v1":"868eea764ec35750ffc3380ca7a75ba22bf49a8ace3c5bec4898be9a7c951606"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2996-3021 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:944-964 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2996}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd565ef367fcda078c75802d68e5972105bfc5131dd0b2b20ed9807774468ff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListView.swift:119-147 | CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListView.swift:234-270 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListView.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"712cffd00191322547bf609fc3b4fffbf05e5ac046850ef8083359c8315fe495"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:412-422 | CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:424-437 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a6ac3b27b7879722ad993305a4815442e1cce98ccca351b37d3a0518bbe0e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:755-774 | CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:776-795 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"8710fe92fa76f13f3a3e5d92bd49c399185d21743dfdbdc43ba51a339b32d90f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:473-494 | CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:552-573 \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":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8eb38bcde1e655486796d2cc1c48f18bded710d6713a28ea31c4b326d2bcefe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Views/Shared/CodexWorktreeIcon.swift:35-47 | CodexMobile/CodexMobile/Views/Shared/RemodexIcon.swift:189-203 \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":"CodexMobile/CodexMobile/Views/Shared/CodexWorktreeIcon.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b606fc1e1dec2c7a9de455c26aee59507e0d668032aa66fdf2c18579f68a8ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): CodexMobile/CodexMobile/Views/SidebarView.swift:309-333 | CodexMobile/CodexMobile/Views/SidebarView.swift:335-359 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/SidebarView.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d02216cab6040f076cd738e2a651ac5ba8ac06cbafa73a32ce17c4e94e9faf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:498-513 | CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift:673-686 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff31e88c4e9ab0f693fa413a5ae3af4392e6b8f233a6b312d90b7590089df41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:393-414 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:518-545 \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":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"6602e4f952572f89382bdc59d7b2866c0916eedfc17a71de28ec075c11b91330"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:354-372 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:298-316 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"647153a5f06d6bcb2115f235e3f87ef8a45504c78fb0a71e65ed6924b4433968"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/ContentView.swift:2210-2229 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewSupportViews.swift:11-28 \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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":2210}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d0a042e3cf15266c91ecbe8b45381fadb980701d63cb650b2d2434b4f0c5e91"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:767-791 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:793-809 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbc1871979db29d3959cd2bd9ca65d436463305f291c7cf9fb77f2bf6977e59e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2415-2432 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2502-2518 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2415}}}],"partialFingerprints":{"codehealthFindingId/v1":"722009f17c28323bb8a4eb5509a750137ff0b4b5fa68a764d3125b105632b68f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1669-1684 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:71-83 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1669}}}],"partialFingerprints":{"codehealthFindingId/v1":"52df2b2671d043044da5ef5d493db4bcec7ae83af2671043dd847b08aab239db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift:14-24 | CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift:59-69 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"411f72015b2368b4aafff1b64ddd8a88286cd571c1c097f320f80b9cc1bc4a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/CodeCommentDirectiveParser.swift:132-144 | CodexMobile/CodexMobile/Views/Turn/Messages/ThinkingDisclosureParser.swift:177-190 \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":"CodexMobile/CodexMobile/Views/Turn/Messages/CodeCommentDirectiveParser.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"f72bf9c6df25282c060d8a58bc233f30df113e623b0cf30706c8bde5bcca0632"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Views/SidebarView.swift:387-404 | CodexMobile/CodexMobile/Views/SidebarView.swift:407-424 \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":"CodexMobile/CodexMobile/Views/SidebarView.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"a623058e69c7f7d16b3b0dc330d4d545b5f12e6c4fb4d0bf349cf1242cda08d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4381-4398 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3158-3175 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4381}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2acb884154fe417b72ad0392ff993a45567f469e7ffafdf2ef8ab554894650"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:804-819 | CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:821-833 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da7d08c247b0667465e59c8aca5671121039275a58002ef515a99008b122928"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Support/ConnectionRecoveryCard.swift:172-185 | CodexMobile/CodexMobile/Views/Turn/Support/TurnErrorReportCard.swift:63-76 \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":"CodexMobile/CodexMobile/Views/Turn/Support/ConnectionRecoveryCard.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fda106f612759e2397c67d5cc55453f4e4d1bee695c4777fb9333c73706f6ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Models/CodexThreadGoal.swift:118-129 | CodexMobile/CodexMobile/Models/ContextWindowUsage.swift:40-51 \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":"CodexMobile/CodexMobile/Models/CodexThreadGoal.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd3699395fd81cb0abf10fc1d184eb42a79c554e58a0189970f5e19ddea6483"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Models/CodexThreadGoal.swift:131-142 | CodexMobile/CodexMobile/Views/Turn/Support/GoalStatusChip.swift:147-159 \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":"CodexMobile/CodexMobile/Models/CodexThreadGoal.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc53fc0959962dfc071fdd258e9886382988e0089be01ccb8a5d98157f87487"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift:91-110 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:295-314 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c852027c2c736a0c05856c88310b2dfaa8d20a5ba872792e3aa50438f76af6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3375-3389 | CodexMobile/CodexMobile/Views/Turn/Messages/UserAttachmentViews.swift:107-120 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3375}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f31694f22affe23f1639b897abb96f595629bf9e6316a60f9f0dd34561f23e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceImages.swift:203-212 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceImages.swift:214-222 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceImages.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0aa8c587d5875406356bda15ffc24db35f1096f1dd52ac89984a36cb238e681"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:14-26 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:13-23 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b951eb9b6490d40db03d08631669281d1f36974bb1a35d8a502243b441f486"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:29-44 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:25-42 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c5ba02cbb62f626cd82cfc9de455a2e291badcd093f126121fc789b43a70de5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): CodexMobile/CodexMobile/Views/Terminal/TerminalRouteChrome.swift:306-321 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:151-165 | CodexMobile/CodexMobile/Views/Turn/Support/TurnImagePreview.swift:120-133 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/TerminalRouteChrome.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ac2025e41db924d3cfaef512f230c5ea635d7156802ae90d858d1d7d572c4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1197-1214 | CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift:667-684 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"1781865cd19c5ee250a6e7befc11bc9a273eae76a479e9f542120bf4272202ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2198-2221 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2223-2245 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2198}}}],"partialFingerprints":{"codehealthFindingId/v1":"76159e070b568764110de1ea48984a9cca902d44a34db33b3bf561be181853e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:10-24 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:28-44 \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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6e158c59b85b2087868ac49328dc6f79d0f2557fa97315b0b2369ecf828bbf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift:63-72 | CodexMobile/CodexMobile/Views/Terminal/TerminalUIModels.swift:134-142 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"7829e9bea43e2ea0a7e1c891db5725856d332284e3c1581eb9f5567f739424c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnChatToolbarTitleLabel.swift:41-56 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:781-798 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnChatToolbarTitleLabel.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1b1bd6a93e4411208f7637f156c253aa18e431dfbcc61b1ee3cb260bcea9fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:102-120 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:124-142 \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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"07047fd2506d6c461265396fbbe5d5d6124eba4a3c8752000a33286045302734"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2643-2667 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:430-450 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2643}}}],"partialFingerprints":{"codehealthFindingId/v1":"d301f31d16bd8fe62e4e48f5ef62a8e63f5ee80eaad3e2d6f4ec6cc4902e917a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:102-115 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:117-130 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc37a920d8712516cd8666445b83708007c747c2422b456e0941501e7e121a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BVoice.swift:295-304 | CodexMobile/CodexMobile/Services/CodexService\u002BVoice.swift:306-315 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BVoice.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"70cbb7e00b4922836cbc867b6814caed2c9299b15f65030883dee5a5616031a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:207-228 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:455-475 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"193d62ea0a90f04b8acb9d912e432d1f4784b76e04ea77e32b853c63e5874f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): CodexMobile/CodexMobile/Models/CodexThread.swift:764-792 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2669-2689 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexThread.swift"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab48e7c98129a5a71e072179e8b323dd913a663c60458be4829599b84eac3bce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:293-307 | CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:320-336 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b2b64c19f007941f4dec7ecfe32fe1686eda4abeefd270f1aa662b9a743c22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift:1004-1017 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2999-3014 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"b36cb65bfe1d1a70e670f03e728cef1d866ca7fbae345517253e2e4d0c2cf823"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:545-562 | CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:573-590 \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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"be3f03c3efe48cdef805f0bdf19cb3b10377e9fd9e22fbf34d6faad50f6f33bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3291-3299 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:395-402 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:465-474 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3291}}}],"partialFingerprints":{"codehealthFindingId/v1":"caadac4e3151ce732f825465a3afb84ea1d7c54322f6a4f26ffe92f0abefc51a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Models/CodexThread.swift:690-703 | CodexMobile/CodexMobile/Models/CodexThread.swift:705-718 \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":"CodexMobile/CodexMobile/Models/CodexThread.swift"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"448ecc9693f30cbae561618609d18671efb6e72cabca1c1192bc811066561f59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Services/SecureStore.swift:32-47 | CodexMobile/CodexMobile/Services/SecureStore.swift:50-64 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/SecureStore.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57219d801360102e8ff50cfdff6bf223040097b7cc2dc1ad5d7bdb36364f15c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift:337-353 | CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift:355-368 \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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce8ce2e0d62eea95c84f183b6781ecb9c3e3718ea4df10ed4adf54cc83e917c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:404-417 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:476-496 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c4407d750c45b5f98961873c645b1c9748a343cef26724f494938bbe3d8fae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:753-767 | CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:728-743 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"949dbee11de569c46a21616d1d501cda3b30f212a81e0c63d2eae311bb1ca04e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:173-185 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:249-261 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f9fa696a4697b2aea19d272b96da044460d2c0cb2637f0659b4050a88cc284f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift:475-486 | CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift:488-499 \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":"CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"c89324f30653c4d8b526563933d742fba07c7c8d222b25c51418104bc7ca6b61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:564-573 | CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:589-598 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d5af936ad870ab50787f13f13fcc7ba9a9405b3f82757139e580dbdcb80ae5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:888-899 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:911-922 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7dde84e09ef6cb95712b869c37c9974877de1295db480bb8bd6d8e31474d9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4337-4345 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3114-3122 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4337}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb02b69c01d7dfcb5f9eb7b57edbdf950d7d1db07859184cac2fd5eebe836ce3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:130-145 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:148-164 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c2676b38436b9f1983cbf026132125239b16aa245a46e5d134f60aeee723c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:58-69 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:260-268 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"406f1b983c33c0480e0b139220b636b7d609f43a3b58c20c40d8bd501d14b3a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift:701-707 | CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift:716-722 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea16f62c972c7ca258dab0e450de6de649eb86397afb380cb2d6dacb88fcf249"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 7\u002B corresponding lines): CodexMobile/CodexMobile/Services/GitActionsService.swift:132-139 | CodexMobile/CodexMobile/Services/GitActionsService.swift:141-148 | CodexMobile/CodexMobile/Services/GitActionsService.swift:217-223 | CodexMobile/CodexMobile/Services/GitActionsService.swift:225-231 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/GitActionsService.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"719880cd86f4dd3de8482eb928e694710e87828ab0a1c4f47b36bb9d92c663b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarContentScopePicker.swift:182-193 | CodexMobile/CodexMobile/Views/Turn/Composer/TurnMentionChips.swift:672-685 | CodexMobile/CodexMobile/Views/Turn/Messages/UserMessageBubble.swift:579-592 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarContentScopePicker.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fdcf8efd246193541836c4e2503c8adc38b297e51255fa7e069dd1e05d456d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 11\u002B corresponding lines): CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerCommandState.swift:300-313 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2348-2358 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2503-2513 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2515-2525 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerCommandState.swift"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"6866791b82f7db6d315174984a578ebb58bdca1b45bfb04b1ce7a87942236c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift:252-258 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift:284-290 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageCaches.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fb3053a09d6c9d0e7ebb9f1a24754828946e35817475dcb3a244d0d1ac936b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListState.swift:33-52 | CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListState.swift:83-103 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListState.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c6a82ef6c599a16f9ee1f4c79fde60dbfcde0552dc3760995adca929577759c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarHeaderView.swift:213-227 | CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadContextMenu.swift:73-90 \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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarHeaderView.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"697ff7f94ab8ffb8c3f1e6438dd4f262e228d21a7d2742ad4d1d1c3befd7c8f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift:1663-1672 | CodexMobile/CodexMobile/Views/Terminal/TerminalFallbackSurface.swift:63-70 \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":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e07cc2b909332ce2a24054472de72aa0e2f73595a76cd94a00f5237ce16c090"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Services/GitActionsService.swift:178-192 | CodexMobile/CodexMobile/Services/GitActionsService.swift:195-207 \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":"CodexMobile/CodexMobile/Services/GitActionsService.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ca307bba39d5648d707818d8e482e5c982cefffad05cd9625ed4e1297e9e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BProjectFolders.swift:142-151 | CodexMobile/CodexMobile/Services/CodexService\u002BProjectFolders.swift:153-165 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BProjectFolders.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69f392076ced86164d2763a6247e747cb71263e32968e300301932b5ec17591"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): CodexMobile/CodexMobile/ContentView.swift:2137-2158 | CodexMobile/CodexMobile/ContentView.swift:2160-2181 \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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":2137}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfda7082e7db0ec1ec20f8d223dac2a22f4800a67918e62442942706b1be890"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): CodexMobile/CodexMobile/Models/GitActionModels.swift:158-166 | CodexMobile/CodexMobile/Models/GitActionModels.swift:193-200 | CodexMobile/CodexMobile/Models/GitActionModels.swift:248-256 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/GitActionModels.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd2e8dfa35a1024e859a6e5b4526806f56ce47e6cf1407f0d64911d80ff2709"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift:223-233 | CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift:236-246 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadGrouping.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"7708b0688f5604e4fc361bb84f27b9ef3412dae25cbb94db87afa2773f1bdf25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:555-562 | CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:580-587 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeaee2d9a8292befa5cb683a91c73a4f7cd00728bee39c08b2ab115896d72cbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3359-3372 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4775-4786 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3359}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e62b4b974ce53e74ba847d9d5fff7c8059549a7f8f754a62947c13453078dab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3435-3449 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2806-2820 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3435}}}],"partialFingerprints":{"codehealthFindingId/v1":"393c46cbf545d0d4c70b104710e438517e9b7e9795f709e7064f7ff1b055ac49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4540-4553 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:626-639 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4540}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b50b2a9f8dd6e46def200a1d9b6884b231bc6babc955e2652cb1c6a32a87275"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): CodexMobile/CodexMobile/Views/Settings/SettingsBaseComponents.swift:215-225 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:902-912 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Settings/SettingsBaseComponents.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"24bb31b5532470b2c3f7ce67fe6dbea7b6a2817de9af23e6b9e1fbd6995ad8cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1334-1340 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1342-1347 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1334}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf35187fcc1572f4e3b14f7321656fa187d9cf63d2b9af187b7a7f539dfb8b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift:228-236 | CodexMobile/CodexMobile/Views/Turn/Plan/StructuredUserInputCardView.swift:414-424 \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":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"49326fd9ab4a9dd32805d241dc85c266d1bb237dc86baf20dcda5c267c6b0ebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift:57-61 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift:63-67 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd12fb7a127fc734fe3caf839cfe55795e614c2d9891f6ad3ec43a13c51c055e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Models/CodexThread.swift:663-675 | CodexMobile/CodexMobile/Models/CodexThread.swift:677-688 \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":"CodexMobile/CodexMobile/Models/CodexThread.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"600b2bc24bcbb55f7f328867950eeafe9e760b951a53b1dfac024543b2dd1c38"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:365-390 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:393-418 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d04eb3eee7b02ae9421dc7d44998d7a75e778db0fddeb265d5f9c67c68fc11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:839-849 | CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:910-916 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10441595afc51a5d5a4231ccad1e8b29d49cb05f7db2a562fc089fc9b1f3dfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Services/Payments/SubscriptionService.swift:235-259 | CodexMobile/CodexMobile/Services/Payments/SubscriptionService.swift:262-277 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Payments/SubscriptionService.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4d90667f6790f34beaf2847715fe73e4f005a3555590b1c3a07ab7272acce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift:639-656 | CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift:663-680 \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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerView.swift"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5787087f4ac28502c18d37ff35ed97a04d95a5bdab188de180e710ed38cca2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:621-637 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:640-657 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9d6c86eaafa07a12a3a49182afdc773158d487c1ea66ce41bdb2b65faa82af9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/ThinkingSystemBlock.swift:169-176 | CodexMobile/CodexMobile/Views/Turn/Messages/UserBubbleInlineMarkdownText.swift:282-291 \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":"CodexMobile/CodexMobile/Views/Turn/Messages/ThinkingSystemBlock.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bcd7544f7a7d6f8eec4a4845fa71c9d2e21f2dbe961441bbbeca57122b216b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift:173-179 | CodexMobile/CodexMobile/Services/CodexService\u002BPets.swift:76-85 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3d80309046784868cbba45543fafd7d31b1138388ffc3781219cc35238c10c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:30-37 | CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:245-250 | CodexMobile/CodexMobile/Views/Turn/Messages/UserBubbleInlineMarkdownText.swift:343-348 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec8f1b45d09ca8c88f3521934c368666f3ff39ec6fa2f5a64b9a1acb09270e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:904-912 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:920-928 \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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a19ca0f4dcb42bb256d7b0ebfc5f9ea9316174bd0ed1a09b0930438c75cb275"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:167-184 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:209-224 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca59a83c14a51ea606eeacbcc58adc04498350b624ca583fe8ef84af854dcf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift:48-63 | CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift:138-154 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47f4b6842403196a7aba441ebb3b47b9bbbcb356287acd55effcf852e396c61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:264-268 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:270-274 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"69eee603deb2dc57a7c18c4f22b6a94af5204733b01e4df08c681a66feb678fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:438-442 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:444-448 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4450f2c94adec16c1275adc15814fbc6b2f0288c1e6f6f6ece51fa3646b02ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Voice/VoiceInputCoordinator.swift:111-126 | CodexMobile/CodexMobile/Views/Turn/Voice/VoiceInputCoordinator.swift:129-147 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Voice/VoiceInputCoordinator.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b2dccea4e980f96e1143c6611ce58976ab8576ef2fe5f35cb827c8da09c08a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2988-2994 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:936-942 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2988}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5e47f38dda876896281f236ba101ea8e5b2b09c2e9fae5f34a368c66d7273c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:361-367 | CodexMobile/CodexMobile/Views/Turn/Messages/CodeCommentDirectiveParser.swift:146-152 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift:76-80 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b62d5aafb128ffa16f98aa3db313691527d1633533cbd9c57b7a933e47f33b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): CodexMobile/CodexMobile/Services/Terminal/RemodexTerminalModels.swift:25-40 | CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift:110-125 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Terminal/RemodexTerminalModels.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"81eacff3793e724cde2ac540d92b74d80ac306697280bb3b56a4282e261543a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:1232-1246 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:66-74 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":1232}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d6bda14566a342b1dfcd428b1b1f44f3da90fe02c449953ace61310214d106"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift:1097-1113 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1211-1223 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"42e45863427df0de094b14a651e4e4165544ffeee85470d21ec0150ae4133b3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Models/CodexMessage.swift:291-299 | CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift:144-151 \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":"CodexMobile/CodexMobile/Models/CodexMessage.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32b2279ed4e304516dc0fb335e4c84738d1b2ec6bd4500afeca310719ddb1a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BAIChangeSets.swift:766-775 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3728-3737 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BAIChangeSets.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee3ebacb45da226546a80770321f2da6bddfe3d4385ba408ab83b7aeabd83b22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListState.swift:213-219 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift:864-870 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Sidebar/SidebarThreadListState.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a9e5c739fe837bab15bdcaeb24a4dc46d65180a6f2e004e2676eed63a326229"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): CodexMobile/CodexMobile/Services/CodexService.swift:1201-1214 | CodexMobile/CodexMobile/Views/Settings/SettingsConnectionCard.swift:109-122 \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":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":1201}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee4742e5e1a23cac993cde7c7e8c2f234e6b29ce3fbdc6f24968f685781b29a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:499-506 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1215-1223 \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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e20790ddb99af7ee5f819b35ac5559572903e60ef237d5764d82bb0dd2b5cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift:193-197 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2265-2269 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ab592fdb5802fe314cf41aafdef343187e66bfa007d370b235fdb684377b46"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Models/CodexCollaboration.swift:439-444 | CodexMobile/CodexMobile/Views/Turn/Messages/SubagentViews.swift:533-539 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexCollaboration.swift"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"787482c16c23d8367a8a7a32c82c552544e9b1aada20c1f970ec144c727bd8cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): CodexMobile/CodexMobile/Views/SidebarView.swift:248-260 | CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:1140-1151 \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":"CodexMobile/CodexMobile/Views/SidebarView.swift"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"705dbabd5c3275a926933f6ec96314447656fc12ea7d7fd4bb1887468ddffb16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Models/CodexServiceTier.swift:53-58 | CodexMobile/CodexMobile/Models/CodexReasoningEffortOption.swift:48-52 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexServiceTier.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d69fa6cb195c6db62ac1351e72b86e541dc6811e07c79c1032acb1c31b11037"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Services/Terminal/RemodexSSHKnownHostStore.swift:22-27 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2829-2832 \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":"CodexMobile/CodexMobile/Services/Terminal/RemodexSSHKnownHostStore.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"600a7c81318e0bbea714e41d4dc3c9557190de0aad4b1a7b3a318ea302c159c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift:152-157 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1104-1110 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe1027342cbe3474268b0ce341e59d544a68ed896757b798416b289f891bc0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): CodexMobile/CodexMobile/Services/Terminal/CodexService\u002BTerminal.swift:249-255 | CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift:671-677 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Terminal/CodexService\u002BTerminal.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce58726fa32337a7b5bcbec782e40268efb3d520e9aa408f4b9b10a33588e68d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:756-761 | CodexMobile/CodexMobile/Views/MyMacs/MyDevicesPresentation.swift:167-174 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab35c5b74b9c2aa7d6044036614cf513c7ad34e88db4173b468975edc068c78e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:957-962 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:380-385 | CodexMobile/CodexMobile/Services/CodexServiceError.swift:18-21 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"443ad1d250e69fe25ec31f767ae010aa31c361954a279cf44884b034be771993"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:641-644 | CodexMobile/CodexMobile/Services/CodexService\u002BWorkspaceCheckpoints.swift:375-378 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:333-336 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"16fbaafd8f1ff817903fd084a631dcce56c00faf2014fb1937e659cb935ce76f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2272-2279 | CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift:996-1003 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2272}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc56574e8f92342d7202be206cd19be6b30064cd27cb01f3aee1c7a54e72a203"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:604-609 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1253-1259 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92361f0d5d54cd2b4c06c2bd79f3b62cfb4cc3db2008b7b4f353f90e2a491e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift:251-254 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:144-147 \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":"CodexMobile/CodexMobile/Services/AssistantReplayDeduper.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14b6cf92c2866af385f8168ec280d18d5fcf04359c129ff4198d25fca27aa6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerViewState.swift:96-105 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:451-460 \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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerViewState.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"3763070c9c391a59fe2d2cef42f7ee6879f96e91f0a123e1fe07d3455d666389"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:1086-1093 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:691-701 \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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e68e72d45e52d0c47a7925ddb0cdc544a0e21e6f2daebf128358f7012c4daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): CodexMobile/CodexMobile/Models/CodexCollaboration.swift:246-250 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3642-3646 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexCollaboration.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"023af227b6e4217d8f77784bb2ecbd5734e3438d6cd92592c63e89362eec1414"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:80-83 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:101-104 \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":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dffecba20dda2e93a16a1958abc5be0103aacd7470ae18629a60d39146ebd5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): CodexMobile/CodexMobile/Services/Terminal/CodexService\u002BTerminal.swift:261-263 | CodexMobile/RemodexMenuBar/BridgeControlService.swift:586-588 \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":"CodexMobile/CodexMobile/Services/Terminal/CodexService\u002BTerminal.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5eaaee19753415ca7d393a2e90665a40703f2a4fc9970ddf9e2d1d529fe3083"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:1273-1276 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1796-1799 \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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1273}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c223a49386d1277405d1d223320c2d1c06051a294e9bea797f0b10bfdd5437"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Models/CodexCollaboration.swift:210-213 | CodexMobile/RemodexMenuBar/BridgeControlService.swift:423-426 \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":"CodexMobile/CodexMobile/Models/CodexCollaboration.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e4a1d37211f41b6e0e276dd0f647c0fe2869851ab29375893971ebe4b86202"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): CodexMobile/CodexMobile/ContentView.swift:1583-1585 | CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift:579-586 \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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1583}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b91153408361ca56eb74e841bb128a372c41aad28f8ad81c9c41adc4c985bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift:14-23 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:585-594 \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":"CodexMobile/CodexMobile/Views/Turn/Plan/PlanAccessoryCard.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3db303dcd7571d46546269b3ef00999cb04d446ae91f4c1724c3e94b1adb3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1468-1473 | CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift:163-168 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"5048af09dd16aba1449ddab13ba43f62dc76778e600f2df4c50dae33b9f7cbaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Models/CodexImageAttachment.swift:110-113 | CodexMobile/CodexMobile/Views/Terminal/TerminalScreen.swift:75-78 \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":"CodexMobile/CodexMobile/Models/CodexImageAttachment.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9221cb45d48809f488e66c9f171e8738ca644d501b12453efe8b41d84044485"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:59-64 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:17-20 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f56b31771d6aa9235962825a003907a5e05991b8ad86ec8a6dc72261ff70510b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:421-423 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:243-245 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"735551dfcae7bcef40e5c37321a5159bca52dac10e0acd1d8d1f86fe153d363e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:85-87 | CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:344-346 \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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c14188840a4c0f067f36160abcb41bf8692a13148b8c3d1db2c7646e13e117"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:241-243 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:255-257 \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":"CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"105245b7621816b8800f9327622e615654ae6f84e7fe398b8db91f29d51b6ed1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift:509-545 | CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift:548-584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift:509\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":"CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13e1604031e57d389a89368a4e27a60b7e0feb2e81830b7c016a9ca8eca0fbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1376-1409 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1428-1461 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:1376\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1376}}}],"partialFingerprints":{"codehealthFindingId/v1":"616f5f6d5c51ebb64d71f23b0d3096c401240425f88c042017941856c4cd90a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:675-704 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:752-781 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:675\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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde92c478d50c202c83928d212961e0c91c1f7948ee16451996435b18ac71dcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3976-4003 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:550-577 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3976\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3976}}}],"partialFingerprints":{"codehealthFindingId/v1":"404d3860de6a5ad510b4135080dc3b0695255a1ac6bc522a9d53160af2119784"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1324-1351 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1406-1433 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1324\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"299567bff825f0401b5f11ac2ecbc5181e4fe38b84879c6cf98c0614e307a302"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:525-550 | CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:625-650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:525\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":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"aafee2587dadd1c810f8cee2bedb857f4c1d7fc10ab32e81db111302a1d54816"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:564-587 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:590-614 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6565707f9f23e826fab7821e89a7e82997927194671ff6c13e6f6cb0c4bf82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:421-445 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:483-507 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:421\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d10d327367c4c02270eb3d0b4a4ade2df89f64dd69806a2332d1fd1f437471"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201322 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3156-3171 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:665-686 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:665\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3156}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95046ace92de576d8f4b665624c33a38e86cb1d6e65fa1b3c58d5875c6fd606"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1300-1321 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1393-1414 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1300\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd97b879af3e6cf2b0c13f6fc44666f10eace8d9aa2a3d23e4578c18f623b17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1431-1450 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1467-1487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1431\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"133e9145b9ed6b5aa80f6e3b4518d32b3a62feb749e5dfa5628409605982c638"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift:174-194 | CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift:203-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift:174\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e5a694791ad08611a5a14e98a1d916a1a67600d41270fc4486201b62049434"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4370-4389 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4425-4444 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4370\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4370}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a74eb366e4f6832009a857c897d01c164f809e7ce1a97df711e2dde02983345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1001-1020 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2727-2746 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1001\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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d719cc00c07e4d26545bdde59be24f4883fe2cf17e1164814f0dddf2f73799c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:34-52 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift:41-59 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift\u0060 and \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"512b8114042f36565fdbadab2bb436b7418abef862c26b1b649497e5189e75f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:666-684 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:695-713 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:666\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"4db2b95a82d6495771ec62e60257d9ecbcf3236d0722dfd1707f5d3712be091a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): CodexMobile/CodexMobile/ContentView.swift:772-789 | CodexMobile/CodexMobile/ContentView.swift:843-860 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/ContentView.swift:772\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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf26a7b01cbb4660765e604d30ceedcdca5d884fbc18fae3f6c176b977556da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4318-4335 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3095-3112 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4318}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9be9fdf7ef4ae6e73adc1de48d4133b70e34755fb55ad560c8df23672eb98bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1399-1416 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1458-1475 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1399\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b5eeca9de31adfcaa1da12bc8f6d2f3ad01cb7d102b84a851bafcc91c22a38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3785-3802 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6639-6655 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3785\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3785}}}],"partialFingerprints":{"codehealthFindingId/v1":"c436dd50bb01965eecd0ec4ff65c400e4f1f4514889f5737a0ca67d7bcec60ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift:47-63 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift:69-86 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadFork.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"61aca3dd18722e314c175d61b8f629365bae66dcd6ff4a45b447ba91ac5cf304"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:275-292 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:314-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:275\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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc5205398180bc7624575ae0f2fb01ee4067029b49fb2cdb5395a2dfb64368e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:427-444 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:203-220 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:427\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a22a5aca6e32a5512b9c9031236d0e62c8ca4bfebb16ade7124e506f1e6a38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 4): CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:59-74 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:117-133 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:140-156 | CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:162-177 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:59\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":"CodexMobile/CodexMobile/Services/DesktopHandoffService.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a748fb1dd9a7351130e6fde647d20b66db61589ad07abea5b94f310033f7ec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/ContentView.swift:2210-2226 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewSupportViews.swift:11-27 \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 \u0060CodexMobile/CodexMobile/ContentView.swift:2210\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/ContentView.swift:2227\u0060 calls \u0060navigationTitle\u0060, \u0060navigationBarTitleDisplayMode\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewSupportViews.swift:28\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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":2210}}}],"partialFingerprints":{"codehealthFindingId/v1":"718b4c2cd87e7c69877e9af27655872661f42cb1482256abce4f51dcabe6faa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2883-2899 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6984-6999 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2883\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6983\u0060 calls \u0060hasPrefix\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2882\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2883}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afe5ec2a5ffb5f2bfaf07527b75a16f6097a9afbd5759658843a9f5186f705a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4299-4315 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3076-3092 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4299\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4299}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dfa1766e8c3739609b0df02c3e229dc34865594fd36e51b37579af3849f756"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2312-2328 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2392-2408 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2312\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2312}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3994035cb05c98c9e04f98e149659a4a79f7ac31f3c0b7fea7f5cd7188c5ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3805-3821 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6686-6702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3805\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3805}}}],"partialFingerprints":{"codehealthFindingId/v1":"35bd5d481422b4adb750ba38aa3bb6b213a6b8738fcf9a7d5c38924b5a6a1ede"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4220-4236 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4322-4338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4220\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4220}}}],"partialFingerprints":{"codehealthFindingId/v1":"75043fec02560ff6b0b55f1e7f7d8ee9919987e1f8ac3620b2e0bef68228ab9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4303-4319 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4397-4413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4303\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4303}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9fd22b4f6b52911d20f8a4040639590c88c0ca66f50a640f73792351b1cf9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:147-163 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift:97-113 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift\u0060 and \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"a90a93c4924867ad60572ffacd2a068e207d4d94707961011c7da96b2106f9d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:1255-1271 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1769-1785 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1255}}}],"partialFingerprints":{"codehealthFindingId/v1":"d48b30fb6fc4f218a8f4931b40e8e3148e05af53f83ad40a413c8719dc6274be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:432-448 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:507-523 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebc100c5755bad0f04f1fa7232cadadb573afa79c16b6d7f2ea0e9fc831cfe90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift:153-169 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift:230-244 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift:153\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"7399758e2db55bc6677d031fdb0c6455241480a8b6b3b222dafb02e881f2ce27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:477-492 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:495-510 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:513-528 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:477\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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"677632c220568466296c9a2c8171a8bb62b1f78cc26c6b49445cada02d9ce27b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4033-4049 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2828-2844 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4033\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4033}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c1e086ddadc5a89e399d8502c6415dfaf770d189573168514ff69f6b9e033e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4364-4379 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3141-3156 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4364\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4364}}}],"partialFingerprints":{"codehealthFindingId/v1":"25bcaeb60bdcf17477d14fb707925f2df5e664de5ae41dc4db1c55db9d3ed046"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4383-4398 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3160-3175 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4383\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4383}}}],"partialFingerprints":{"codehealthFindingId/v1":"10266e82a958ba26c83d12b63f0059a2a82330de28f5d5709f0c3e0cc12ff9f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:379-394 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:462-477 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c05222588dde25f3cdc9f427d1d5a347fdf92dfedfd87ca632eb02d964b6f2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1200-1214 | CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift:669-684 \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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift:1200\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":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc274de80efd0127be4357467dac839ef84a787e13e2c7b570c5125de1772b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:479-494 | CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:558-573 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:479\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":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c243757b8f89ed0dd800936f3e4a3234a30e164b1166f2f273a75de86c10f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:503-518 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:555-570 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:503\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:500\u0060 calls \u0060Array\u0060, \u0060Set\u0060, \u0060sorted\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:553\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"67484a34482c2c87ae678d5df056be2b353f5892b6fd5eab55ab8c608dc4e896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:398-413 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:1295-1310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:398\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":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6f44183ff6c097943ef5df69fb281edc589902003ff44a39a121962ae68522"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201315 lines \u00D7 4): CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift:93-107 | CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:58-72 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:68-71 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:55-69 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:68\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":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"488999def87fce7285c6c71f30a28ce88bc33c95e109a4f6098a6c3e61abfd2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:753-767 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:912-926 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:753\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef47aab155c620e749d4184dfde08aac5e245aa551c094a6386a3b017c9ca74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4255-4269 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3033-3047 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4255}}}],"partialFingerprints":{"codehealthFindingId/v1":"484d7f02bd3ab23e99ccf75c0f7980f118baa245b14e23a71ba325ece1e2e0a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4401-4415 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3178-3192 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4401\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4401}}}],"partialFingerprints":{"codehealthFindingId/v1":"101f56967dc58f152fafe8abb69981630aade04aa3d78ffdf9c291c8d77bd246"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1939-1952 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2002-2016 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1939\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1939}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a9ddb7b1a0c6e048ceb66b4b2fe260717093d2bb6e8d3a78c3f53c4c047d9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3018-3032 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3039-3053 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3018}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebb0e9a23c9e46193ca1ee35256f01141249c1729ce70a461723b972ccc0449"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift:826-839 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadForkCompatibility.swift:21-34 | CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.swift:65-78 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"6039d5ecbe08d1706acad203ce9e49ddd74f018e3b00b4e21cb34422d0022887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1407-1420 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1430-1443 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1466-1479 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"c002f4bfca0ea4c77c35ed29d700a4e5c86677a9778d8fa849b7bfb4721127be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:651-665 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:671-685 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:700-713 \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 \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:651\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:688\u0060 calls \u0060preferredColorScheme\u0060 and \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:668\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":"CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e8c620d4e9e30ea06374af73588904aff5644221ff92d4f902f57ef707311fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift:66-79 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:401-414 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:532-545 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/QueuedDraftsPanel.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad1fa580c038baec4ace8a0170ffe3b76734ba4573bebbf2b41b3a12e8b84973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3420-3433 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2791-2804 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3420\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3420}}}],"partialFingerprints":{"codehealthFindingId/v1":"afaa9af7c48f71e2108cc4274084dfcbca4cb468835bfbdfd8885e7f91d14962"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2525-2538 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3199-3210 \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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2525\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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2525}}}],"partialFingerprints":{"codehealthFindingId/v1":"824b6ebe61044793ff9c67bb1b1d8382d12a15659521ff4e14f047b4e191c721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:83-96 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:133-146 \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 \u0060CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:83\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":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"6847f8ae3542dfa4af29352ac873ab10b0a99f2e273161410987da3694629ee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:94-107 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:487-500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:94\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":"CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a26ded13c1be0f8aca0e475953f1b57a2c867ceeac3de7afeec80a9832fddff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2300-2313 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2588-2601 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2300}}}],"partialFingerprints":{"codehealthFindingId/v1":"61fc3a2cd098e96909b300fa591cd8e16f2274b4fe9ea990ddee327d897084f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:10-23 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:28-41 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:42\u0060 calls \u0060frame\u0060, \u0060background\u0060, \u0060Color\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift:24\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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelinePlaceholderViews.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ac23aedcf028e31b98899a8deafaf8e40f6ada9723fad7e0c70cfe98f53966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:908-920 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3074-3086 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:908\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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa2d765b6896915d9b717872c9f3980967e490b624629c06874c97c72de63afd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:501-513 | CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift:676-686 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:501\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2e09b08d4f98383526d19bd40f5578efabea0e2f428294e45d1a353f470a89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:538-550 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:574-586 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:538\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d1dff09e45096dada42d364d0e1ba244f88b046acee5376ec926a8e44e44f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2768-2780 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2790-2803 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2768\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2768}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae20193108fcc8a970b6a9e5842d6a66023b7715a4bda97655d84f0d364f8d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3295-3307 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3504-3516 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3295}}}],"partialFingerprints":{"codehealthFindingId/v1":"d98f1d79bf093571a46c719f268dc59ae168692523988715475efc5bc105fb62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:79-91 | CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:115-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eac5fe6ec3a3760cafb17a938462017e8647dc65c4aee0744bd0786d6b3bc48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift:92-104 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRows.swift:296-308 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift:92\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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"4032e99955d438a38228833d081a93d0b52ad8bfc19cf9f905b3f757ece14dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:420-431 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:488-499 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1697-1708 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2026-2037 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:420\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"20fdcaffed39a4dd810970919bdde989c0ce20639e98dd0dd7f50707e8050354"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3595-3606 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3613-3624 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3595\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3595}}}],"partialFingerprints":{"codehealthFindingId/v1":"91297cfef99b49787511970acb08eaada60de5fbdd9e0770b2e0c8a0bf67540d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3957-3965 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:523-534 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3957}}}],"partialFingerprints":{"codehealthFindingId/v1":"2540cecf913555c6c7cf0413021be0f38e0fbf9c8459090418c29e2c8557804e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1310-1321 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1358-1368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1356\u0060 calls \u0060extractIncomingItemObject\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1308\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1310}}}],"partialFingerprints":{"codehealthFindingId/v1":"6213f3e76de361921420ba0f74ae0510093d5edb4f11f2cd3a8ba056b7db6a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1580-1590 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1610-1621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1580\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1580}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74fa76e7e1f8041ce6e8c3da3eb5e545655bf10f2a9df28751b68cddbe2ebc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:3133-3144 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:73-81 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":3133}}}],"partialFingerprints":{"codehealthFindingId/v1":"24720db4cfed90506978e396adc1f2d58c6527d3b88f67683b856cb24a85e7b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4198-4209 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4394-4404 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4198\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4198}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8af5948d7e46e646479ce7f0eed1deca1699ac4bd774e3474a0d7d977fccb6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4883-4894 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4932-4943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4883\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4883}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3354a56325450e43dd0097b76d56f3334c6a631c74268fec6de75b05599d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:715-726 | CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeRouting.swift:30-41 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4acea44c1647f4e7d449cddf13446169be2554209f15d806c6390b36f671e2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:330-341 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:540-551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:330\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":"CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"6589b40364b4d635f0061c28d0a9205f850dfa7047d2787145e909c04d881420"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/ComposerRuntimeSliderOverlay.swift:436-447 | CodexMobile/CodexMobile/Views/Turn/Composer/ComposerRuntimeSliderOverlay.swift:449-460 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Views/Turn/Composer/ComposerRuntimeSliderOverlay.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8362febbb0241964cb0ab15cd3f25cda359e76dc69bb9d5d90f17e542c269f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/TurnMentionChips.swift:674-685 | CodexMobile/CodexMobile/Views/Turn/Messages/UserMessageBubble.swift:581-592 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Composer/TurnMentionChips.swift:674\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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnMentionChips.swift"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e149e01c75e52587f79a1c496f1fc925ed3cdb6ecf55e7998312088ec56726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift:651-662 | CodexMobile/CodexMobile/Views/Turn/Messages/UserBubbleInlineMarkdownText.swift:300-309 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift:651\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Messages/UserBubbleInlineMarkdownText.swift:311\u0060 calls \u0060markdownLinkRanges\u0060, \u0060inlineCodeRanges\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift:664\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":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfba1d776d67528fb7a3e5a61ed38a76553861f5fdfb4ac6558e1d9362eaeec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:652-663 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:932-943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:652\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e62f69668c99093956786561be3e2b6e8cf2ce62a91bdea6326efe7797583a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 4): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4311-4321 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4379-4388 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4405-4414 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4434-4443 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:4311\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":4311}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b300318920e0bed091fa4139ec01be8a50ce16749f0ed6e9c4b3b83aff41875"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/ContentView.swift:1923-1933 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:202-212 \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 \u0060CodexMobile/CodexMobile/ContentView.swift:1923\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:199\u0060 calls \u0060lineLimit\u0060, \u0060minimumScaleFactor\u0060 and \u0060CodexMobile/CodexMobile/ContentView.swift:1922\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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1923}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b47e2614964586d31954fd477b04460fc51dd8e1e13f845e3937509dc67247"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Models/CodexCollaboration.swift:367-377 | CodexMobile/CodexMobile/Models/CodexThread.swift:743-753 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexCollaboration.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"c42271d72d528791f22df379435710a0cc1b78b721bb256f71d37956c2cf60f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3376-3386 | CodexMobile/CodexMobile/Views/Turn/Messages/UserAttachmentViews.swift:108-118 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3376}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9b848ee9fc1737f606213b129585f13a41ca8f649520b3d68f5d78f6712eef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4417-4427 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3193-3203 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4417\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4417}}}],"partialFingerprints":{"codehealthFindingId/v1":"3acc493ade6293d5cf3c201c031d53e53b05f53fd62df30ae0125849e41b1254"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2905-2915 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2922-2932 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2905\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2905}}}],"partialFingerprints":{"codehealthFindingId/v1":"546bb45e2a3f60a9951e2cbb1e0e0f1e4f30537e9610d305ab61f81ac66a5f99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2529-2539 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2592-2602 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2529\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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2529}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce009111b5c6d20ecf2a8b977569a9d9bf8ca58ad8ca8b821518ee8fb8f9e705"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Sidebar/SidebarNewChatProjectPickerSheet.swift:199-209 | CodexMobile/CodexMobile/Views/Sidebar/SidebarNewChatProjectPickerSheet.swift:212-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarNewChatProjectPickerSheet.swift:223\u0060 calls \u0060preferredColorScheme\u0060 and \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarNewChatProjectPickerSheet.swift:210\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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarNewChatProjectPickerSheet.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae82f4fa8e3b2a8279eca2bbff656407931bd1be86a6b22237ebf89a820d112"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:94-104 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:191-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:94\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":"CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"d33515a530db8d4a762801d4c92fbad6062859db1680d95d876349bf5cfb4e77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:547-557 | CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:575-585 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcd27d9dc5c025006d3dd414959a82fbc71a071994a3a6ed0c7653ea6454fe0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:216-226 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:410-420 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:216\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"f949e63bceb24eec131311c285c2c722672f35d9010363eaa320712973388cdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3192-3202 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3234-3244 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3192\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3192}}}],"partialFingerprints":{"codehealthFindingId/v1":"40eda435d626e3e3d094bba1488ccd5d5c3d29982e4ef1d144e23f5b71bbe6bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3339-3349 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3435-3450 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3339}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4f0a91aff3aa3d47ade72c906dbb5bc5bbdcd77fe0e4e6741586855df9160f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift:190-201 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:419-430 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"241379544aaf49a54a602720d20dfdf2821192e155d85b46251d92523197bb85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift:140-150 | CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift:167-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift:140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift:139\u0060 calls \u0060focused\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift:166\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":"CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeHandoffOverlay.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"52325cdd97ed364edc2720d8752f1996dc89febfdf90e70e2a80d4af80810645"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:114-124 | CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:154-164 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:114\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, \u0060CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:125\u0060 calls \u0060inlineCodeRanges\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:165\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":"CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2990e08b698dea282291b15fd203eab1ad3ee0c7d39106f267945b1186145a5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:68-78 | CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:98-108 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift:68\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":"CodexMobile/CodexMobile/Views/Turn/Messages/SkillReferenceFormatter.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"e10a1dc30992bec4378835aaa7bcb334bb31333f1046abdf700a2fea238053d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:768-778 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:794-804 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:768\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":"CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"02aa80bf0b26874059e2e646d60d7086327c0311a2018cd408c75d9be494795e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:240-250 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1155-1165 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"1111b07ca6e301241a0a4e84d5a7086b86e1a7df65b727d02ba4a4d3d162ec47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift:26-35 | CodexMobile/CodexMobile/Services/CodexService\u002BStatus.swift:282-291 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3181-3190 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3295-3304 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3504-3513 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc67351c831eadf0c401e4636cc6b04e071dff3ab631708917bb05aad6d8a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:902-911 | CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:581-590 | CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:805-814 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:912\u0060 calls \u0060contains\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift:815\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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf732554ac68a3e8a272ef59fb23979b7e9bad77b8dd7237c286810082c292d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:72-81 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:93-102 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:190-199 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:103\u0060 calls \u0060disabled\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:82\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":"CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44dd1f582ef58d3803d415ba3d499896e739041149b99e738040874506a4ba4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2300-2309 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2533-2542 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:2588-2597 \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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2300}}}],"partialFingerprints":{"codehealthFindingId/v1":"e75b4b2db9915a3202a73abc14644898dffba672a8b6694e97101ac0c9e0eed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:381-390 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2477-2484 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:381\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56b908ae7a5b6d609b30742183ebc469c38b685bedfdc91b69759821bd9d9c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1872-1881 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1952-1961 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1872\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1872}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f7d7f8326deee02b366c3f4f24c200875a4c0391b72b1e7c0cdfe902c5fae2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1964-1973 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:2808-2816 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:1964\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1964}}}],"partialFingerprints":{"codehealthFindingId/v1":"877f46ff52aa6731e11ed053d72ca176032d0ccbd186de6a589444df78218e9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6561-6570 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6610-6619 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6561\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":6561}}}],"partialFingerprints":{"codehealthFindingId/v1":"01eb44cb212bbd2c4fb2370c8b2b41d450a98bbd3f73c75e7bbaa46b16321200"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:800-809 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:859-868 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9816354875cbf27ed2e8ff79f3a5d2c7289f73127f84e942198e7c6c01b5a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift:201-210 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:830-839 \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 \u0060CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a5bb3c96c7244c99240f240c996a672a6ecb23d1d3dd620c8cb496abe05c131"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:121-130 | CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:76-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"11243d10f6580421440955a0e28a65cc28aae5a4f26df88cb6d3e5b037499320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:471-480 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:529-538 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift:471\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a85ada589702adf01fa694cf24bec4738a035f2f104df1837920e38509f1cd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryViews.swift:222-231 | CodexMobile/CodexMobile/Views/Turn/Support/TurnErrorReportCard.swift:67-76 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryViews.swift:222\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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryViews.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"3845e7d183457b4bfe7dced24f686fa6d507911e1f0805aacf36a5597367e3aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/AutoApprovalReviewRow.swift:43-52 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineCommandGroupView.swift:54-63 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Messages/AutoApprovalReviewRow.swift:43\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":"CodexMobile/CodexMobile/Views/Turn/Messages/AutoApprovalReviewRow.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"912ec0804809a6b8fa204781faa1633e1f342c4ae8a4e2acd5b047a7bcf4f91d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:913-921 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3025-3033 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3046-3054 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3079-3087 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift:913\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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f8ef1b3ee7de99c55d414d45bec69343b94e81422c5f8f0eed559cefc682282"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3292-3299 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:396-402 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:466-474 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3292}}}],"partialFingerprints":{"codehealthFindingId/v1":"975a681a22b6ba4d092de04367f67776cf007cf237b7d9618bd11db1cb2675a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift:201-209 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:830-838 | CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:904-912 \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 \u0060CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/MyMacs/MyDevicesSettingsSheet.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"02b8f1550ec0e2008c1f51ee39cb09e0476065ae82c7b75b7174c594c5eda74c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift:169-177 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:382-390 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:454-460 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"1697799d4cf53880db18225b9a148324bfd15bea40ee953f97d61d6db37fecb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:326-334 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:345-353 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.swift:45-53 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:335\u0060 calls \u0060fromInlineVerb\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageRegexCache.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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8bf72e9d4cdb789c61688b62fcc6f878294461b5c8c8fb270f163027716a84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Models/AppFont.swift:87-95 | CodexMobile/CodexMobile/Models/AppFont.swift:198-206 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Models/AppFont.swift:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"CodexMobile/CodexMobile/Models/AppFont.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"044bae259e6551f046a6c95b30ce242fd4fb1d5175873569df84dbad4c8617e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2193-2201 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:837-845 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2193}}}],"partialFingerprints":{"codehealthFindingId/v1":"563608b896e2a5a8485ebb222843cb0bc57d3a4104832894689cc20585982e47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:2435-2443 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2492-2500 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":2435}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f38c5311e6931127c61f00d1f3bcd1bbdb57786032f59f502fe4dd748a72b84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2503-2511 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2521-2529 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2503}}}],"partialFingerprints":{"codehealthFindingId/v1":"6178cca07bea5541a02caabb95d967fa09b64417ca3cb4b6dc8275b5a84c3f42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): CodexMobile/CodexMobile/Views/Onboarding/OnboardingWelcomePage.swift:34-42 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:85-92 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Onboarding/OnboardingWelcomePage.swift:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u006024\u0060 in one and \u006020\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Onboarding/OnboardingWelcomePage.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08b54e077a50d1320aa667cb64c4eb80bfeeda221e5134fb61e33a05662a327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Views/Shared/CodexWorktreeIcon.swift:39-47 | CodexMobile/CodexMobile/Views/Shared/RemodexIcon.swift:195-203 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Views/Shared/CodexWorktreeIcon.swift:39\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Shared/CodexWorktreeIcon.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec971615a7a86fe9e0930b16efe8a66f8c2d4a6355bd9c84e26c52c8fe9b8b24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3354-3362 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3370-3378 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift:3354\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3354}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4577cee8156c437efa2670ce072be7580b7dd210c9d53749b242a6efff9c98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:273-281 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:144-151 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:273\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c5359be0fb12e72dacd5bedc0ca6cdbb73abb61527f31b9ec70a632b0f08065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:414-422 | CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:429-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift:414\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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf1451c330a02e78739bc6c4e329b5690d301cd836a945c287e4fb2348b74211"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1765-1771 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1943-1950 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2007-2014 \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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1765}}}],"partialFingerprints":{"codehealthFindingId/v1":"b10de6adf15d330c66ccdabc744860c3ceb41784b546b97c19d1587d5fd861fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Models/GitActionModels.swift:263-270 | CodexMobile/CodexMobile/Models/GitActionModels.swift:277-284 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Models/GitActionModels.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0356673a4429f7834b0bbd85cecbe0bf141a6c767421dad077305a716e027e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4185-4192 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:158-165 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4185}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0169c29a7fda3be5f442a1a1b295156608437d7aed307c0b30330ad4a636b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:365-372 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1994-2001 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5de7a7c06c06f031b5b11866a8a5fb4b597049ef82414ee7d9a27e88a827ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Views/AboutRemodexView.swift:361-368 | CodexMobile/CodexMobile/Views/Onboarding/OnboardingFeaturesPage.swift:70-77 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/AboutRemodexView.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"b35ff7df981828502f85c528404cffb25c72b390025b8ad68dc9c4dcb9a0b588"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift:367-374 | CodexMobile/CodexMobile/Views/Turn/Git/TurnGitActionsToolbar.swift:194-201 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift:367\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffeee2f6447ec524def27ff7116522d4956fad03769fd3466ae3ec5dc04e2e4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2289-2295 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3029-3035 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3050-3056 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3084-3090 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:852-858 \u2014 there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:2289\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3083\u0060 calls \u0060contains\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3028\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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2289}}}],"partialFingerprints":{"codehealthFindingId/v1":"85779ed0551aed949927ed64a32a7d13497a5c8951b550b1c7cd577504fd24ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:352-360 | CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:391-399 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"919bb2ba50474320353850ad787d68aac7d316dc02cae83b257a48907738a0d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift:223-229 | CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift:237-243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift:223\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexAutoApprovalReview.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fd71b3abd97bb4b1dab193b60abb8aab69381b0234229ba0760cdc5b4d2ebeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3810-3817 | CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3827-3834 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:3810\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3810}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ff9037b35cbed007b02165dd2755a82fffdf4f04313817f93500d1f07b35fda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1081-1087 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1177-1183 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1081\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1088\u0060 calls \u0060firstStringValue\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1184\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf2e1b65d717314ebe9fc2142bd70399e0e55680a592605db0d3a271015c369"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift:359-365 | CodexMobile/CodexMobile/Views/Turn/Git/TurnGitActionsToolbar.swift:188-193 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift:359\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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnToolbarContent.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ac859382dbac0f62559c74ac3516100186cfc631b5364f81b9e982d2482509"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:157-163 | CodexMobile/CodexMobile/Views/Turn/Support/TurnImagePreview.swift:126-132 \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 \u0060CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift:157\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":"CodexMobile/CodexMobile/Views/Turn/Messages/WorkspaceImagePreview.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e922669c180f478d58917ceba79ceb92c98d4da6d57c96ad57ae6e98d94280a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:120-126 | CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:413-419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:120\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":"CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"764143c48d74eea778c3b8b09ad8caba14f286daa539f7c86ef637764c42e198"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3028-3033 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3049-3054 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3082-3087 | CodexMobile/CodexMobile/Views/Turn/Plan/TurnPlanModeComponents.swift:846-851 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":3028}}}],"partialFingerprints":{"codehealthFindingId/v1":"e78fc9ffea6129aa012fe71dc93ada82ca76fe20cda4b08e7c624847c0890e82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4289-4294 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3066-3071 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:153-158 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4289\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4289}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e2c42737012e55d75bd38055611d3ab0e1512253746dbbce97a32d349cb03f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1867-1874 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1942-1947 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2006-2011 \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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:1867\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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1867}}}],"partialFingerprints":{"codehealthFindingId/v1":"00693b6c60dcbac60ef3a7cbc97cec7bbedbe627c0343fe2472d84d54ed7bb0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:134-139 | CodexMobile/CodexMobile/Views/Turn/Composer/SkillAutocompletePanel.swift:89-94 | CodexMobile/CodexMobile/Views/Turn/Composer/SlashCommandAutocompletePanel.swift:48-53 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/FileAutocompletePanel.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"2339cc0305b70bb8ce4104887970cd0f28a14c000e0b99500774c74213485b5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4017-4025 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:760-768 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4017}}}],"partialFingerprints":{"codehealthFindingId/v1":"e871c23ca7d642edf5d4d8dc85b7273835da742690473960a70652a8184cbd1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4338-4343 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3115-3120 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4338}}}],"partialFingerprints":{"codehealthFindingId/v1":"721d06afa296b498631bd92ed3770855f81bda83eafe159f92b045100c8804df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift:702-707 | CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift:717-722 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BNotifications.swift"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd6ebe26875f06598a39d6122296c2bedf629ea6c001f00d707af9b93c6e910"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Services/GitActionsService.swift:218-223 | CodexMobile/CodexMobile/Services/GitActionsService.swift:226-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/GitActionsService.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a0b919628cdb0c8733bca64578ca2f5f2091df9f704e077629c6c8beca72a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Services/GitActionsService.swift:268-273 | CodexMobile/CodexMobile/Services/GitActionsService.swift:290-295 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Services/GitActionsService.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d4e50112fc13690ab154b36d406e17765379c26d4a9b2bce6295bbede00a1ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift:17-22 | CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift:62-67 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift:17\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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarFloatingSettingsButton.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"669c799f620da4879ea751a38a0b16ece326746c3de795b42d4803bc570edfcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift:49-54 | CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift:122-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift:56\u0060 calls \u0060escaping\u0060 and \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift:129\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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarSectionHeader.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"09c56527b22b2ee2b0bc10ce2330cbae6582e6e0cc038f77e28b910a510ac2e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Terminal/TerminalConnectionHelpSheet.swift:183-188 | CodexMobile/CodexMobile/Views/Terminal/TerminalConnectionHelpSheet.swift:234-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Views/Terminal/TerminalConnectionHelpSheet.swift:183\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":"CodexMobile/CodexMobile/Views/Terminal/TerminalConnectionHelpSheet.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed20f455b2e757bc1447f8797e1babc219a7c9c52484b7510c6dc167f61db8e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift:42-47 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:205-210 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7534e44826dcb1b4e89b30405253fc393d4e5083c764d4fce1b8d341ae52a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift:48-53 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnUnifiedDiffView.swift:214-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 \u0060CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffRenderer.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e5447f149f291bd26076b8c2b02fa0c2a4fb37cc3eb21aa656617b7ea32d02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:59-64 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift:261-266 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ff917f5070974713812d0a519d3387caa2cff31094d0d90bbb3732c432382a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): CodexMobile/CodexMobile/Services/GitActionsService.swift:133-137 | CodexMobile/CodexMobile/Services/GitActionsService.swift:142-146 \u2014 both copies are in the same file, so extract the block 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":"CodexMobile/CodexMobile/Services/GitActionsService.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"147212f3c2801d3eb39c3087edd959e3d1404abadc6e5bdbf450e335f1656272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:387-391 | CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:405-409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift:387\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00603\u0060 in one and \u00602\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/RemodexMenuBar/BridgeMenuBarViews.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc99d958e0527a5eb9cdd9a8c6c8c7d4d288629bebc17d3ebb4d3c75ed5b2dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/ContentView.swift:1575-1580 | CodexMobile/CodexMobile/Views/SidebarView.swift:808-813 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1575}}}],"partialFingerprints":{"codehealthFindingId/v1":"8624614b2fcdb40d17561afd2a82f348e8ce2ce5cc3a205b790975a180cd33dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Models/AIChangeSetModels.swift:614-620 | CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift:182-188 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a1325b06a8249428d87ac7df07745915b4158af866378cefa75c850ace53a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Models/CodexMessage.swift:50-56 | CodexMobile/CodexMobile/Models/CodexMessageOrderCounter.swift:18-24 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/CodexMessage.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c084bc2bcdea7bdc8f106b7cee62507613a96d8e2bcb180df3dcd177e58ea2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift:120-126 | CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:99-105 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:150-156 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:105-111 | CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift:1009-1015 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"972275302953a8eca57695a99ae6c4d066561f602e7144894b27e2d5ba3ae6a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:47-51 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:58-62 | CodexMobile/CodexMobile/Services/CodexThreadListPersistence.swift:44-48 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"042c2d578f74e129b8317ba8f82780dd78ce47c63cb95c6c89f4ef0d8a418c0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:85-89 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:107-111 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66ab4aa34e064449f54f366c72d1c3a3c73b9c6824d3f3ab0f22f5281b65a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift:91-97 | CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift:114-120 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift\u0060 and \u0060CodexMobile/CodexMobile/Services/CodexMessagePersistence.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexComposerDraftPersistence.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2376bb5631eb493bed9ae868e7e0a66b8f93acf3b98f43e7a0d25725cdf64aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BTrustedPairPresentation.swift:44-51 | CodexMobile/CodexMobile/Views/MyMacs/MyDevicesPresentation.swift:208-214 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BTrustedPairPresentation.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"886807cf5eb5f60a187a75379b98fa0302251ed5d5c2ebe011344ccb1b3faf8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:696-705 | CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeRouting.swift:10-19 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c87b43f82a0facf586c5912b10d4cae1611878ffecb700bfd36ec01f4cef197"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift:707-713 | CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeRouting.swift:21-27 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"0852af9422896764f36d03e752a640ed95767ba84befee489e53cf8661516b7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Services/DesktopHandoffService.swift:14-23 | CodexMobile/CodexMobile/Services/GitActionsService.swift:14-23 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Services/DesktopHandoffService.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"d630b3dc2a649a8091e4d4988ad625febaf99e8baa63f0d1616d1f3e5ba4aacb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:127-134 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:236-243 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift:77-84 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b0cd71b003724d0693e2aa25d5af5cd274444a92dde664d5aa0d1517e54356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:136-145 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift:86-95 \u2014 before extracting anything, compare \u0060CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift\u0060 and \u0060CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionStatusBadge.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd18b67b614585f185f2c58e4ad4f44291dd6f7809b45b2cea04d51f067157b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift:188-195 | CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.swift:268-275 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Home/HomeEmptyStateView.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a04f7d356bed72709026fadb9b84468a7ae21b8a3111db6b5d9f7c733104a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift:493-505 | CodexMobile/CodexMobile/Views/Payments/SubscriptionGateView.swift:453-465 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd2887a836b478bd6d087b98baed186f52bb8858b99f0a9f9b9914373e6d419"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:713-724 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:900-911 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd37424440f7c0cd3b32d322b2c34bfcfdce8463f5ecc0aaab877b45d01834c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift:1109-1114 | CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift:1483-1488 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cff3b218420a00002d232e0c721d79f8c2bf344e44521dba7514030399dc425"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift:548-554 | CodexMobile/CodexMobile/Views/Turn/Messages/MarkdownTextFormatter.swift:303-309 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3db1a37966f9deea76bd6c85e5fda823deb51cff1b8faa24b1b19d65e69866"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:490-496 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1271-1277 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"de37aec5d010b90961abdb424ff70dd47feef00fbfcfc1fa5dc75acbc637841a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): CodexMobile/CodexMobile/ContentView.swift:904-913 | CodexMobile/CodexMobile/Views/Turn/Core/TurnViewAlertModifier.swift:106-115 | CodexMobile/CodexMobile/Views/Turn/Messages/TurnMermaidRenderer.swift:249-258 | CodexMobile/CodexMobile/Views/Turn/Support/TurnImagePreview.swift:135-144 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2dd7b88e8903f3a8eb7de61fef006e06d4710c18494c95de98ba34e21aeddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): CodexMobile/CodexMobile/Services/CodexService\u002BAIChangeSets.swift:676-683 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3718-3725 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3887-3894 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingPlanMode.swift:146-153 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingPlanMode.swift:155-162 | CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift:6898-6905 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadProjectRouting.swift:299-306 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1080-1087 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:3214-3218 \u2014 there are 9 copies across 6 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BAIChangeSets.swift"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5ea5a7d3ad4affcc2a1e4873f6a0dd4450e5b032acbdb1aa9af0fb8029abcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:515-522 | CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift:524-531 | CodexMobile/RemodexMenuBar/BridgeControlService.swift:550-557 | CodexMobile/RemodexMenuBar/BridgeControlService.swift:638-645 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"0535201dabdee5bb1f403a8be93a5f19a126edd87e4e0e906594c4df84cf9cd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4469-4480 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:365-372 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4469}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1e880b9bcbb1de384ec4021df55e06bee431f3b9cf59a4bc008f372ca8a07c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift:968-974 | CodexMobile/CodexMobile/Services/CodexService\u002BStatus.swift:98-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":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4af708a913928fe854044ea385e0505d332be6056e715b10976e36de9b804d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift:761-769 | CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift:1258-1266 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b8531c14adee7c4f8f66b47dc7a66f003b9378b5ac745b10e0cb14c0a13b456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift:95-104 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:149-158 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8253d8c6ce5d5abb28e29bd9ad5f032159ac431e593d34b7f7c8850c5dfd01e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift:138-142 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.swift:914-918 | CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineRenderProjection.swift:1140-1144 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineBlockAccessories.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ae07da9d36205f309f02a161fb0e2dbc76fb2dab245b634497875d3ea4d2b17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): CodexMobile/CodexMobile/Models/GitActionModels.swift:177-185 | CodexMobile/CodexMobile/Models/GitActionModels.swift:357-365 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060CodexMobile/CodexMobile/Models/GitActionModels.swift:177\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/GitActionModels.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e466ab23b4ad68403b826dad61157c7616d252bcf58f264422322724348c70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:513-517 | CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:3805-3809 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:513\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"53dfd431d3af5048c4d69b9c3024a0aa98f7a1f830c6680bd9e46abe130d5942"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4519-4524 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.swift:423-428 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function 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 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift:4519\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4519}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c4a96b8dd70be1ec3953309d38276a11ae5c9961dc57f35f17e57b44cb50ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift:2699-2703 | CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift:266-270 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060paramsObject\u0060 to \u0060IncomingParamsObject?\u0060 in one and \u0060IncomingParamsObject\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":2699}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f3d1a3b1783ced176db13b0aa125c28da693548491f33a0e839d9bcc511281"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CodexService (LCOM4 8): CodexService\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"c42ccc0282c2820240eb19661448c85aee014ec58bf49de4fb37fbddda0d2b51"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TurnViewModel (LCOM4 5): TurnViewModel\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/test/fixtures/desktop-steer-harness.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb481e3a55471f4515ab25ade77a9c94c0e60ddecf94e8d7c17067972e52138"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: GhosttyTerminalView (LCOM4 4): GhosttyTerminalView\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43bbbf7d1cfcdbe4dadd4d5edfe66af00c3d6255b0fa35640b631c6ccd06a30"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Coordinator (LCOM4 4): Coordinator\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c934898e630f13011d5700af7659cca9632e436e2989073d8da9c862fa8b8af"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TurnComposerPasteInterceptingTextView (LCOM4 4): TurnComposerPasteInterceptingTextView\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e186ea798dcc7a16d170a9541713d4f914e9f06297479db19d05122b5e903de2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: TurnViewModel (LCOM4 4): TurnViewModel\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bc12d11efe17bf9d04111637ec75b39df2250b238fd9fdd16cf289a354f44b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testFollowBottomDropsDelayedCorrectionRepairedByNativeAnchor: 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":"CodexMobile/CodexMobileTests/TurnTimelineReducerTests.swift"},"region":{"startLine":7252}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c087402e95de940cfd7771e1a16347e315766163940db99137aedd568c0410"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testFollowBottomDropsQueuedRetryAfterReachingBottom: 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":"CodexMobile/CodexMobileTests/TurnTimelineReducerTests.swift"},"region":{"startLine":7297}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4a02edc7529405544aaff15d7675a36b6a0eca2108aee7b4f6411d18dea3ddf"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testCancellingFollowBottomClearsQueuedRetry: 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":"CodexMobile/CodexMobileTests/TurnTimelineReducerTests.swift"},"region":{"startLine":7320}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67be3b110e56fea1027ffa99d0c6335c2e78dd262e8460db6aecd8eff62deb6"}},{"ruleId":"D11","level":"error","message":{"text":"Flaky test: phodex-bridge/::bridge Activity is opt-in and canonical-only endpoints need no Desktop IPC: Passed 2\u00D7, failed 1\u00D7 across repeated runs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b6f1920159c9093d4ce88e56f9bbc9972b958f406a06ed4010a58b8349b9c52a"}},{"ruleId":"D11","level":"error","message":{"text":"Flaky test: phodex-bridge/::capped bootstrap attaches mid-turn growth under a synthetic turn without replaying the tail: Passed 2\u00D7, failed 1\u00D7 across repeated runs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"735b0579036e9032c6c37da5bb6aae5c9c395379ba4946d1f1b17095827246b3"}},{"ruleId":"D11","level":"error","message":{"text":"Flaky test: phodex-bridge/::capped bootstrap attaches to an openerless active turn visible inside the window: Passed 2\u00D7, failed 1\u00D7 across repeated runs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9e198f3a02a9e0e5e6900e3a921c7af931013f2a7e2aac8558e48af27d594fa0"}},{"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":"9ca10940856112829d8cd878dd15ae2a272a50a252303bbf7018df6f585c573e"},"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: phodex-bridge/src/bridge.js: phodex-bridge/src/bridge.js changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in bridge.startBridge at line 718. 3 of those changes were fix/bug commits, and the other 16 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/bridge.js\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":"phodex-bridge/src/bridge.js"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"4baab7f96917e4f224586e0f7a11a5864b2891e2e0b64732718c6d11a7cf4084"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift: CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in CodexService.ensureThreadResumed at line 1288. 4 of those changes were fix/bug commits, and the other 10 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2da408acaadd6433a99e3608dd57879d7c4dd6fb52f7e426fb55c75d17b4f3d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift: CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 168 in CodexService.mergeHistoryMessages at line 938. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BHistory.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1202dd1bda0cabe39d5ed4a70a1a575b4eeb1f8e2bc558b09341641920d68c1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift: CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in CodexService.handleNotification at line 177. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e68e3c34977d9409d1df988f7f7578629e4a8a6deb3044f51d8afd389a8765"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: phodex-bridge/src/desktop-ipc-action-follower.js: phodex-bridge/src/desktop-ipc-action-follower.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in desktop-ipc-action-follower.createDesktopIpcActionFollower.submitDesktopFollowerRequest at line 2448. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/desktop-ipc-action-follower.js\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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"993f73239cbe5c11258881cddf7a6a50fe03cf143550c5ad3cab8212c9b45f2c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift: CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in TurnView.body at line 75. 2 of those changes were fix/bug commits, and the other 4 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Views/Turn/Core/TurnView.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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c5eeed879ccb662c523a5c5160e05999f85f012becf08e3fd13e4aa32dd63d7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: phodex-bridge/src/opencode-runtime.js: phodex-bridge/src/opencode-runtime.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in opencode-runtime.createOpenCodeRuntime.handleRequest at line 1228. 3 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/opencode-runtime.js\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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"4738386fba048f3d02dbebbfd29b95bb3e8a41d05acbd0575cdb76220818113a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: phodex-bridge/src/desktop-ipc-live-owner.js: phodex-bridge/src/desktop-ipc-live-owner.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in desktop-ipc-live-owner.createDesktopIpcLiveOwner.observeOutbound at line 334. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/desktop-ipc-live-owner.js\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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"ace8dbb79eac7b5cff3139d107c354df2a59072bc6e68afd5f6f0ea89e8a6caf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift: CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in MessageRow.assistantView at line 536. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.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":"CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"667153354fc4f664c58d4eb0f00c48b980f2ce136603f10926da2e26f94a7cc8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: phodex-bridge/src/desktop-ipc-conversation-adapter.js: phodex-bridge/src/desktop-ipc-conversation-adapter.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in desktop-ipc-conversation-adapter.buildConversationStateFromThread at line 445. 1 of those changes was a fix/bug commit, and the other 4 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/desktop-ipc-conversation-adapter.js\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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6a12f3a7fff2f9b83e2c301c8c851cffe6daac0c65f10516c4d45dd7ad0137a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift: CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in TurnComposerHostView.body at line 62. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerHostView.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"148ad390f26f4d025f5b2867e53c44a3f6a4ebf3b1464beb5a138a6524aada3f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift: CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in CodexService.loadMacScopedDefaultsState at line 226. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.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":"CodexMobile/CodexMobile/Services/CodexService\u002BMacContext.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab0ab1deda0a49e35eead00c0cac22ac108b62c8a65c31470cd96cde9a1a48d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift: CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in CodexService.loadOlderThreadHistoryPage at line 221. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5389e960f90f71c0d4e040240e51f5f6c6a149e3d7b72802a98aa985420e87"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift: CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in CodexService.mergedThread at line 95. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\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":"CodexMobile/CodexMobile/Services/CodexService\u002BHelpers.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9f1058bfb224630f21370c2aee704bd9ce0cdb9f40c8f8900b52e5d22911e9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift: CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in CodexService.deliverAsyncUserInput at line 71. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.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":"CodexMobile/CodexMobile/Services/CodexService\u002BAsyncUserInput.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff7c19e2cf716a39d3209b532505cebebeaf6afb1758bc6d1fa39168c3dd5a6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift: CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in NewChatDraftView.body at line 116. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.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":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"85986886b5dd8a004972e1aac1934b396d14309338f1a6f4a2aadcf8929df56c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: phodex-bridge/src/desktop-handler.js: phodex-bridge/src/desktop-handler.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in desktop-handler.handleDesktopMethod at line 62. 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-05..2026-11-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-05 10:19:50 \u002B01:00\u0027 --until=\u00272026-11-03 10:19:50 \u002B01:00\u0027 --full-history --no-merges -- phodex-bridge/src/desktop-handler.js\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":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1b8966ac858cd4b53d71a5fd3697956e7854acea5cea1241480e74374d04a8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: guard against nil \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Messages/UserMessageBubble.swift"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87c3fb1983fdb275268ee0112fa083a2c68490059ed7e02b8c91758f46f0290"}},{"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 \u0060CodexMobile/CodexMobile.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"655c81b0bad85321b018deab518cb77cef2b248e5a9bd216358bcf30a6434572"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060hasInlineHistoryImageDataURL\u0060 spells \u0060URL\u0060 where 22 names in the project spell it \u0060Url\u0060: 22 of 24 names in project repository spell the token \u0060Url\u0060 (22 of 24; unit: names in project repository containing \u0060Url\u0060). Peers: CodexDesktopRefresher.pendingCompletionTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:76); CodexDesktopRefresher.pendingTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:78); CodexDesktopRefresher.executeRefresh(targetUrl) (phodex-bridge/src/codex-desktop-refresher.js:398); CodexDesktopRefresher.followActivationTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:644); CodexDesktopRefresher.followActivationTargetUrl(targetUrl) (phodex-bridge/src/codex-desktop-refresher.js:644). Rename to \u0060hasInlineHistoryImageDataUrl\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5081}}}],"partialFingerprints":{"codehealthFindingId/v1":"977cea2187c8dfd62ec6ea2562a3759268395ea76faaa8badb765d42e0f055a1"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060sessionID\u0060 spells \u0060ID\u0060 where 225 names in the project spell it \u0060Id\u0060: 225 of 229 names in project repository spell the token \u0060Id\u0060 (225 of 229; unit: names in project repository containing \u0060Id\u0060). Peers: remodex-jsonl-diagnose.ensureTurn(turnsById) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.ensureTurn(turnId) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.readTurnId (phodex-bridge/bin/remodex-jsonl-diagnose.js:434); bridge.annotateTurnStateProbeWithMirrorActiveTurn(getMirrorActiveTurnId) (phodex-bridge/src/bridge.js:568); bridge.rebindThreadTurnsListResponseId (phodex-bridge/src/bridge.js:624). Rename to \u0060sessionId\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47f6b3d05dd76f36d0b0993c738b3fed8bee3d2242fc37a4bd02a39f9107610"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060modelID\u0060 spells \u0060ID\u0060 where 225 names in the project spell it \u0060Id\u0060: 225 of 229 names in project repository spell the token \u0060Id\u0060 (225 of 229; unit: names in project repository containing \u0060Id\u0060). Peers: remodex-jsonl-diagnose.ensureTurn(turnsById) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.ensureTurn(turnId) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.readTurnId (phodex-bridge/bin/remodex-jsonl-diagnose.js:434); bridge.annotateTurnStateProbeWithMirrorActiveTurn(getMirrorActiveTurnId) (phodex-bridge/src/bridge.js:568); bridge.rebindThreadTurnsListResponseId (phodex-bridge/src/bridge.js:624). Rename to \u0060modelId\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"74302585a13e9b263eb465eaa199f11ab2b64631dc24c96955cf80fecaa4949b"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060petFolderNameFromID\u0060 spells \u0060ID\u0060 where 225 names in the project spell it \u0060Id\u0060: 225 of 229 names in project repository spell the token \u0060Id\u0060 (225 of 229; unit: names in project repository containing \u0060Id\u0060). Peers: remodex-jsonl-diagnose.ensureTurn(turnsById) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.ensureTurn(turnId) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.readTurnId (phodex-bridge/bin/remodex-jsonl-diagnose.js:434); bridge.annotateTurnStateProbeWithMirrorActiveTurn(getMirrorActiveTurnId) (phodex-bridge/src/bridge.js:568); bridge.rebindThreadTurnsListResponseId (phodex-bridge/src/bridge.js:624). Rename to \u0060petFolderNameFromId\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf35744342467488535cf230f8f8e4a1a2798bb3781bcfed77a8e70e9970948"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060rawID\u0060 spells \u0060ID\u0060 where 225 names in the project spell it \u0060Id\u0060: 225 of 229 names in project repository spell the token \u0060Id\u0060 (225 of 229; unit: names in project repository containing \u0060Id\u0060). Peers: remodex-jsonl-diagnose.ensureTurn(turnsById) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.ensureTurn(turnId) (phodex-bridge/bin/remodex-jsonl-diagnose.js:292); remodex-jsonl-diagnose.readTurnId (phodex-bridge/bin/remodex-jsonl-diagnose.js:434); bridge.annotateTurnStateProbeWithMirrorActiveTurn(getMirrorActiveTurnId) (phodex-bridge/src/bridge.js:568); bridge.rebindThreadTurnsListResponseId (phodex-bridge/src/bridge.js:624). Rename to \u0060rawId\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d27a0bc949cad749d3a0324100bd1642745ac7171aa3b245e62ece459b8133"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060containsInlineImageDataURL\u0060 spells \u0060URL\u0060 where 22 names in the project spell it \u0060Url\u0060: 22 of 24 names in project repository spell the token \u0060Url\u0060 (22 of 24; unit: names in project repository containing \u0060Url\u0060). Peers: CodexDesktopRefresher.pendingCompletionTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:76); CodexDesktopRefresher.pendingTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:78); CodexDesktopRefresher.executeRefresh(targetUrl) (phodex-bridge/src/codex-desktop-refresher.js:398); CodexDesktopRefresher.followActivationTargetUrl (phodex-bridge/src/codex-desktop-refresher.js:644); CodexDesktopRefresher.followActivationTargetUrl(targetUrl) (phodex-bridge/src/codex-desktop-refresher.js:644). Rename to \u0060containsInlineImageDataUrl\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4c3227efe67faf9d944fe2b5dc7837b4c4f07d190aa6d09ff97291c7d7b5ea"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. The most over is \u0060CodexMobile\u0060 (106923 LoC, 882 module-visible types across 27 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7d40d58bbc60934df83fe747fd71b4db5a147c527d0292a84a28ee721bc739eb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0eea5e8924aa44aab3c784e22e6c26fe1d0ab52cb748e296ea373f8fe323f212"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1fe1bc03e208e839114ea1ff19ae99a3ed440b5bd55be68831c1f17723574f1c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b284a341ad569764d6fa3231b741469c8457056fb95f7224c31510be30ff5874"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cceede743dfbf04553e5aa790c340415515107b832d6b135a759c531a314dc45"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c458352b8afef143c7f209d64e7bce782c0aba5f65747d8fae514564082d575a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b093a0682e5878cecab029c3b00eb76909c6583274a428d8b8e604aac5314cfa"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-7","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e639919e898de880d892458f855f83c4db92a6be2c84bfa01adb1adc5b56af40"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-7","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2f42ce3beee68202ecde16829776365ad89c60a58bbabe86415a6e165bc55053"},"taxa":[{"id":"CWE-1333","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ced2153239858efa874b415cc87abdb027cc598678fab2f40ff6e7fcd0f65aef"},"taxa":[{"id":"CWE-1333","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"860f99be9f6faed7e6edb1a2c69f28695ec6c409458f9e607b9dfc63311747bd"},"taxa":[{"id":"CWE-1333","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4293c56cdc075b9f12d45eb745621567d7ad926e6d2fae1b17d7c03aa26de19b"},"taxa":[{"id":"CWE-310","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"03dfbc9dbc6b3e629dbd62b041bf30faab6b3e3824e7e6e512cbba220174cc32"},"taxa":[{"id":"CWE-310","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c9540114a09cfa38343d56bf0e504c0d4a0ce8cfba4e7b4bcc0780776118f6a8"},"properties":{"dependency":{"package":"github.com/apple/swift-nio","version":"2.99.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 266 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 266 of the 325 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: CodexMobile/CodexMobile/RemodexQuickActionCenter.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/RemodexQuickActionCenter.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ffd179c1ca1a2f4d9884529868a5b5473865da9e845d9a06217096c52b9df1"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: GitActionModels.swift \u2194 git-handler.js: \u0060CodexMobile/CodexMobile/Models/GitActionModels.swift\u0060 and \u0060phodex-bridge/src/git-handler.js\u0060 change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060b00dc3d6\u0060 Keep Git actions visible for repo-bound root chats; \u00609ea2c2b4\u0060 Add live progress and success to git actions; \u006038f2fa6a\u0060 Add stacked git publish actions and progress toast \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Models/GitActionModels.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0e1dc00b637047d1db10d5ece936e004cf93adb46d080766f5e224e8e1e355"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: CodexService\u002BIncomingAssistant.swift \u2192 CodexService\u002BHistory.swift, CodexService\u002BIncoming.swift, CodexService\u002BMessages.swift, bridge.js: \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift\u0060 changes together with 4 other files \u2014 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift\u0060, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift\u0060, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift\u0060, \u0060phodex-bridge/src/bridge.js\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BIncomingAssistant.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9052efa30440bf11df0893763b274fa08502cdf3eefcb629fd40eab7090ac895"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: TurnTimelineView.swift \u2192 TurnComposerInputTextView.swift, TurnMarkdownTextRendering.swift, TurnMessageComponents.swift: \u0060CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift\u0060 changes together with 3 other files \u2014 \u0060CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerInputTextView.swift\u0060, \u0060CodexMobile/CodexMobile/Views/Turn/Messages/TurnMarkdownTextRendering.swift\u0060, \u0060CodexMobile/CodexMobile/Views/Turn/Messages/TurnMessageComponents.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c466d91e17a07ceb5ec1cf4f85336047aad0d2c1b9eede0025326fc9d5b5fca"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CodexService.swift \u2194 secure-transport.js: \u0060CodexMobile/CodexMobile/Services/CodexService.swift\u0060 and \u0060phodex-bridge/src/secure-transport.js\u0060 change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u006014a82574\u0060 Stabilize replayed activity and widget state; \u006006601968\u0060 perf: improve bridge memory and low-network efficiency; \u0060afb8a2d5\u0060 Pairing and bridge service fixes \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cff825a6f53320d0d321414dfe87a25f4812fff4861187465dc71100b97a7f4"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: desktop-ipc-action-follower.js \u2194 desktop-ipc-live-owner.js: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 and \u0060phodex-bridge/src/desktop-ipc-live-owner.js\u0060 change together 62% of the time (25 of the 40 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are \u00602e612b44\u0060 Align mobile continuation routing with v3.2 desktop IPC; \u0060c85e65c9\u0060 Improve local runtime and timeline handling; \u0060fb4ee01a\u0060 Improve local relay recovery and thread state reconciliation \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9db4ae0f9758b1c960b1268315a227444641e38f82d36d76b7e849131a771d"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: CodexService\u002BConnection.swift \u2192 CodexService\u002BSecureTransport.swift, CodexService\u002BTransport.swift, ContentViewModel.swift: \u0060CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift\u0060 changes together with 3 other files \u2014 \u0060CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift\u0060, \u0060CodexMobile/CodexMobile/Services/CodexService\u002BTransport.swift\u0060, \u0060CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"512925c27834b2a1a852fd4c33384254958a45712271855914cae818ec61401e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CodexService\u002BSecureTransport.swift \u2194 ContentViewModel.swift: \u0060CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift\u0060 and \u0060CodexMobile/CodexMobile/Views/Home/ContentViewModel.swift\u0060 change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u0060b712ecd7\u0060 Encrypt local change ledgers with failure-safe key recovery (#216); \u006073e5bc5b\u0060 Improve local relay reconnect handling; \u006033f05c3f\u0060 Fix trusted reconnect recovery \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f308e644649f2f623c38279b7d4220c75b8484d35fcec0c413705c8fd376f740"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: NewChatDraftView.swift \u2194 TurnView.swift: \u0060CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift\u0060 and \u0060CodexMobile/CodexMobile/Views/Turn/Core/TurnView.swift\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060d492e01b\u0060 Bound detailed diff rendering on iOS (#227); \u00601a5b0eb5\u0060 Harden bridge and mobile runtime error handling (#162); \u0060c987076f\u0060 Add native Codex thread goal support (/goal) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Views/Turn/Core/NewChatDraftView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0fe781e23a4b014660ed1de58cbca1cbced123972524c01f040fa3a772cff58"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CodexService\u002BMessages.swift \u2194 rollout-live-mirror.js: \u0060CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift\u0060 and \u0060phodex-bridge/src/rollout-live-mirror.js\u0060 change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u0060c85e65c9\u0060 Improve local runtime and timeline handling; \u00607692ebff\u0060 Improve thread loading, timeline grouping, and relay recovery; \u0060fb4ee01a\u0060 Improve local relay recovery and thread state reconciliation \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a958cd8bfb7369e75d22530430f7450b306253b426a32de891d69a1a6d9f429"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CodexService\u002BSecureTransport.swift \u2194 bridge.js: \u0060CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift\u0060 and \u0060phodex-bridge/src/bridge.js\u0060 change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u006073e5bc5b\u0060 Improve local relay reconnect handling; \u00608d0c292e\u0060 Harden reconnect recovery and relay watchdog; \u006086227c76\u0060 Fix iPhone voice auth and local bridge pairing flow \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bce089d20b813aeffee647d27f1ff16d1aa78f8287698c9798de1d92763bdb5"}},{"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":"9c8c3968244885727fef27da94ad4e4d50aa86ca43e157b9e2d3e4c7f5893cb2"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"ED4","level":"error","message":{"text":"Dual write (no outbox): CodexService.saveLocalState: \u0060CodexService.saveLocalState\u0060 performs two independent DURABLE writes \u2014 \u0060messagePersistence\u0060 (a persistence store) via \u0060save\u0060 and \u0060composerDraftPersistence\u0060 (a persistence store) via \u0060save\u0060 \u2014 in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/CodexMobile/Services/CodexService.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"842c64c4216a921fa821d6d402a6bddf1e999559645272c2ce74fd845af63a4f"}},{"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":"M4","level":"note","message":{"text":"README/code drift: phodex-bridge/README.md links to \u0060SELF_HOSTING_MODEL.md\u0060, but \u0060phodex-bridge/SELF_HOSTING_MODEL.md\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/README.md"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"25c4d25cfd09108ef85f97fe8b83c206c84e23afd21934cc3cc779e14439c183"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: phodex-bridge/README.md links to \u0060CONTRIBUTING.md\u0060, but \u0060phodex-bridge/CONTRIBUTING.md\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/README.md"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dff3305a507528d9b5e98932dc76b904149ccba1f4d0ced7541cf1280ccce71"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: phodex-bridge/README.md links to \u0060Docs/self-hosting.md\u0060, but \u0060phodex-bridge/Docs/self-hosting.md\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/README.md"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4cb2320ceedeee4394620071126d4dbb01b39c36b3ec9ee01299b23285d362"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: phodex-bridge/README.md links to \u0060relay/\u0060, but \u0060phodex-bridge/relay\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/README.md"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"b259674bd9d374ddb78232480946163db97dc3c462af828fd9d47f8767bb358d"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 1/3 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060CodexMobile\u0060, \u0060relay\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 741 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d3185912076b04318f5dcd40c605731d6af32e9574050b2ca93dc7ef3252c4"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 742 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ce685e88f8113da431d867ed071f64ccccaf9cfe9ad4d00e1851b9630b20d9"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 750 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f84faffcd30715bbfa0b104f7e409e4c3f3c3b93668a8374170957266de31a7"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1014 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce5f0c6a5d1908091b2fd8da9f84382540155bfeb4ab5848eb73ac7f6594707"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1016 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf34a7f20174865c41d9638d0081ff7b052a8619b1e8a7080f74713fb4ee4bc6"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1017 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"9734ccb3242a2bb266abe37e6a8aaca8e24adb57d07f10cfbf38b5a3e89f03a8"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1018 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"65767230e59530f66a67e8d00c1724eb3dca80e4a4645b7fe7a90e81e425c579"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1020 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"d015c9a25dcade627a778b2ec3cae7a9cab572bc882e8961bcb2581026067c23"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1082 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"80538fce6d4829f86eb2fef5d559c9f09b0cbb681cddb034dfb8d52b1b859457"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1111 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a967881a43de859a33d9a0dce8d3d8b2dff624d1a8bafd33cbaba4fcd51d42"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1133 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad84e0dd8fba2726b385dec14d9513a312565f3b8d349078ccb978e5d875201"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1303 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"be6134f2cfc56f947f9c1c2bc463f697a2f8d6277ec0777a2a83236eae41c8eb"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1353 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"59dc7143e3c0985ad2e16fb0a5dfb0749f8042cfee4c03347d910a316a28df6c"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 1811 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1811}}}],"partialFingerprints":{"codehealthFindingId/v1":"e146af9194cc33d19a7830e07aa71dbb67b43619cf57e7b9481ca735aaafeb7a"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 2386 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2386}}}],"partialFingerprints":{"codehealthFindingId/v1":"83c27f8f17e19776c345a055fc50e0721fca97e5820282fd6ae2760f4266e868"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 2606 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2606}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24d48ec63b3b05d9078e999edd49b3587a87c2c505402e791c7ff0bd00c244c"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 4070 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4070}}}],"partialFingerprints":{"codehealthFindingId/v1":"23656f1b9c7d36b2657f72f4f944a7484d93d9ddf088e631b2ae2b667168c1bc"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/bridge.js\u0060 reports through \u0060console.*\u0060 at line 4107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4107}}}],"partialFingerprints":{"codehealthFindingId/v1":"187800f194964c696e721dd49284f8e7029785cd478f4dd410b6430f15421ee8"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/codex-desktop-refresher.js\u0060 reports through \u0060console.*\u0060 at line 580 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66abc0ec7d525b7d0d9b77ba236938949fb95bd554ffc5da1a114ee23a4cdc4"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/codex-desktop-refresher.js\u0060 reports through \u0060console.*\u0060 at line 585 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a17dce15d539f4d63981086cc2c38fa0d0850ffed1baddd2d752337b078550"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/codex-desktop-refresher.js\u0060 reports through \u0060console.*\u0060 at line 616 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"95b9f98981beb61385f499b02279e0ed2ab83c445728073108e875200e936daa"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2353 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2353}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca29ef3c3595ae34f21f2b5e6c1ab39fa95462c083d340532ee7d13b33d8ceb8"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2516 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2516}}}],"partialFingerprints":{"codehealthFindingId/v1":"37ba02ab53728219adc8f4483affab0d790a997bf8ecc5087878ad407dfead3f"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2610 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2610}}}],"partialFingerprints":{"codehealthFindingId/v1":"f255ae1263b794db8166b5b177903ae84ae02abde4185269af5cc3a38b3eb271"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2708 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2708}}}],"partialFingerprints":{"codehealthFindingId/v1":"756c3a6adc1b2abaeae44ce229595307d3aa8e7c013f7543ba03a75d986109fb"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2890 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2890}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30cca9b596e7fada51635d4b03bab1269cabe90cf26399c689fbc4866786bfc"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-action-follower.js\u0060 reports through \u0060console.*\u0060 at line 2903 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2903}}}],"partialFingerprints":{"codehealthFindingId/v1":"6156fc67fc368f27a2c2db5aff5af36c25972bae96fa2653f916043abf8c719d"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-live-owner.js\u0060 reports through \u0060console.*\u0060 at line 1215 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e797c24f5a1cf4b78d2085bef44f313d613105db8de561af109f71806275edb7"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-live-owner.js\u0060 reports through \u0060console.*\u0060 at line 1864 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1864}}}],"partialFingerprints":{"codehealthFindingId/v1":"65bdb92ffa685a184e838e1509efa72adf29e0ae433e894c73eaa76f2b17eedb"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-live-owner.js\u0060 reports through \u0060console.*\u0060 at line 1912 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"b93f3e2dd78a84d094685198cd65c763d7b1269100c5ee2a7e772b10a9f81e95"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-owner-transport.js\u0060 reports through \u0060console.*\u0060 at line 96 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4b8619faa360ddc640e3ab0e2f5dfcbab8ee3b29ddbe4aa635091003922b82"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-owner-transport.js\u0060 reports through \u0060console.*\u0060 at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5dd08b813873faa021d42c15fb8fed1627a7e38fea4de8b32ddc9617d63258"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-owner-transport.js\u0060 reports through \u0060console.*\u0060 at line 154 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"243d567b5c7e7fc387ac832b7480f5cc2cc50829225eac86e97a48bf291c811c"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/desktop-ipc-owner-transport.js\u0060 reports through \u0060console.*\u0060 at line 415 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7c65c4b281ef9539dd09abad581b2775025054510f7a7acd56b8a20afd6693"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/git-handler.js\u0060 reports through \u0060console.*\u0060 at line 2072 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2072}}}],"partialFingerprints":{"codehealthFindingId/v1":"f83394a235a3d183a43d05205ad5163c669903d6dbe3bfc791a186f27ec2cba2"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/git-handler.js\u0060 reports through \u0060console.*\u0060 at line 2078 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2078}}}],"partialFingerprints":{"codehealthFindingId/v1":"45df0a67255a31ad712d8c44ab6fd1ed43a42e1fa13286c9bf42604c40d881c5"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"82842887f7faa334b2794a0ac5e50641a875be9fbea88757e49d91b07e9ee668"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 349 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb61e1276852092e6d59fdcac31f9bd14f6d40f70b1ad2a33149def3a2401568"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 350 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"41da84096a937c99df47e02c17deac0ae3f08f9dad4090e742951656887b3785"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 351 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2e2dbf3fa2e6e897aac547e46c1fbb439579888829246dd1787c3c8521c253"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 352 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"14337a61460bc71723620f44c378c66847352be1cf35f9fc7dca2412a22f35f2"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 353 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"13bd640380746074628720d09725b1e8e52238fa3778727578eff9793fb2bfc3"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 354 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"d243a943745930785dbfbb467424eab566d03a2eb2f2e9e6640569d9d751f742"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 355 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc515acec2c0b60d94d757e0619d2f4c2f970996eb5a3d1a9a8a9ff877d534de"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 356 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"716602571109634dd72269d4d27951c4677cca88212732195afdb8b3109e83bd"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 357 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a316f40d883259082f1c212fb3a77d29fe6e0cc1ec0d2f24fd4ffaa9a3c60eb"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 358 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdf93f9c7b05dc79f93c29692d0e0cdb060d41c60845c61423fbde2c8e425719"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/macos-launch-agent.js\u0060 reports through \u0060console.*\u0060 at line 359 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d22ca1e69ec20c78b705b3de9415a88ca1d8d047b2b0f77ad2dee75ceb5d1ad"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/notifications-handler.js\u0060 reports through \u0060console.*\u0060 at line 29 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/notifications-handler.js"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ef57d87a803bac88d6a32f6ed3e1cf1053b27a4dc4305d5fd3d37da4456e90"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-completion-dedupe.js\u0060 reports through \u0060console.*\u0060 at line 77 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-completion-dedupe.js"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a984aa1a673204b8fdaf6259339faa3a97ee6b49da6b1682a19c8a9c20e33fb0"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-completion-dedupe.js\u0060 reports through \u0060console.*\u0060 at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-completion-dedupe.js"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6746a81bbe8aa56738a0d71e5b57948448b7cf5d6fd58d8420a5db2f1342e52"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-service-client.js\u0060 reports through \u0060console.*\u0060 at line 140 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"4233dea1a0a5d024ef26528d8ebfc92a1f1bf352fd1431aa95ae1b5223ce2ac3"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-tracker.js\u0060 reports through \u0060console.*\u0060 at line 229 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"30df57973df9b92065659dec7cd3feb38155e83f0f79a0dd5dfc6299aa626226"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-tracker.js\u0060 reports through \u0060console.*\u0060 at line 341 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1eaa2d70802f49c7dd92dceb71fd06e3b2b26e3163bb142637a171712280515"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-tracker.js\u0060 reports through \u0060console.*\u0060 at line 564 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdcfc00e4a1ad705c088d2737f464bd5cf26bd17fbe601d45d7eb69c24365615"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/push-notification-tracker.js\u0060 reports through \u0060console.*\u0060 at line 592 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc7496fab47224a9d954fb8ba1645f5f5a9583856d83fcce8d8813ebd069da2"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 49 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a53a3fce668a6dbad9a20b0d65354dfe6fc9c43377a3a4301c86da66babfbfe"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4d4fb8a48ebe12a54460d45964f2fee7da6921678c49fcad57ad3c53983629"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 53 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf964830443f147908fb365689a3fc075cea65361be6b8112868dff27afa7137"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 55 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ede50d60baeb508c5f7fdab10b345b03d7ce54191384f9c3e6753e990fbbd5"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5baf186e2df5a893c9f2076fac7ed168dfe198e71eb5624ea7c1c75ff42b15"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 57 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb5ca255d1e21e5d204fdee0a214791e47a67e40e22fcb4bb108a656b3ceceb"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/qr.js\u0060 reports through \u0060console.*\u0060 at line 60 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/qr.js"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"23031dedb78f0e7b0b22a1621d6bd38c4a1309382916bcdb3b5bdef015f4cefc"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-live-mirror.js\u0060 reports through \u0060console.*\u0060 at line 374 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e36bce002d3e40ec239fcde0db9f8ab3531a4e3f9240ae9eea07ab7d0e9d41"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-live-mirror.js\u0060 reports through \u0060console.*\u0060 at line 402 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"963a6f8e9c1ab2eaace3325aeae4b8b0d2033c34d6df89cba0f37b4e036227f6"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-watch.js\u0060 reports through \u0060console.*\u0060 at line 206 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d5e124ed19f139d9ba8376be7872c0fd0bb020bbbd62d68a782f3197408c630"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-watch.js\u0060 reports through \u0060console.*\u0060 at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fda59eb841a9afe7f27f616672f396efafbaf9f2c115cf112e98089bf5f31d3"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-watch.js\u0060 reports through \u0060console.*\u0060 at line 208 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"56794092852035f8e955bcc77e380fce6dd93ffd491d9b03ad9bceb0d019c4ed"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/rollout-watch.js\u0060 reports through \u0060console.*\u0060 at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c767655e58165969ecf16bf0109423c77b1432d60a9584ddf1ed16139e2084d6"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/secure-device-state.js\u0060 reports through \u0060console.*\u0060 at line 471 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da518b09c9c38aee7fcb925b34c5b4bfdd7ba1bfadf5633cb1dfded7d37b626"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/secure-transport.js\u0060 reports through \u0060console.*\u0060 at line 789 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdb7159ea442d9db60b8e49289b0af4a75c81009371ab7038c9ee75c28aaca6"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/thread-runtime-settings-store.js\u0060 reports through \u0060console.*\u0060 at line 28 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-runtime-settings-store.js"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"fffda9437c61504b65d091d8825492dd2c0db2db78b0fa094e53308d626de8bc"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060phodex-bridge/src/voice-handler.js\u0060 reports through \u0060console.*\u0060 at line 423 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"7035fb05f98ea9b516b1fca3159f515da1155d04c48f9217993a1946c8888446"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/bridge-check.yml"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060phodex-bridge/package.json\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/package.json"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"f081e9964de5ee2770cf76b7532c4d9799deecd154420686f26bc07f6d15a365"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060run\u0060 is async and calls .waitUntilExit() \u2014 a blocking call inside async code stalls the cooperative pool\u0027s thread \u2014 one per core \u2014 and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CodexMobile/RemodexMenuBar/BridgeControlService.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8be840971454b9004ec98c4404e300af53c935028d17907b683abdb6f2708a3"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fsModule.existsSync\u0060 in \u0060openThreadOnDesktop\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc8509fff64a8edf711f97d10f6b9424480d6a500cd2dc5bbc43dc0f5366f4e"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fsModule.existsSync\u0060 in \u0060codexAppProcessArgs\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f4b98bfcb1450c41871ed0ae7cd2bdf1e0058de45f38cb4e0e72642c082af3"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.existsSync\u0060 in \u0060gitInit\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc88aada96522720d2af60396c9360997af4e543e04a94628affd95f95e4d86"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmdirSync\u0060 in \u0060createWorktreeAtManagedPath\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb32073ea5e058c43ddbb4293602d958c39a75d42a4280c48879049a7a68514c"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.writeFileSync\u0060 in \u0060gitCreatePullRequest\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1180}}}],"partialFingerprints":{"codehealthFindingId/v1":"125122fde3ed1b910361e182d51a9ad6fb92758512119af0c4040439cddd876d"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmSync\u0060 in \u0060gitCreatePullRequest\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4b7f5961fe35565670f552b111bcb9321e522fff37ded04a7b6ebde8ac3251"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.mkdtempSync\u0060 in \u0060runStructuredCodexJson\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"f56e902b9524cf70ce517b53ea0f57add32d51b8d81eb0097d71c0ae48c9c215"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.writeFileSync\u0060 in \u0060runStructuredCodexJson\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1710}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f4ca1cf7d780f6f0d6ddb32f3f9d1ae04853caf26c8fea1ef54557f9aeb61f6"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmSync\u0060 in \u0060runStructuredCodexJson\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1737}}}],"partialFingerprints":{"codehealthFindingId/v1":"12322706cc718a2984293cc404284b9f7f609d972cbaa8f2394392108613d0d5"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.writeFileSync\u0060 in \u0060applyCopiedLocalChangesToWorktree\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1969}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba29b36fd5b28374c281ecd6b2149ea0dbd58da47769b7f774b3e02ca257756b"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmSync\u0060 in \u0060applyCopiedLocalChangesToWorktree\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"8adab631451fd78ea1b11ccb8183ef28e5df0c9e65acd4d6e614943402fb6e6e"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.existsSync\u0060 in \u0060copyWorktreeIncludeFiles\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2028}}}],"partialFingerprints":{"codehealthFindingId/v1":"808e6389de7321661546d4b8c47f56c40d860f57bbc94f5c2bfebb74f1243375"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmdirSync\u0060 in \u0060removeCleanManagedWorktree\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2182}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f08b65c7d10d5776f6242a735af96b3a91e4dd43848d2912914d72b6c33ea9a"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fsImpl.existsSync\u0060 in \u0060restartMacOSBridgeService\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b091924b91f8a7d46b43f0764c6b57340240246f34c103846d68ec7254f9c92"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.existsSync\u0060 in \u0060createPatchSandbox\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"240958b2b6099067929b7552f13f17b306d9062a724beb3a4ae3a5a377f2204a"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.existsSync\u0060 in \u0060createPatchBackup\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1131}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a803306fb1fc3dca1840dfa2cfc42f98627eb87dac21cd95fcc20e36b9f3cff"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.unlinkSync\u0060 in \u0060runGitApply\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1232}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e56704c7b791963d1165775a7d2eb08bdbdd283bb4aa7229d6fcc08eb33886"}},{"ruleId":"R1","level":"warning","message":{"text":"Type Safety: 0 typed \u00B7 115 plain JS \u2014 the untyped files are phodex-bridge/scripts/cleanup-private-defaults.js, phodex-bridge/scripts/prepare-private-defaults.js, phodex-bridge/src/account-status.js, phodex-bridge/src/apply-patch-changes.js, phodex-bridge/src/bootstrap-codex-cli.js, phodex-bridge/src/bridge-status.js (\u002B109 more)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d00ee7953f55325a823d27e5db9657c80ca9b9861c0c0abf8fe487cd3fa586d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (161 matched lines \u00D7 2 locations): relay/phodex-backend-relay.mjs:19 \u00B7 relay/relay.js:33 \u2014 the two spans are one implementation copied and then locally edited \u2014 965 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1204ec2800b7e298ff7718655a8f47af6d58bd35f3634efe3965e8ef34490b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (115 matched lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:2867 \u00B7 phodex-bridge/src/desktop-ipc-owner-transport.js:72 \u2014 the two spans are one implementation copied and then locally edited \u2014 621 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2867}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fd4a5af5aba9e65bc423c45fc889e9106de72c6bf339ba980fbec38a9f00cd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2 locations): phodex-bridge/src/pet-handler.js:17 \u00B7 phodex-bridge/src/workspace-handler.js:46 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b52489bf2cf8bb933174b78ceee583044827c7e3f5d4d442155a8e9422930b2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2 locations): phodex-bridge/src/desktop-handler.js:26 \u00B7 phodex-bridge/src/workspace-handler.js:48 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b032d8a8c48eb10acfe458361547e17f20f8d210e5cad3a3162b82b188da68"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (32 matched lines \u00D7 2 locations): phodex-bridge/src/secure-transport.js:862 \u00B7 relay/relay.js:629 \u2014 the two spans are one implementation copied and then locally edited \u2014 132 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":862}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2766a7848a54051524b23052723d5728bf162decd2c315f8702ead304caa09"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (31 matched lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:4216 \u00B7 phodex-bridge/src/desktop-ipc-state-patches.js:162 \u2014 the two spans are one implementation copied and then locally edited \u2014 162 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4216}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b10e1c9cb8b43a6444a3dcc936ae6b115a7f678894fabeca1a15bbf7fb67670"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2 locations): phodex-bridge/src/desktop-handler.js:228 \u00B7 phodex-bridge/src/desktop-handler.js:262 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"304a981de0fdf34ef434f941d2b4162de140460f1b8a93d0bf0e6a2355d8c1e9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:1090 \u00B7 phodex-bridge/src/desktop-ipc-live-owner.js:1379 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"da34e8b69c3401b60fed71a44df8d9eb43b75c65d56b39d6c7f035274d8af4ae"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2 locations): phodex-bridge/src/secure-transport.js:453 \u00B7 phodex-bridge/src/secure-transport.js:612 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c85c1257bd34c45963bf9b95186262c40d892b23cd19161f538a947b087b368"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2 locations): phodex-bridge/src/session-jsonl-history.js:296 \u00B7 phodex-bridge/src/session-jsonl-history.js:459 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d8afd967d5d3b442628fd1f7359c599379b6b708cbf8038d709d190e1bb5f2f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2 locations): phodex-bridge/src/git-handler.js:2981 \u00B7 phodex-bridge/src/workspace-handler.js:1333 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2981}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ad83d576e02e61b1a3c53047113f8fcce891df59b26753af6fbf100838ef70"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2 locations): phodex-bridge/bin/remodex.js:103 \u00B7 phodex-bridge/bin/remodex.js:124 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex.js"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cac7956a23d519fc08692ee9eb3f742a0523d5a3bffdbc868353caa23a9ef35"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-projector.js:1011 \u00B7 phodex-bridge/src/desktop-ipc-conversation-projector.js:1234 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb6acab689610b3c721887ea139da1d5660a1949ba2b62ab4c3ba062703688b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:4273 \u00B7 phodex-bridge/src/bridge.js:4296 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4273}}}],"partialFingerprints":{"codehealthFindingId/v1":"91359d8baa4e57aa5a47495ad43b7715ee44e3c03cabb01ad9791e8da1dc070b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4 locations): phodex-bridge/src/notifications-handler.js:8 \u00B7 phodex-bridge/src/pet-handler.js:19 \u00B7 phodex-bridge/src/project-handler.js:42 \u00B7 phodex-bridge/src/workspace-handler.js:48 \u2014 the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/notifications-handler.js"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"289b39381a16d34e61d4c7309a6c7b112dd68c1a5fd710ae2c286cea1e687aef"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): phodex-bridge/src/codex-tool-wrapper.js:245 \u00B7 phodex-bridge/src/codex-tool-wrapper.js:274 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-tool-wrapper.js"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a0b846cca8643dde29e18a7c0ea573de025d566df4c29e40a5553a1d260204"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): phodex-bridge/src/macos-launch-agent.js:83 \u00B7 phodex-bridge/src/macos-launch-agent.js:140 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"70966521bc1a5eeb8f4a697042d66c911058e60f6837ae4c58714a759294fbc3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): phodex-bridge/src/rollout-live-mirror.js:1993 \u00B7 phodex-bridge/src/session-jsonl-history.js:1232 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1993}}}],"partialFingerprints":{"codehealthFindingId/v1":"f61e5d049a7d66121d9d99e3bf2a26d7fcd0b07b7eb4aabbb60190d20e098bdf"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): phodex-bridge/src/session-jsonl-history.js:345 \u00B7 phodex-bridge/src/session-jsonl-history.js:393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d5da4c7329d84d7a634ae40a3d5f1ce862340cf1b4633608a7ecd7ac8788ff"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:5081 \u00B7 phodex-bridge/src/session-jsonl-history.js:1161 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5081}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fa5f8cfd1f3353ebb1f37ce927bc102816cdb71a9079d5405165ba6e4b43e0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (15 matched lines \u00D7 2 locations): phodex-bridge/src/codex-desktop-refresher.js:658 \u00B7 phodex-bridge/src/desktop-ipc-live-owner.js:1154 \u2014 the two spans are one implementation copied and then locally edited \u2014 69 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2230c5cd1c709d94d29d7f50c08017c7b5dbc7bc5271439a9f2aad1dfdfbb4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:1140 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:1175 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7228654ef204a899758c320b48591184d22db500fce4338ffd1d927b7af8f2c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): phodex-bridge/src/git-handler.js:2734 \u00B7 phodex-bridge/src/git-handler.js:2760 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2734}}}],"partialFingerprints":{"codehealthFindingId/v1":"e957c256e1d36e7c89b3d3c044b179573e8921ee8eda83a08a1ec6742e681aa9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): phodex-bridge/src/rollout-live-mirror.js:2247 \u00B7 phodex-bridge/src/rollout-watch.js:772 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":2247}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ab0d968b787f8b62744f5ce561faab6b0a7c8b601897dd73016eea15e18bdd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): phodex-bridge/src/rollout-watch.js:320 \u00B7 phodex-bridge/src/rollout-watch.js:389 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c90ddc2b5766b3dd3d0edca08e9c5348d7e83a118ad0e9e63aa2945c3313d9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): phodex-bridge/src/codex-transport.js:52 \u00B7 phodex-bridge/src/codex-transport.js:324 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-transport.js"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"985e16a9f2ccb8fe99b139300e7e891cff594dffc04c1721f708c78be82aa603"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:282 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:414 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"13d996f79f3fb2af83060aff28f323b702f88b45cf5164cf57a4d8616112f6c1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:922 \u00B7 phodex-bridge/src/desktop-ipc-conversation-projector.js:1016 \u00B7 phodex-bridge/src/desktop-ipc-conversation-projector.js:1247 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5cd9d3e4d2a02ca7ca5bbefdc6ed50bdc1cd74a505fcc5f032b339a678c965f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-projector.js:705 \u00B7 phodex-bridge/src/desktop-ipc-conversation-projector.js:720 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"e319d316cb1df1dca4884fd1ed4380a275aab48675bda1455419619f7cd61c44"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): phodex-bridge/src/secure-transport.js:701 \u00B7 phodex-bridge/src/secure-transport.js:727 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa6b4b479c86a13b126f29cf4cdfd00b6ad9ec0c517e3c5542ff5bd37964adc"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (13 matched lines \u00D7 2 locations): phodex-bridge/src/account-status.js:135 \u00B7 phodex-bridge/src/codex-tool-wrapper.js:498 \u2014 the two spans are one implementation copied and then locally edited \u2014 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/account-status.js"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"17acac0bd0e1601da6d77bac37e52b9546c236f79d600802df11d6c9283508c1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (13 matched lines \u00D7 2 locations): phodex-bridge/src/codex-tool-wrapper.js:488 \u00B7 phodex-bridge/src/rollout-live-mirror.js:2264 \u2014 the two spans are one implementation copied and then locally edited \u2014 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-tool-wrapper.js"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"462c06f225f1deb0fd08e138f7ba1c8ec7854fe8821db7ca0f74c2170c786469"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3 locations): phodex-bridge/src/desktop-ipc-action-follower.js:712 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:1018 \u00B7 phodex-bridge/src/desktop-ipc-live-owner.js:475 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fe553c172956bf9f1a322a1afb8ceb87bab2e6b8eb9c48c2a15417c1569aa77"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:3265 \u00B7 phodex-bridge/src/desktop-ipc-shared.js:459 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3265}}}],"partialFingerprints":{"codehealthFindingId/v1":"f03f630350e718dff2929430fc33ddfcdd9c51d822d84cac243e2ff0af9ccf59"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): phodex-bridge/src/project-handler.js:545 \u00B7 phodex-bridge/src/project-handler.js:568 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90fc7e86d6eaf5f840bbbcdcdb2fb65b88b6941a9dc00125c5a809475ff9687"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): phodex-bridge/src/workspace-handler.js:709 \u00B7 phodex-bridge/src/workspace-handler.js:791 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc717430575c9e0d69a9b4b950cc8a6280edeea76e77dee26052c37b62c3651"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): phodex-bridge/src/workspace-handler.js:737 \u00B7 phodex-bridge/src/workspace-handler.js:821 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2480a96e30872114dc431de70cd9e1cf43eb3ec61df0eba494d9d65e11fde5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): relay/apns-client.js:185 \u00B7 relay/push-service.js:407 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/apns-client.js"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b16b2059cbc0a0cbdca7a7ad76d13633cc98f804513b8e2ff052ceacdc4ec0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:3965 \u00B7 phodex-bridge/src/bridge.js:4192 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3965}}}],"partialFingerprints":{"codehealthFindingId/v1":"988e2d6310b6f0e3d30479ca15e97f9da680b72cbf250f237c31637fdca39c47"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:2783 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:2809 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2783}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb8ba621837d639d4837ebb85710f523e87584aca36b04a08bfd931d437496b0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:307 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:365 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ab6c7969ff0e6148ae7b788707bc435aa16a5a35717d54e0c4bf4dfa5ff4d8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (12 matched lines \u00D7 2 locations): phodex-bridge/src/pet-handler.js:428 \u00B7 phodex-bridge/src/voice-audio.js:11 \u2014 the two spans are one implementation copied and then locally edited \u2014 61 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"45e7d8358df66ec1fcf10e33ce8f3a0e709364e64b06e7633f4e786ebf8bde2f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/project-handler.js:630 \u00B7 phodex-bridge/src/thread-context-handler.js:67 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7215f70361af9d899ffd44971e13cf779dc65274c74b29b99c67abc29df414"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/push-notification-tracker.js:773 \u00B7 phodex-bridge/src/push-notification-tracker.js:814 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99e362b753b6b54ee26ddc14773d9b6bff4f327cf2b056d573f0a8c43419365"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/rollout-live-mirror.js:1389 \u00B7 phodex-bridge/src/rollout-live-mirror.js:1482 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1389}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ee0b83e27c39f2246914053fefef6882ca2271f0fc40dd5a8a8a1e37feff84"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): phodex-bridge/src/session-jsonl-history.js:405 \u00B7 phodex-bridge/src/session-jsonl-history.js:479 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02c0e7c8c8c902582343b905af411675bfeca4a2d8844e514758b466d79c7ee"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): relay/server.js:127 \u00B7 relay/server.js:140 \u2014 both copies are in the same file, so extract the block 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":"relay/server.js"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"204d5e2c33f3b24d350a9c64a4f4abac8ceb8c0033cdeff9f8ceb2ab416a2650"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:2793 \u00B7 phodex-bridge/src/bridge.js:2852 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2793}}}],"partialFingerprints":{"codehealthFindingId/v1":"233421e9e8f73cc3ef621d59a84bffb45803e303082616a4dd9382aff1f1d724"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): phodex-bridge/src/codex-desktop-refresher.js:100 \u00B7 phodex-bridge/src/codex-desktop-refresher.js:149 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25002aeb83f9a86f7ac60907e1b2397c8f062b87339ad620f515d667953d7f2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:240 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:277 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:295 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d911c29ad8c84165f9042d1e54f0a93b3b2e0392ecf639155ea57ea84cd50f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:117 \u00B7 phodex-bridge/src/desktop-ipc-live-owner.js:1932 \u2014 the two spans are one implementation copied and then locally edited \u2014 70 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"516cdd5d116ec0845616b80022571e99c0ccbe35f9c10bafddb0301c161f0bc5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3 locations): phodex-bridge/src/git-handler.js:822 \u00B7 phodex-bridge/src/git-handler.js:2964 \u00B7 phodex-bridge/src/workspace-handler.js:1298 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e5fa2160bce972523d79a9b282a64c0a67748c310d2e8242fd1f132d13bd3c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): phodex-bridge/src/opencode-runtime.js:1071 \u00B7 phodex-bridge/src/opencode-runtime.js:1270 \u2014 the two spans are one implementation copied and then locally edited \u2014 59 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9159f05a58dcfb3705696db0a700e6762646b9d1f410fcebc23a28dc45e712"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): phodex-bridge/src/rollout-watch.js:275 \u00B7 phodex-bridge/src/rollout-watch.js:517 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d167b7757e8cd06fde05f0748f2adee348aba0fccedf54b0979354fcbf58ad"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:4454 \u00B7 phodex-bridge/src/bridge.js:4479 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4454}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d2d3264ee0aef70766073bf6d11ac06492cf1f0cd95ad33acbdd89502d6f1a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4 locations): phodex-bridge/src/desktop-ipc-action-follower.js:463 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:1142 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:1177 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:2293 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"421c830b0c7ee137eb7060b064b44b5ff68e3969fb3b8c3ea97aa23872bfcc31"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): phodex-bridge/src/git-handler.js:2774 \u00B7 phodex-bridge/src/workspace-handler.js:1377 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2774}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a2da095464aad000cb3d970a174c09416ed3cf10cdde2441067dce4f919f6a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): phodex-bridge/src/thread-activity-projector.js:159 \u00B7 phodex-bridge/src/thread-activity-projector.js:204 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe160e3c435c68f8ac6795514f394e232f719dd1c7d16c5344be01a46f533491"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:2171 \u00B7 phodex-bridge/src/bridge.js:2181 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":2171}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5f06f818cae4265026ad5e31ff02b242bfa0beecd70d0a57d26d24c38c40bd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:5178 \u00B7 phodex-bridge/src/bridge.js:5206 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5178}}}],"partialFingerprints":{"codehealthFindingId/v1":"314673a21868d87f9f0e9f5f2a87d3518840ce7e7c61771fc7e0df04fc47cee6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:185 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:203 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:213 \u00B7 phodex-bridge/src/desktop-ipc-conversation-adapter.js:242 \u00B7 \u002B3 more site(s) not listed \u2014 all 7 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1eac269261e11247df328f0fe0ca2f7071e1691aed0a4863f5b6fb6bfe07da"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/bin/remodex-jsonl-diagnose.js:463 \u00B7 phodex-bridge/src/session-jsonl-history.js:1618 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex-jsonl-diagnose.js"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5979f7fc9b5f788a4c80569314055456c172f7283f4918c1c6772cfd2d0bea"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:1857 \u00B7 phodex-bridge/src/voice-handler.js:113 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"08367794700ff878a048e0530ff72f672ff7b6318f556932dd49e20d0e54a937"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/src/bridge.js:4843 \u00B7 phodex-bridge/src/bridge.js:4852 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":4843}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b5a4b2415a7feeedc750d0fd53910c318f5120c54fff3b63b01d3bbcb2e427"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/src/rollout-live-mirror.js:985 \u00B7 phodex-bridge/src/rollout-live-mirror.js:2214 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":985}}}],"partialFingerprints":{"codehealthFindingId/v1":"4829a79fd04de7e85dfb399d2ad310326c6409236fefb661917ec7324796f54a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/src/thread-list-provenance.js:59 \u00B7 phodex-bridge/src/worktree-origin.js:42 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-list-provenance.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f67551c6291a8510e21b50f4df1d483ac3fbdec26c92f06cced969b5c54032a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): phodex-bridge/src/workspace-handler.js:569 \u00B7 phodex-bridge/src/workspace-handler.js:646 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a186753e6e2f8ec4341cba6f1f16a43ea56dacefc1394c7268f6dac2b02b93"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:1041 \u00B7 phodex-bridge/src/desktop-ipc-live-owner.js:1357 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d057532fedaa12f87cd63ccc6eed8f3b4bd6af1dabb883523d2539fa741a273"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:3436 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:3970 \u2014 both copies are in the same file, so extract the block 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3436}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f9a949a4ca0d3a355481ffd90d5e5c12210a59cf2ce17abb4120d78202f47f7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-action-follower.js:3559 \u00B7 phodex-bridge/src/desktop-ipc-action-follower.js:3569 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3559}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e5ab7997b27f8838662ed049cf7e02e62026ad7cc905d69bac01f6594228113"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): phodex-bridge/src/desktop-ipc-conversation-adapter.js:1436 \u00B7 phodex-bridge/src/desktop-ipc-conversation-projector.js:1300 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct \u2014 the members of a type, or the entries of an object or array literal \u2014 with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal\u0027s entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or \u2014 where the copies are a literal\u0027s entries rather than a type\u0027s members \u2014 one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared \u2014 a decorator and its options, an annotation, a registration table\u0027s keys \u2014 the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"24795709057a1ccb46c783d09f76a07ffb5cc53b6f22759b0c15a6497a988202"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): phodex-bridge/src/opencode-runtime.js:54 \u00B7 phodex-bridge/src/opencode-runtime.js:63 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"def5dc868316b08123204d7c3f569d9b582a3cf2caadb81a578d4a8a691b02ff"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): phodex-bridge/src/voice-audio.js:202 \u00B7 phodex-bridge/src/voice-audio.js:256 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-audio.js"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e5dae2670c633f4fcd3b1a4124b424b9f444611c3b44042a2c7007fb31f871"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): phodex-bridge/src/workspace-handler.js:552 \u00B7 phodex-bridge/src/workspace-handler.js:591 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa932f046ab2e5d3cb4dc23633876a5c9e5a536fc656571d734685f38918d3b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyAppServerMessageToConversationState (cyclomatic 95, cognitive 97): applyAppServerMessageToConversationState has cyclomatic complexity 95 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dea300286630dbf3083aeab6f61bb15cb6a9046a9ca28e97588e4fcebbde86e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseSessionJsonlTurns (cyclomatic 76, cognitive 155): parseSessionJsonlTurns has cyclomatic complexity 76 and cognitive complexity 155; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"b632e7e68bd791109f021c51d5c00b6731ea4e107940ac1bb04f2fba1c5a12e4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function synthesizeNotificationsFromRolloutEntry (cyclomatic 56, cognitive 83): synthesizeNotificationsFromRolloutEntry has cyclomatic complexity 56 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc4ad39ab64d063e2773a492655d0b342e4a36f6fc037b2d8681be5e45bb5b0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function synchronizeDesktopConversationCompatibility (cyclomatic 55, cognitive 42): synchronizeDesktopConversationCompatibility has cyclomatic complexity 55 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1fc370bf5375216aca2ac97f1eac53d4032a64b17548c860210f9309d32c500"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleRequest (cyclomatic 54, cognitive 73): handleRequest has cyclomatic complexity 54 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"c34292ad3956cb1f13b1bf3c44156f32b546b47a8795ca963d82a3fc8ff861d4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observeInbound (cyclomatic 52, cognitive 73): observeInbound has cyclomatic complexity 52 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6e431a5b2858c3df7e111ea6788f7c5297775ed234621c120aaf1ad77fe5c1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function onEnvelope (cyclomatic 47, cognitive 64): onEnvelope has cyclomatic complexity 47 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"55772f602ca46d75c9910c72a64d9474d4ad2599b1bc0f252cd65c4abd7c0d51"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observeOutbound (cyclomatic 45, cognitive 53): observeOutbound has cyclomatic complexity 45 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"f93a8f0e1eebc843779d437fc4e2360b02276a7c3309d16f92ac5759c109da5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildConversationStateFromThread (cyclomatic 45, cognitive 32): buildConversationStateFromThread has cyclomatic complexity 45 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb4d6436546dad2abc509b2c6b6e748c68fab4eda6d8749c3c60ddd2bec52ea9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshTouchedNormalizedActiveTurns (cyclomatic 44, cognitive 73): refreshTouchedNormalizedActiveTurns has cyclomatic complexity 44 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3521}}}],"partialFingerprints":{"codehealthFindingId/v1":"efcdc0eaf3abe92dab0cb031c94091ae315d6d00b128a846668faa23dbbd05be"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function diagnoseSessionJsonl (cyclomatic 44, cognitive 49): diagnoseSessionJsonl has cyclomatic complexity 44 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex-jsonl-diagnose.js"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b3d6c34d245033fa09109c53a6a9aa2bb8baad41e7e1b309eb4fe2162b389f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function poll (cyclomatic 43, cognitive 43): poll has cyclomatic complexity 43 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"b34cf59f247fde0caeef337c9af0e171abaa433993e7205fe33b7bd105baf4c7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bootstrapFromExistingRollout (cyclomatic 37, cognitive 48): bootstrapFromExistingRollout has cyclomatic complexity 37 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cf3b40210821b13d2774574736a4a76e854a2b7312bf80f777f9964f00a0142"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function projectConversationState (cyclomatic 35, cognitive 23): projectConversationState has cyclomatic complexity 35 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd02d6d7483436695396e14c5dfc1ca71a12d307b8ac2549137b3106b8333be1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeRelayBoundJsonRpcMessage (cyclomatic 33, cognitive 30): normalizeRelayBoundJsonRpcMessage has cyclomatic complexity 33 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3618}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0cd38a4e8fb0f41ddce31712192ea99583f6fd83bd0ccb0f1aff304c4e8b8cb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function processEvent (cyclomatic 33, cognitive 28): processEvent has cyclomatic complexity 33 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"062eeddbdc5e5d754b98f0a4e3b4f991715b56f316e0277997ce266a5a31a1c4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function inspectBootstrapRunBoundary (cyclomatic 31, cognitive 43): inspectBootstrapRunBoundary has cyclomatic complexity 31 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"72df56d013d8076b12f4d78006d6de0608e225a1ea60af6a1ab39ec5f68acec5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitRunStackedAction (cyclomatic 31, cognitive 31): gitRunStackedAction has cyclomatic complexity 31 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f4b0a7b18a62f58144d54eba0d9e9dca9a949733fcfb6ca90ba8bb5a08f75a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function emitItem (cyclomatic 31, cognitive 30): emitItem has cyclomatic complexity 31 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"c63020855d838ed077692217ca2c91be73058523e3798f99fe0448d8af3fc4cb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function createNormalizedLiveIndex (cyclomatic 30, cognitive 49): createNormalizedLiveIndex has cyclomatic complexity 30 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3396}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8cd678aac4348a62f2c46b7f2d4376f2d8cb8ec49a691a0d70c47493660a54"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readDescendingTurnPage (cyclomatic 30, cognitive 48): readDescendingTurnPage has cyclomatic complexity 30 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"9279f708d03656d9078cc7fea528721f57a4f39a67394eb3753c559028fc2ced"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function tick (cyclomatic 30, cognitive 39): tick has cyclomatic complexity 30 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a76358b51eae809970daaec1086c65588573431410306d854362003f70164f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function main (cyclomatic 30, cognitive 37): main has cyclomatic complexity 30 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/remodex.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd472e909091203f545243c3ac1814f477d5e965490ce104a2c83e2ccb5e3da8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function trimThreadPayloadForRelay (cyclomatic 30, cognitive 35): trimThreadPayloadForRelay has cyclomatic complexity 30 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c442f8396acddb7e2522dbb019d266c623656587c57dff75b4876c6fd452868"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleApplicationMessage (cyclomatic 30, cognitive 33): handleApplicationMessage has cyclomatic complexity 30 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"d988ccdbff606c0982bab2b4a8e29797a75a2b933dc8d6ca865a4463eff1b140"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function projectTurn (cyclomatic 30, cognitive 29): projectTurn has cyclomatic complexity 30 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"566efbdc3bffbe272cfb82d1e5d95b649c3a07ba7b02b586f1c73fea1f165dbb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runPendingRefresh (cyclomatic 29, cognitive 28): runPendingRefresh has cyclomatic complexity 29 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f07a24e03220b9177d1a04b1f8abeecdbb81e23e4ea7b0e17ed10428e3a5a91"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeRelayHistoryItemsWithJsonlItems (cyclomatic 28, cognitive 43): mergeRelayHistoryItemsWithJsonlItems has cyclomatic complexity 28 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a02fcda7a20e73d57c01604792837de1d37e5148150443986f7661b62bdaf8e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function tryServeDesktopOwnedRead (cyclomatic 28, cognitive 30): tryServeDesktopOwnedRead has cyclomatic complexity 28 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f5d143425f1708c72b57e85e9d6fdc4cd72ba255c1d7b2091c0d1b3b74bd0f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyImmerPatchCopyOnWrite (cyclomatic 27, cognitive 43): applyImmerPatchCopyOnWrite has cyclomatic complexity 27 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4190}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4db755646eb9935a0e2c52080bc0dcd615e4a8c8f017aa146de8cfee6f65e5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function areEquivalentRelayHistoryItems (cyclomatic 27, cognitive 22): areEquivalentRelayHistoryItems has cyclomatic complexity 27 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4482}}}],"partialFingerprints":{"codehealthFindingId/v1":"c086d2e0d485df4b6adcf1d09b6b056ab9f8e34d04530ae23e577bf3be65bfca"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function backgroundRawTurn (cyclomatic 25, cognitive 14): backgroundRawTurn has cyclomatic complexity 25 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3995}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f5cae01c6df0784991eb568ecbefbfdd1e847eb03addc239b51fdd3818fad0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function fetchAdaptiveThreadTurnsListForRelay (cyclomatic 24, cognitive 41): fetchAdaptiveThreadTurnsListForRelay has cyclomatic complexity 24 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffc48828609e620104fb52fd4938f1652ed51148c9fc454060ab91884a6ebb1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyPatchToBaselineNode (cyclomatic 24, cognitive 33): applyPatchToBaselineNode has cyclomatic complexity 24 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-state-patches.js"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ceb6290b7833a9f35c92dbeaa134dc0920952b95e2fcbe027ba1bedfced7e05"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function backgroundHistoryTurns (cyclomatic 24, cognitive 28): backgroundHistoryTurns has cyclomatic complexity 24 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3923}}}],"partialFingerprints":{"codehealthFindingId/v1":"80210540dcb74909dc37d14d278f5bb7f4183b29359df4fa3ee97db7b51fa85c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleGoalUpdated (cyclomatic 24, cognitive 22): handleGoalUpdated has cyclomatic complexity 24 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"6634e52754332ed449b179ffa7702245d187cfe264bb8df9b7f7ea2cd17ac780"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observeThreadListResponse (cyclomatic 23, cognitive 30): observeThreadListResponse has cyclomatic complexity 23 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30191a484fea544f5d3efb830a126a2fd283fb258a4b1199433388b47e0e565"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function workspaceReadImage (cyclomatic 23, cognitive 22): workspaceReadImage has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"f806e327484165f5beb55bedef2fe65720fcd77eab8fa351d8ad1562b66b2198"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizePart (cyclomatic 23, cognitive 20): normalizePart has cyclomatic complexity 23 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b499c446d086c5230f9e6eb42b6361a50e9df45c93c67641a48a6ff4943ce61"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeThreadHistoryImagesForRelay (cyclomatic 23, cognitive 19): sanitizeThreadHistoryImagesForRelay has cyclomatic complexity 23 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3723}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f0d8993817d5fd3a6938f271f6e2669bd138b3c06f16824c7ea95ead224fe6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function assertWorktreeHasNoBoundChats (cyclomatic 22, cognitive 34): assertWorktreeHasNoBoundChats has cyclomatic complexity 22 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2253}}}],"partialFingerprints":{"codehealthFindingId/v1":"990438b8a186c02437b0eecb4f5ef884e244269767f645b9a322be6229b3affe"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observeInbound (cyclomatic 22, cognitive 30): observeInbound has cyclomatic complexity 22 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a0be8c8e5d54e796cd7a7af476234a20060c68b25c53f08566da6b651f6341"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyDeltaNotification (cyclomatic 22, cognitive 27): applyDeltaNotification has cyclomatic complexity 22 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc649ac212f1198c5991d82b46a5c09b8d7bffd211324f234782fef75903af60"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function rememberForwardedRequestMethod (cyclomatic 22, cognitive 25): rememberForwardedRequestMethod has cyclomatic complexity 22 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"34df9f0325996190f910f74dd9bf6fab14e7db6d3488331ff38c841f5952fc6e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncProjectedConversationState (cyclomatic 22, cognitive 25): syncProjectedConversationState has cyclomatic complexity 22 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1979}}}],"partialFingerprints":{"codehealthFindingId/v1":"8358d43c51335b282158df10a92074d55fe6c15bafd3212570598df2bff385bd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function emitNormalizedReviewOverlays (cyclomatic 22, cognitive 25): emitNormalizedReviewOverlays has cyclomatic complexity 22 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2120}}}],"partialFingerprints":{"codehealthFindingId/v1":"f24858fdffb2c127e97ecfeb318d216e97e7e6e361a12133a05e9eae4a76ccc4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function fileChangePatchKey (cyclomatic 22, cognitive 24): fileChangePatchKey has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"77097d94cd8e19103476fcc59fbace6811b6ac6ba2e5f3575fd4cc66f266e3a1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function shouldSkipResponseItemForHistory (cyclomatic 22, cognitive 22): shouldSkipResponseItemForHistory has cyclomatic complexity 22 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"337615c2c34074af894efb818711c9ef123be7e4a0a24d0325ca3df7295b1121"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function postJSON (cyclomatic 21, cognitive 32): postJSON has cyclomatic complexity 21 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-service-client.js"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c3dfafd7b8a17a4f2d68d3e31ab97ea4773f1735b20775ac895b4231a63ae3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 21, cognitive 31): (anonymous) has cyclomatic complexity 21 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"158d14ae617425ddb4c1cdfb6fa81952abbbda6b96831fb1e69607674ff893c9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizedLiveIndexNeedsRebuild (cyclomatic 21, cognitive 27): normalizedLiveIndexNeedsRebuild has cyclomatic complexity 21 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3490}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb960c398968ce16e278dff0597f9a50b8e10ba4aadf0b6f5893179d91c6294e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeOpenCodeThreadsIntoListResponse (cyclomatic 21, cognitive 22): mergeOpenCodeThreadsIntoListResponse has cyclomatic complexity 21 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5585}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa66f3ea61059cb05fe7824bf4d6c6653802a713c5e562fdb3e34c73d540a7b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleOutbound (cyclomatic 21, cognitive 22): handleOutbound has cyclomatic complexity 21 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c80cc0e5b44a40876eb57f2c0d2dc83fc48179fac749081296f55126ee3ac78"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 21, cognitive 19): (anonymous) has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1815}}}],"partialFingerprints":{"codehealthFindingId/v1":"418cc6ca10f60a16445c50878fc43cc70152d05cbb91d967fc05855d7f74184d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleDesktopMethod (cyclomatic 21, cognitive 17): handleDesktopMethod has cyclomatic complexity 21 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce5e8ee6ed32beed6ed1f053139c04c815a2eb04f99d78166501b3e26058093"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadWithBridgeDoubles (cyclomatic 21, cognitive 16): loadWithBridgeDoubles has cyclomatic complexity 21 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/test/bridge-desktop-ipc-integration.test.js"},"region":{"startLine":2134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b1aea36564406b601bcd9cad5511f34783bc57d02708530c619c775285de9d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildConversationTurn (cyclomatic 21, cognitive 15): buildConversationTurn has cyclomatic complexity 21 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"96500984f670ff086311ac799b6396245d12900bd058e6ce09bb64596f075e1f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function broadcastConversationState (cyclomatic 20, cognitive 23): broadcastConversationState has cyclomatic complexity 20 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b02a805af0ea83779a044d35a237b7dc87355b3b51906bc1ee7aebf1c9b224"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyConversationStateChange (cyclomatic 20, cognitive 22): applyConversationStateChange has cyclomatic complexity 20 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3318}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a22f5b70aec20ca438e1ab1fc947402f394bb7172db0dda84439961eea6c80"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function startBridge (cyclomatic 20, cognitive 19): startBridge has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c4b81107e82329a1fccb57e1667cfa804ea42ce57b6fb8a6c2aabb4467de1d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reduceItemLifecycle (cyclomatic 20, cognitive 18): reduceItemLifecycle has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4464a68a2819589735e16920c2eec3b020ecd64ebbb64c8441928b2f0322a0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 20, cognitive 16): (anonymous) has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2512}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb187031d19424c57e8fbdd6f98b14299e2fec3ee0dd6946c3d31fd6ddb0c59e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function searchDirectoryEntries (cyclomatic 19, cognitive 33): searchDirectoryEntries has cyclomatic complexity 19 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52d59c54925493f787bccd0073006a966a9fcf05ad6e6f40766163e0c7985a0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function partsFromInput (cyclomatic 19, cognitive 27): partsFromInput has cyclomatic complexity 19 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0c4804cec75ec3b43dd4199aa861eb284311ca5fe690e7205264fdd14e5b31"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitCreatePullRequest (cyclomatic 19, cognitive 19): gitCreatePullRequest has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cbdb84a97e93bdb289f9c42dcb8ab3aae984c0d7fdbe83bf10568b77ccf174a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function composeAccountStatus (cyclomatic 19, cognitive 16): composeAccountStatus has cyclomatic complexity 19 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/account-status.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e3c25f10100bb8a742f3f8f79f8f9aef011ed859d8f37dc7f2afcc93368905"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeThreadGoal (cyclomatic 19, cognitive 15): normalizeThreadGoal has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1415}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f22ea7c9716bfde4c7a12624921cb1e11361ad03252bf1aa9d26b2f1e83274"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeProjectedThreadGoal (cyclomatic 19, cognitive 15): normalizeProjectedThreadGoal has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be36c0758ff27ef05d0d3cf091b8e89567ee3dc77904092cb68ea85d679d732"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function createWorktreeAtManagedPath (cyclomatic 18, cognitive 29): createWorktreeAtManagedPath has cyclomatic complexity 18 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a54e46fd9f66baa01a953def3f0e4d7c929498c6144abb082e92b23554b438"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 24): (anonymous) has cyclomatic complexity 18 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea80aaf9867b41c4f9ac6f12b31d52a256e906d50e9ef1c2fabeb799932cebb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveCanonicalRequest (cyclomatic 18, cognitive 21): resolveCanonicalRequest has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"106a81a48f4c336f546ed75f8e9faa5cf6914c54e27c8610cf45019eee3b3919"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleClientResponse (cyclomatic 18, cognitive 20): handleClientResponse has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c96b1ffc44f4863597256596ce497bcf6c417f7ba118b55ad15432af7b86095"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reduceTurnStarted (cyclomatic 18, cognitive 20): reduceTurnStarted has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb13e71fc98c4b49f6462dc94f10582fa398eec9a29ea014f15afc930b9c5c3f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function maybeBuildJsonlThreadTurnsListFallback (cyclomatic 18, cognitive 17): maybeBuildJsonlThreadTurnsListFallback has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f549313580d1671f385c409f775171396ccf0d44a4197610f52b003ceb28cd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeRelayBoundCodexMessage (cyclomatic 18, cognitive 17): sanitizeRelayBoundCodexMessage has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"c352c5a7da1d0db7090242ca8623bef974ef5fd29464c66db63d217e934c4e55"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeFollowerRuntimeOverrides (cyclomatic 18, cognitive 17): mergeFollowerRuntimeOverrides has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe09c630aa824d55e030430e0e27060cc7740362b90df74820e073b006ad33e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitTransferManagedHandoff (cyclomatic 18, cognitive 16): gitTransferManagedHandoff has cyclomatic complexity 18 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9a91768a44b1bca98fb7c9550dfc60209aeacddca197ca225627b234265427"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function rememberMessageInfo (cyclomatic 18, cognitive 14): rememberMessageInfo has cyclomatic complexity 18 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d62698f2f1a1e173c79cde00f24291dc4a7cb17f0fdb8affe49ce446148d90e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function findRecentRolloutFileForContextRead (cyclomatic 17, cognitive 27): findRecentRolloutFileForContextRead has cyclomatic complexity 17 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"4268b3f825a33a479ce90c136dd7a8fbdab12df7b094259a08dd641938060105"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readRecentSessionJsonlTurns (cyclomatic 17, cognitive 25): readRecentSessionJsonlTurns has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea82136fc2225fdd81d04c9898f77642a5e2b93150d21b614fa6edd0fbd5298"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function diffItem (cyclomatic 17, cognitive 24): diffItem has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"6397ffc53404348fe00d9d2676113fac62edcc90ffb2d006feba8ea3c3a0dec2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleHTTPRequest (cyclomatic 17, cognitive 21): handleHTTPRequest has cyclomatic complexity 17 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/server.js"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a621d5490ecb429faa0162d5a6208a0b5d6c97b72422a9c78d69c2b63b162a0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeTurnStartForCodex (cyclomatic 17, cognitive 20): normalizeTurnStartForCodex has cyclomatic complexity 17 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2860}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2ae0076f8db29acfb6a7e7361a730eadf657bf84040d5454ce7d0b06d8e538"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function negotiateResumeOwnership (cyclomatic 17, cognitive 18): negotiateResumeOwnership has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"5623fafa21a7fa680a3009a9f48bd0cd2680dc569c62ca9f2f05c133453dd88b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDesktopFollowerRoute (cyclomatic 17, cognitive 16): buildDesktopFollowerRoute has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2364}}}],"partialFingerprints":{"codehealthFindingId/v1":"54cd7bd4cf56398d18d1f1bd35156c2cd9da17607eb1174403c0611641a776ca"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleClientHello (cyclomatic 17, cognitive 16): handleClientHello has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"36565b4bbc6540b1b3722e8f61771fc4b2bb6d27bed5e00eb7122832e588696f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reduceTurnCompleted (cyclomatic 17, cognitive 14): reduceTurnCompleted has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eebf286fea171fbfaa018d01ddaceea70e887d0a71c0a7ae86d14f64e298b77"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reconcileLegacyHomeThreadProject (cyclomatic 17, cognitive 12): reconcileLegacyHomeThreadProject has cyclomatic complexity 17 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3851}}}],"partialFingerprints":{"codehealthFindingId/v1":"0969b6c5bcb5f30288b2898927874b1e2c9392d6a305978ba85ef2882f3b3fcc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveTrustedMacSession (cyclomatic 17, cognitive 12): resolveTrustedMacSession has cyclomatic complexity 17 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b807203bc7aadef2bdd1a3854581dad54abe788fe4f2c8420b99162d8d2bd09f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function diffTurnItems (cyclomatic 16, cognitive 32): diffTurnItems has cyclomatic complexity 16 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c2038eb6d2ff7265f4e4b644c3dc8e067a90a0e750f5fd2e512014280edad8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function push (cyclomatic 16, cognitive 30): push has cyclomatic complexity 16 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f0528f9d9643e3ca4e193c395fcc2870f881818ddabaeb97e4621c2b485f39"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitBranches (cyclomatic 16, cognitive 26): gitBranches has cyclomatic complexity 16 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"0521c72b3c57a4cc86d1c91acaa80392009bbeaab37620940736d481fd902485"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseApplyPatchChanges (cyclomatic 16, cognitive 25): parseApplyPatchChanges has cyclomatic complexity 16 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"490a831ab4e002987e660fc67254f83b16dd3411a04b01149758be3f01b088b4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function forEachThreadRowInResponse (cyclomatic 16, cognitive 21): forEachThreadRowInResponse has cyclomatic complexity 16 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-row-enrichment.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"adedea3e75bd0ac046d7f359d78b936533127167525387f44a76b60adbddf5a6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reasoningVariants (cyclomatic 16, cognitive 20): reasoningVariants has cyclomatic complexity 16 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"f211bee9cb8480738dbf27195c51ebd91484de549695c0f4c87872315728e792"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function diffTurnLifecycle (cyclomatic 16, cognitive 18): diffTurnLifecycle has cyclomatic complexity 16 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3a238e067f08c8c7eb0542d9392146bc1354cbb55fb69352080ba843cb6c1f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function desktopFollowerPayloadForResponse (cyclomatic 16, cognitive 16): desktopFollowerPayloadForResponse has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8ff6d0de1fbe1b610d3ec6ffeabf69832c6bdc085c55aad0a74e66779acaff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handlePeerBroadcast (cyclomatic 16, cognitive 16): handlePeerBroadcast has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"412bb59b9c4091e460198451abd9c38ca3992b70410fd9b6f6e633f03b1c7033"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitRemoveWorktree (cyclomatic 16, cognitive 16): gitRemoveWorktree has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba6895862bae7ad6834a4d2b769bdc362a61b29b92cb87413348e2dea6c4c03"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function toolOutputNotifications (cyclomatic 16, cognitive 16): toolOutputNotifications has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbf0453558f72d4fc29166a92f92f056c0e51358c2fba2e4e4b0b33aa272317"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function projectAutoApprovalReviewItem (cyclomatic 16, cognitive 14): projectAutoApprovalReviewItem has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f07c0444e2e42a9f771771756986d74e2302a6d668c48d505f38e2b224bb23"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function toolStartNotifications (cyclomatic 16, cognitive 14): toolStartNotifications has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"841ce2643678a594f04ea8611d75aa9d528221d52b5866bdc0ddc131d902d755"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function maybeMergeLatestJsonlTurnIntoTurnsListResponse (cyclomatic 16, cognitive 12): maybeMergeLatestJsonlTurnIntoTurnsListResponse has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3214}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5a45aea5ea0e1118d74653f5c7a3df57d50fc0411e8c25f7e7bd94840ff3d2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function emitPartDelta (cyclomatic 16, cognitive 12): emitPartDelta has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b81e29e212e2d7b25b1b7a49c49ca9e3f46bf0afe4f56fe7a3bb6600b61a2b6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeReadableToolItemForHistory (cyclomatic 16, cognitive 12): normalizeReadableToolItemForHistory has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"09266db4c60ae22bc4a3470bf70657b7ef365592c7f9ae04b1e44c06894817e2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function contextUsageFromTokenCountPayload (cyclomatic 16, cognitive 9): contextUsageFromTokenCountPayload has cyclomatic complexity 16 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f757fbba4192c12c1356118938b81a154c702903121df03ed5f11d807d6f74b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function trimTurnsListPayloadForRelay (cyclomatic 15, cognitive 19): trimTurnsListPayloadForRelay has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5230}}}],"partialFingerprints":{"codehealthFindingId/v1":"542767198edfaa700f8108ff01f2c44f2af7b7136887d69d41bfbd75a0b69436"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeUserRoleItem (cyclomatic 15, cognitive 17): sanitizeUserRoleItem has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4c444cd48ab99929d08c5929fdc24491aac14dea3a8988e94db592024753e04"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseSessionJsonlMetadata (cyclomatic 15, cognitive 17): parseSessionJsonlMetadata has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8201b8f9dcac9e770412a8bc255aaaa609d0b7aad4f97c465604b0025df7ac"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function projectDesktopThreadActivity (cyclomatic 15, cognitive 17): projectDesktopThreadActivity has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"589eed906beea8ed463e7368eca628ecf5e5b0a1b2d309c6a21d6f8a727e2200"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function notifyCompletion (cyclomatic 15, cognitive 15): notifyCompletion has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73bc5f7d8702f98d43b53258f6b9b342c7f456b7d358f01cabe215369f3a77e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseSessionJsonlInitialMetadata (cyclomatic 15, cognitive 15): parseSessionJsonlInitialMetadata has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"98826c2e2057f58834b550b5766e0121aec3debfd37c2282511e277f9236e3fa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolve (cyclomatic 15, cognitive 14): resolve has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"146aa5805661871f7ab4913f39e9254ca0a2b75919b3c89a82e3b02d5ebcc0d2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runtimeSettingsPatch (cyclomatic 15, cognitive 14): runtimeSettingsPatch has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-runtime-settings.js"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfab01e9f7b49695bbcc8be1f9ed80846b3744a0eef747848aa6810c01a0cd98"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function updateFollowerState (cyclomatic 15, cognitive 14): updateFollowerState has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"3162cc0dffc78499e6cdae62cb68e3ffe965060e0de0212938545cbaca10a8dc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function diffThreadMetadata (cyclomatic 15, cognitive 14): diffThreadMetadata has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"c432e2f01e712905bf9300a09ba2f73ffcf3936cbc365c63488f03c395cc50d5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readThreadTurnsListPageFromSessionJsonl (cyclomatic 15, cognitive 14): readThreadTurnsListPageFromSessionJsonl has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"b27660752cf5b991ac2524084aab6507753414ad8a70511a8439c6aabc27e8d6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function analyzePatchChunk (cyclomatic 15, cognitive 14): analyzePatchChunk has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"62033e1d46a2e0df3e4c45e4448ea2e53e74151c1dd5811eeb4b388d537f66da"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function printMacOSBridgeServiceStatus (cyclomatic 15, cognitive 13): printMacOSBridgeServiceStatus has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"1995161d9216bbfb298e14084276960c9194c4aedaa946fc5ab80017a4476833"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitStatus (cyclomatic 15, cognitive 12): gitStatus has cyclomatic complexity 15 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f13d11915b276a17ca443f7cb56a01c1129b6faf85a94e5a7ea94863fcadbf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sniffImageMimeType (cyclomatic 15, cognitive 12): sniffImageMimeType has cyclomatic complexity 15 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f92b8a7624b2f47763d0f512c747c4ae69721d45b97a16329ec93f5ea66395"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function appendEntity (cyclomatic 15, cognitive 11): appendEntity has cyclomatic complexity 15 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3944}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc7a2bd6ae1ad49787226a132cd0f19c2df16f733fe3c283cb954093f22ed2e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function semanticItemDescriptor (cyclomatic 15, cognitive 10): semanticItemDescriptor has cyclomatic complexity 15 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"437946f89ed90ccb5f78558aca349bcf8d79a0aeaf9530b3e3b9d34d7ed8c7e8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeThreadTurnsListForRelay (cyclomatic 15, cognitive 9): sanitizeThreadTurnsListForRelay has cyclomatic complexity 15 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3792}}}],"partialFingerprints":{"codehealthFindingId/v1":"2edb03cc7f7d514c48ec6808939935e96a4aa7f69af801f97909652a6e2cd44b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeTurnInitialPrompt (cyclomatic 14, cognitive 27): normalizeTurnInitialPrompt has cyclomatic complexity 14 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1033}}}],"partialFingerprints":{"codehealthFindingId/v1":"665083bdad5537ae4c22322f395c019361c7c36db5265360c1b342bc2c0a39ff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function updatePendingAuthLoginFromCodexMessage (cyclomatic 14, cognitive 21): updatePendingAuthLoginFromCodexMessage has cyclomatic complexity 14 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2121}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd170da17bb50d5691a97a788cad2ea236c9065d29720643ae5f0d5e818ddab"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleInbound (cyclomatic 14, cognitive 21): handleInbound has cyclomatic complexity 14 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"29cdb8e7fae7c5bafbfeeb98a92ba5dba4a11a57eb5fe13e31fb4957c083fc59"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function openThreadOnDesktop (cyclomatic 14, cognitive 18): openThreadOnDesktop has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bb3b105a92629e4859f7c47a9b14a1b5cc19b6bab749f2088692fc5b7c7f871"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleOutbound (cyclomatic 14, cognitive 17): handleOutbound has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"315616866e00d9e3990db2a7a8e4a42b9b6aca57d4e5468bb408e327a5d03688"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildThreadReadStateContext (cyclomatic 14, cognitive 17): buildThreadReadStateContext has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec5211b4a7769b21b94ddf3075f79d0c65252113ea7215f396fbeb5aa887371"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeLiveUserNotification (cyclomatic 14, cognitive 16): sanitizeLiveUserNotification has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4755}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc87acb8f7b20f8ea611ef26d76526a94dcce08a32ffe93e715ef82841ffdea5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function desktopOriginFromThreadRow (cyclomatic 14, cognitive 14): desktopOriginFromThreadRow has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7095c6a973743fd72c5aa6fc6c003cc85d511c49f299f0d755e02d557fba6773"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function removeOwnedThread (cyclomatic 14, cognitive 13): removeOwnedThread has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aed700817301f545eee26c7b33d90a26bbfeb1d079469e2701244b45b38fcc3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeState (cyclomatic 14, cognitive 13): normalizeState has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-runtime-settings-store.js"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"900c114a4bcb9de751a09cf6ce0e6d2d26fb6f9da8c06424572b280a9ad3d393"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function project (cyclomatic 14, cognitive 12): project has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c87d699cc5c90cf1fc9e1fbc114a9b5a9dacefb01985c7ad9ba101e3936168a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function startFollowerTurn (cyclomatic 14, cognitive 12): startFollowerTurn has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"6114fe4358f249552b1d910f3ef5919583c7c07697bd97dd99b8eadd80f7919b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleClientAuth (cyclomatic 14, cognitive 12): handleClientAuth has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c27f489bf596f3c4aaede4a64850455d2eb4307d21f4540129ef6ec551490a64"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function transcribeVoice (cyclomatic 14, cognitive 12): transcribeVoice has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e00513ca17603ef0ded49c4488e0556aa186a33761f616eadf0849afc3b6cf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function annotateImageGenerationPayload (cyclomatic 14, cognitive 11): annotateImageGenerationPayload has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4947}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c40709da11b1eb87cd29e0a9a542b657560b7cd80dacd9124b9d28bbf5b1cb3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function notifyCompletion (cyclomatic 14, cognitive 11): notifyCompletion has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/push-service.js"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5e731952d33558bb87df82aafa87a9682ed13ea622bc9248ef5a47f017a4eef"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeModels (cyclomatic 13, cognitive 22): normalizeModels has cyclomatic complexity 13 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"60db1c34a86d1037da32f6933dd81a3e052b43296379c50b9186d3856f8a61bb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function dispatchEnvelope (cyclomatic 13, cognitive 20): dispatchEnvelope has cyclomatic complexity 13 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3023}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d86c74c136e93f2ae0312a7668c004c183d1034c94dd5c520d7c0c7a0ed63f7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extendCanonicalResponseThroughAnchor (cyclomatic 13, cognitive 19): extendCanonicalResponseThroughAnchor has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc411a633b062e59994d5612861220ff272063c7dab2a943d73ba933a362cc75"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeTurns (cyclomatic 13, cognitive 19): normalizeTurns has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8753c3e592c2430f0e2d25b8affbda2d54e6dacb9d60fca782ecb72eeb47a1b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function listAllSessions (cyclomatic 13, cognitive 19): listAllSessions has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"667356d72a02af1609d88b0f4f25b8e4c1d63cbca38c1d92e18161ea12547b57"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function processAwaitingCoherentBoundary (cyclomatic 13, cognitive 17): processAwaitingCoherentBoundary has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"74cd2567e7369d6bede57f71df5108b64a75dde0d0fa448a41f3ebaee8a39662"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observedTaskStartedTurnIDs (cyclomatic 13, cognitive 17): observedTaskStartedTurnIDs has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b1ccbdb625e7983d9313969b591447b61bb08fad227b40a7be791bfef9dc8f3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function request (cyclomatic 13, cognitive 15): request has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f38dea8da9905da27ac5eed0dd8400976c709542f5f7a179ebcc390fb7e86a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readAndCacheJsonlArtifactItems (cyclomatic 13, cognitive 14): readAndCacheJsonlArtifactItems has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13a97947c52e43d8477ecf9ad3931482fa3d48627b96319a9079926bc0569c0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyRuntimeSettingsToConversation (cyclomatic 13, cognitive 14): applyRuntimeSettingsToConversation has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-runtime-settings.js"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"51351645a5ba77ab6ac9b500161aa412a983d7f4008a3eea6365856adb119f30"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function hasNormalizedHistoryOutsideRawTurns (cyclomatic 13, cognitive 14): hasNormalizedHistoryOutsideRawTurns has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"079d4806cd401f329209c4cd899c16be7564e47c9c1e5faeeedd44cdbfc04bcc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 13): (anonymous) has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4670}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90308b1c8ed31c6b2d9d50e606318b7572c8c5c71c026d2872f4c1f1c5dfd5b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function customToolStartNotifications (cyclomatic 13, cognitive 13): customToolStartNotifications has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1485}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f64fcaab45767994940e52eb6d0473f55b1d1e750433a61537dbf061aa56d65"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function queueApplicationMessageWithOpenCodeList (cyclomatic 13, cognitive 12): queueApplicationMessageWithOpenCodeList has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1583}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1d29e77dfc110a27b7f76d62fcb591f71e3e0375043ca6c7b6c3408c5e2760"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sendBridgeManagedThreadTurnsListResponse (cyclomatic 13, cognitive 12): sendBridgeManagedThreadTurnsListResponse has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1714}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6cef374c3a350ca3892158806dd34199ffc494c60f11face3300ec98e13a387"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizePhoneRuntimeRequest (cyclomatic 13, cognitive 11): normalizePhoneRuntimeRequest has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2827}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fba3882bfbd40c8e80006a7a6559bb887d00b4b025aec469d976c44542e6990"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function replaySidebarAnnouncementAfterMaterialization (cyclomatic 13, cognitive 11): replaySidebarAnnouncementAfterMaterialization has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"92433d6515523cadd964fd2989f0b303812168e255eb7782e8fd5e016e51b1dd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function attachToThread (cyclomatic 13, cognitive 11): attachToThread has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-list-provenance.js"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"26601ba3d818f87031af3200e1c1a5a7449b1e2e2bbaddc18137afa17199ccdb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function userMessageNotifications (cyclomatic 13, cognitive 10): userMessageNotifications has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c6f9fa3bde25e1f9bf44c5cc6bd53b8d1b431fd44e6907aabedeb27c00934f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commit (cyclomatic 13, cognitive 10): commit has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-runtime-settings-store.js"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fb8ad8633fc34b88de3f21736178ce76e648968edc0b1985afe4331e9eaf33"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function canHandleFollowerRequest (cyclomatic 13, cognitive 9): canHandleFollowerRequest has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"432b4bd0ead90ae7c0b30fbd82dbbd8c146cf2a96caf5ba6e5864afbfaccbebd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function observeAppServerActivity (cyclomatic 12, cognitive 22): observeAppServerActivity has cyclomatic complexity 12 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"0153b06e4a9b84a11f2f6beed2c7ea76bd81fc5785aa029af823004e89b7d716"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function collectAssistantMessages (cyclomatic 12, cognitive 15): collectAssistantMessages has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3235}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbe9ce4fe99dcad79e2fc41823a0cf612fe99dadd18c0d2d08379241314939ba"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitCheckout (cyclomatic 12, cognitive 15): gitCheckout has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"03275caf91566863157f53853cd315fc51192bd1f2e55aa8c46d1405eaf07d18"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function upsertItem (cyclomatic 12, cognitive 14): upsertItem has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"339cb6cc2c3e9c62b0681e3ae07308c626607d2a53bf26d44d6c6e90def79b45"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function ensureCodexCLI (cyclomatic 12, cognitive 13): ensureCodexCLI has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-cli-bootstrap.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"d206406d6f3740f8823200ef89635c9ad5bc29f37d7fb1b9733c21384aee375b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleResumeState (cyclomatic 12, cognitive 13): handleResumeState has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"024e77d6ad9392a866fef6612788a77a006ef9e216e1b98c94c358072e70a048"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readRecentSessionJsonlCwd (cyclomatic 12, cognitive 13): readRecentSessionJsonlCwd has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b83bc89ea7a1087632c6974c2a14ce2023b296ac57e9712ed6ec5166a478eb8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function skipUnknownExpression (cyclomatic 12, cognitive 12): skipUnknownExpression has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-tool-wrapper.js"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db0bd63ef6e9007f2a7606747f9947e36588b2c1e55a632b20052c68196a83f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function recoverThreadBaselineFromQueuedChanges (cyclomatic 12, cognitive 12): recoverThreadBaselineFromQueuedChanges has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2717}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbbf578e5f8e2a4b6ca9a0017fbfa709c574891d63363a1f9b7d4d46584f685d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeDesktopItemCompatibility (cyclomatic 12, cognitive 12): normalizeDesktopItemCompatibility has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f1592ab67eced044a5174f4f4321bc66adf9d933d574845aa79e84993d22fe"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleBridgeManagedCodexResponse (cyclomatic 12, cognitive 11): handleBridgeManagedCodexResponse has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2450}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b72943b2add5b5983372f10675a3ff5e204e94838abd74af9aa27421eec9a5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readBridgeConfig (cyclomatic 12, cognitive 11): readBridgeConfig has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c80cd843cb3d11c2032b79fd4c6c335679ed6152a98d8ea9fad8f10b06e7b6f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function tryBootstrapDesktopResume (cyclomatic 12, cognitive 11): tryBootstrapDesktopResume has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1409}}}],"partialFingerprints":{"codehealthFindingId/v1":"a02d81bd70ac1d6876e531f7d544b3de2b4d6c6adf322455c70726c9bff1a9a6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyPendingTurnStartParams (cyclomatic 12, cognitive 11): applyPendingTurnStartParams has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"eadfd8ff1e75d7c588add218eb348a5d32df42669f1e4807e0eb12c9b70d82f8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function areDuplicateUserHistoryItems (cyclomatic 12, cognitive 10): areDuplicateUserHistoryItems has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a8b1e06270584789eb61b2f3558998ac4600e8d6bdf04036b6a25543b3d89d5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeToolOutputImageViewItemForHistory (cyclomatic 12, cognitive 10): normalizeToolOutputImageViewItemForHistory has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"e35b4549c056ebac854ff815884cfb861e2fc0ce52e9a514af67652a368f1d03"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function decodeOpenCodeThreadListCursor (cyclomatic 12, cognitive 9): decodeOpenCodeThreadListCursor has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":5660}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbed4d860c0cc7116c71b11aa356a74bb58407ad1a26581dabe026a5ad10f2b2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeResponseItemForHistory (cyclomatic 12, cognitive 9): normalizeResponseItemForHistory has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"e916fd1261c1c6c5273baf6b612bc7c79467328ee40c1906917e55fc6e66efbc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readM4AInfo (cyclomatic 12, cognitive 9): readM4AInfo has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-audio.js"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5e0c562730dc1de3d8347e513719dc37231482080485653e292e5a97bb12f6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 16): (anonymous) has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"996f23b8889d6017d41559e8cd08d2ffec262f3406f08d1251df01c79187c0eb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readPreviewImageData (cyclomatic 11, cognitive 15): readPreviewImageData has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"9361d435adff95e67285a721090b02d90041bdefa3d4e2855581c60c28b76092"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function gitPush (cyclomatic 11, cognitive 14): gitPush has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"917fa2e3925306048ce1068ff5f04a682528d56e96ed2d210b25b68926c52700"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function boundedIndexedDesktopLiveTurns (cyclomatic 11, cognitive 13): boundedIndexedDesktopLiveTurns has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3741}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8a824ccef54762b138bdcd3da8b4edcc3e4437ea65ec4a3cf8426fbe755780"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadPetDirectory (cyclomatic 11, cognitive 13): loadPetDirectory has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"cddd741b3c86fae77835622cfaee595bb4928e963f6f7bb9518b9bc9690eb243"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleBridgeManagedHandshakeMessage (cyclomatic 11, cognitive 12): handleBridgeManagedHandshakeMessage has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":2285}}}],"partialFingerprints":{"codehealthFindingId/v1":"633cbc9134175c7b330fb59c67c47dd4069859a7c3867c36e97b5fac1d5ce794"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function selectEmergencyHistoryItemsForRelay (cyclomatic 11, cognitive 12): selectEmergencyHistoryItemsForRelay has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3540}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6e035c434fbc7bffc9811042ba846694a0c011a3ee9f1bdc924125134de29c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeLiveGeneratedImageParams (cyclomatic 11, cognitive 12): sanitizeLiveGeneratedImageParams has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":4838}}}],"partialFingerprints":{"codehealthFindingId/v1":"66c1a35dfd85338fa30081ecb76257696c9ff3d7aae825652b0fbcfc95ec3aee"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function visibleUserPromptText (cyclomatic 11, cognitive 12): visibleUserPromptText has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"22415df0ed53bccca1791d62748a2145624669b9a4ab951893af8afc2fcdf337"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function collectJSONPatches (cyclomatic 11, cognitive 12): collectJSONPatches has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-state-patches.js"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"dae1e2a7410ed403384e172fb312c3d24738d3860d85853c96cca0131169d0e5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeBridgeDeviceState (cyclomatic 11, cognitive 12): normalizeBridgeDeviceState has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d241df7be5d5336e0816cfeb4205ed0f696a7aeb1cc5dbbf58f5318543ba84"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDesktopTurnsListResult (cyclomatic 11, cognitive 11): buildDesktopTurnsListResult has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5ced4bcd29fbe0ca52f0dab3132d055867a363b92756f06ceb1e2a4ad68e73"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncBackgroundThreadLifecycle (cyclomatic 11, cognitive 11): syncBackgroundThreadLifecycle has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45644d7d10c97ddb8911fad56d824c02741aa5bd61ed002a03f52c0ce313b57"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function projectPendingDesktopAction (cyclomatic 11, cognitive 11): projectPendingDesktopAction has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3286}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61e8c4c1ede4895ca38b82675364990df70f34750ed82ca854b478db4913584"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function rememberPendingTurnStart (cyclomatic 11, cognitive 11): rememberPendingTurnStart has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec766b0bf70ff95a40690de7dc3a1eb92d804c6ec68552e728cf7ac9a1377045"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function agentMessageNotifications (cyclomatic 11, cognitive 11): agentMessageNotifications has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1317}}}],"partialFingerprints":{"codehealthFindingId/v1":"404901e17e07d220f108f433f5e17b33fb840d8407d1840c8c4b98467837a715"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 10): (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5e6c03697c57d5619a8e37e5840dadce0dca59890bea4fbf8f700fbd58292e9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseAdaptiveThreadTurnsListRequest (cyclomatic 11, cognitive 10): parseAdaptiveThreadTurnsListRequest has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3011}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19fd10bac2fb3c2da53f7f566a49a3290d16e9acd0931ceae90dede67ee0e73"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function updateFollowerState (cyclomatic 11, cognitive 10): updateFollowerState has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe4ad09dd49c612d87477db01fa2563ed9c6cf170b28c7379d9bbe68b85335e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveWorktreeCreationContext (cyclomatic 11, cognitive 9): resolveWorktreeCreationContext has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"095f2a319e279eabf51043725a7b7d5ad2ca461a7c2e419462dab45fc765b7ca"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function webpChunkDimensions (cyclomatic 11, cognitive 9): webpChunkDimensions has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f674ce1cd7c348596ce1d4c30d7831695363fa729a958f9b876cae43e082587"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/bridge.js: 5206 lines of code: phodex-bridge/src/bridge.js has 5206 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b5be6b5d78c00a6ff8721d2d488886e0a2d4bbbf0b44fe9df7d76526b56be5"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-action-follower.js: 4035 lines of code: phodex-bridge/src/desktop-ipc-action-follower.js has 4035 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df75ae21cc40722b2e05690dc194e96f908c9a9295d17c82f1d0bc31d57d51f7"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/git-handler.js: 2700 lines of code: phodex-bridge/src/git-handler.js has 2700 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e207629dd2d15cc7db2af15ad003786cc5b69d1f7e6e88cf98dda209e29d94"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/rollout-live-mirror.js: 2081 lines of code: phodex-bridge/src/rollout-live-mirror.js has 2081 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"938120f2818d1b080770b2ce51007861311a92229e08de37774541695b8bd4e8"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-live-owner.js: 2067 lines of code: phodex-bridge/src/desktop-ipc-live-owner.js has 2067 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6343fd5779f6f7c67cd2b4383e41067b15b740222341b7292508271c3a53c1"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/session-jsonl-history.js: 1486 lines of code: phodex-bridge/src/session-jsonl-history.js has 1486 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edfa86d41b1b5e061291707e7e71884e2b7ecbeff1ef1fbddf951becd39c9929"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-conversation-adapter.js: 1398 lines of code: phodex-bridge/src/desktop-ipc-conversation-adapter.js has 1398 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7688dbaa3a2b3b24195dcef9bc4ff3662b06daa5b19ff1a0b1fe578b54420e70"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/opencode-runtime.js: 1362 lines of code: phodex-bridge/src/opencode-runtime.js has 1362 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd5c33a972ed37fc820311a7653676050874d7c122ccb4264d077962db1c3ec"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/workspace-handler.js: 1220 lines of code: phodex-bridge/src/workspace-handler.js has 1220 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c48f3c5a7e6c47bb8d2507de97a2621f586e3e94b4d504aef6cb941c686b7c5"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-conversation-projector.js: 1199 lines of code: phodex-bridge/src/desktop-ipc-conversation-projector.js has 1199 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-conversation-projector.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d66c4170fecfc394ea28fefc42e15cef216c1ee2751a86668b59620c3d959f7"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/secure-transport.js: 908 lines of code: phodex-bridge/src/secure-transport.js has 908 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3edef68b78cc1ada91988dfcdf81551cff355139d85b07e97dac68eb50decc"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/push-notification-tracker.js: 896 lines of code: phodex-bridge/src/push-notification-tracker.js has 896 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce55ac8abc5c19ec19879a32529cbac780366af4d43cca3c3788582f81b3e57a"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/codex-desktop-refresher.js: 874 lines of code: phodex-bridge/src/codex-desktop-refresher.js has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-desktop-refresher.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc85c29254697555d1c0636852478ff3417c659b721f8c1459f481c98e5739cc"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/rollout-watch.js: 847 lines of code: phodex-bridge/src/rollout-watch.js has 847 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/rollout-watch.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"46444d446defcb60d9397abf742ac43158850bf8045e7bd596bc3c76b6513a2e"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-owner-transport.js: 769 lines of code: phodex-bridge/src/desktop-ipc-owner-transport.js has 769 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af88438d0ca2437c09510458171d17856dd9eb5650c48cea56a0a82b61b89fba"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-ipc-shared.js: 709 lines of code: phodex-bridge/src/desktop-ipc-shared.js has 709 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"74d2bd8adc026d4677c5b133acb25c3008f7e75d75d50e14e4ae3fbf2bb1ca5f"}},{"ruleId":"R3","level":"warning","message":{"text":"relay/relay.js: 653 lines of code: relay/relay.js has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d1ed94394ce844c8d5767add69c123eaffce4b28ac023cf5f05cc3222de499"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/macos-launch-agent.js: 644 lines of code: phodex-bridge/src/macos-launch-agent.js has 644 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/macos-launch-agent.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba64dfc511224e272461c4dd0be9b54e025f67282d3b96f4bdc790342dfb04d"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/thread-activity-projector.js: 637 lines of code: phodex-bridge/src/thread-activity-projector.js has 637 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/thread-activity-projector.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb6fe328cfde3539b79942b092df3cb04a3b3ead3142545303bb81f38530c89"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/project-handler.js: 559 lines of code: phodex-bridge/src/project-handler.js has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88ad395bdd20b5907592f86efdec08325c4aac533db9281d042881c8a082d5a"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/voice-handler.js: 524 lines of code: phodex-bridge/src/voice-handler.js has 524 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4637575d63c735c94f556801afeb6ccc20305acfbb1c2adfdf32b5bb43aee84c"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/desktop-handler.js: 505 lines of code: phodex-bridge/src/desktop-handler.js has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0caa9b3c1f7f4a6edb6ba5b90b46a6a1ac057863043e271addb40161b46f80"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/pet-handler.js: 468 lines of code: phodex-bridge/src/pet-handler.js has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3e021e3d4e00fe8d222f693a402a78ea378637bb5384794933d33bd6fb2b8e"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/codex-tool-wrapper.js: 460 lines of code: phodex-bridge/src/codex-tool-wrapper.js has 460 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-tool-wrapper.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5dd1565135e199566909b10e4d261102c2879484b380105195ce835ea405a5b"}},{"ruleId":"R3","level":"warning","message":{"text":"phodex-bridge/src/secure-device-state.js: 433 lines of code: phodex-bridge/src/secure-device-state.js has 433 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0877765e5ed94fa7ad1717a265f3afe479d7514f8026893f6e36c306a7ded092"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"693fe0b9ce852f84c04e6daf5266e87707ed54b0dc84a2f90e93c0379df5810d"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bootstrap-codex-cli.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c41eedc900c4d1e9c25462d5b03071f9db71ffeff91671a053a40c1c9ec3927b"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/scripts/prepare-private-defaults.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df400d7f78a055df5c10c1166efef58d2bd0b32a1523eb132b6710dc3d1859f"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/scripts/cleanup-private-defaults.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d460a5d4db51c5ca9f28a20af8b2015621cfaa4cac7c65e09c55d293437112"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/bin/phodex.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"769d4d227b7a29541157f6a1c35d5314f67e540de676982b39ce29720594923e"}},{"ruleId":"R6","level":"warning","message":{"text":"No lint or typecheck script: test \u2713 \u00B7 lint \u2717 \u00B7 typecheck \u2717 \u2014 read from this repository\u0027s package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: \u0060test\u0060 for the suite, \u0060lint\u0060 or \u0060prettier\u0060 for linting, \u0060typecheck\u0060/\u0060type-check\u0060/\u0060tsc\u0060 for type checking. \u2717 therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline \u2014 a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A \u2713 means the wiring is DECLARED \u2014 a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"658a995477a4f3b704a1d0c61d78cffb4c5cc1944c2f896c1bb70ee901a201cf"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~343 LoC): no import path from any entry point (17 application, 6 tooling, 55 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa07967bbf07ad021a7be753a1331eeabac223f9ddf25c6369c09ca4c0eb0f2"}},{"ruleId":"R7","level":"note","message":{"text":"Unused module-local declaration \u0027hasTrustedPhones\u0027: This top-level declaration is not exported and its name occurs nowhere else in its module \u2014 not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6737f3e1082756cbc3e05fe499457b0e7137e614a70260b31992e1e3b5eb2f5"}},{"ruleId":"R7","level":"note","message":{"text":"Unused module-local declaration \u0027responseItemContentText\u0027: This top-level declaration is not exported and its name occurs nowhere else in its module \u2014 not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":1529}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f4bd5885bc6531e13f2a50189081cdf695ad6738b3d8247a0c7915e143e4c1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!Number.isFinite(registration.pairingExpiresAt) || now \u003E registration.pairingExpiresAt\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37028a6ecae30f779d76f992f4c697230d4a5f4bfba7b471a2423916dba48ce"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!params || typeof params !== \u0022object\u0022 || Array.isArray(params)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/bridge.js, phodex-bridge/src/rollout-live-mirror.js. 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":3026}}}],"partialFingerprints":{"codehealthFindingId/v1":"f498046597cfc7dcbdeb46369e6b50bbb50a56e61987071a82014ad8911920ec"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!parsed || typeof parsed !== \u0022object\u0022 || Array.isArray(parsed)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/bridge.js, phodex-bridge/src/push-notification-tracker.js. 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":3013}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09ab8bf02150ce96ef2e8d91b57f2e0c717c888296718d7052554099c892fea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!registration || !hasActiveMacSession(registration.sessionId)\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e885456343406eb59106978e0c718a6879f76a8654136879254728458bb550"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!registration.macDeviceId || !registration.macIdentityPublicKey || !Number.isFinite(registration.pairingVersion)\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3f48f8cbde6b2ad68392743948d8ab429927795f8e2d079e2c6371ec47f52a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!relativePath || relativePath.startsWith(\u0022..\u0022) || path.isAbsolute(relativePath)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/apply-patch-changes.js, phodex-bridge/src/worktree-origin.js. 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":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf91d662131969ac3c98f17a6a64687dcd64d3108b41aaea3dd63657bf7281c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!sessionId || (role !== \u0022mac\u0022 \u0026\u0026 !isRelayMobileRole(role))\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4bc4adf7eb17440efd681c5561de2ff017d093f74ca6cd911683a4f7bb16fe0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060Array.isArray(parent) \u0026\u0026 Number.isInteger(key)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-state-patches.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4216}}}],"partialFingerprints":{"codehealthFindingId/v1":"f08f02ba5fc6d5c5d76243444d8bc8348c34b6d646ad1d65074147df13fbced9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060client.readyState === WebSocket.OPEN || client.readyState === WebSocket.CONNECTING\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d81f1c62cc0618a2cde427b5101b8ac0eed7bc5b6938d67474c11327f05d3fb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060envelope.params?.clientId || envelope.sourceClientId\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-live-owner.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"2409c5d8edf211e6aa4f4aa4b4aadb6cb40a0ae33a7ca159aab17ffb0309455d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error?.code !== \u0022ENOENT\u0022 \u0026\u0026 error?.code !== \u0022ECONNREFUSED\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-owner-transport.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2902}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46c99068a0800fa818513217d90da4c3e1b8d43969d0e5a741993ae848611d0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060existingClient.readyState === WebSocket.OPEN || existingClient.readyState === WebSocket.CONNECTING\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ce33fb3c5e6cd007508a5800169287e4bda09447290b9eba3cac81471f6316"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060followerClientIdsByThreadId.get(threadId) || new Set()\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-live-owner.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"110ac026afa0fc28e057fcfd1f7014f64faaa606d4aeb3d277cafd266f16eaca"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isRelayMobileRole(role) \u0026\u0026 !sessions.has(sessionId)\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f538f7fcdae4a916db5d7380e7bf58e2949b1312b5c5f80e2c31d47d172fc4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060item?.review \u0026\u0026 typeof item.review === \u0022object\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-conversation-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2139}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75b0798ec80231b915b707e6cb6d4b64814eff99f235ded34e11833213d5d38"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.startsWith(\u0022\u002B\u0022) \u0026\u0026 !line.startsWith(\u0022\u002B\u002B\u002B\u0022)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/apply-patch-changes.js, phodex-bridge/src/workspace-handler.js. 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":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cd8ee86de42b5bf44ef53b997cccd098f6acde65811cbd63ab58186ec8ba1df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.startsWith(\u0022-\u0022) \u0026\u0026 !line.startsWith(\u0022---\u0022)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/apply-patch-changes.js, phodex-bridge/src/workspace-handler.js. 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":"phodex-bridge/src/apply-patch-changes.js"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f578c891ee9679eb8c3b6668f6e1b2c8db8c32195ef5caea14bc82ece89989e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060method === \u0022thread/read\u0022 || method === \u0022thread/resume\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/opencode-runtime.js, phodex-bridge/src/thread-row-enrichment.js. 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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"5059c1b3b9a38d733412609071a8948d84abaab82483361a2aff79c0e269187f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalizeString(thread?.id) || normalizeString(thread?.threadId)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/thread-list-provenance.js, phodex-bridge/src/thread-runtime-settings-store.js. 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":"phodex-bridge/src/thread-list-provenance.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd0bc0cbbf67e4f23eec3dad27344e5f381bc961a2e575e85d1b5de3c1602bb2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalized \u0026\u0026 typeof normalized === \u0022object\u0022 \u0026\u0026 !Array.isArray(normalized)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-live-owner.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2627}}}],"partialFingerprints":{"codehealthFindingId/v1":"a880bdd145e95b8f6c38fb8527fdc7e9bd30100341689bf8eae673b951bbeccc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalized === \u0022exec_command\u0022 || normalized === \u0022shell_command\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/rollout-live-mirror.js, phodex-bridge/src/session-jsonl-history.js. 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":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":2034}}}],"partialFingerprints":{"codehealthFindingId/v1":"5522e305b8e26c193920a014a07cd4cd14782b688f73f5b63fba3b671d25b49e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060params.includeData !== false \u0026\u0026 params.metadataOnly !== true\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/pet-handler.js, phodex-bridge/src/workspace-handler.js. 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":"phodex-bridge/src/pet-handler.js"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e63b38fea0f8d2535a5367329306d7d0b598ea0492758e8cde5327a780606ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060process.env.CODEX_HOME || path.join(os.homedir(), \u0022.codex\u0022)\u0060 appears character-identically in 4 files \u2014 phodex-bridge/src/codex-home.js, phodex-bridge/src/git-handler.js, phodex-bridge/src/rollout-watch.js, phodex-bridge/src/worktree-origin.js. 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":"phodex-bridge/src/codex-home.js"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5062b496c73ff04c9e8c5f29c037dc0de15aab052fdd04a33dcaa929f19d4a48"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(item.decisionSource) || readString(item?.event?.decision_source) || null\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-conversation-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2180}}}],"partialFingerprints":{"codehealthFindingId/v1":"234dccfd3e05a7ac4e70dd2d2cedb3852f834c9bbda3421f9165745a515eb1a5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(item?.id) || readString(item?.itemId) || readString(item?.item_id)\u0060 appears character-identically in 3 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-conversation-projector.js, phodex-bridge/src/thread-activity-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67deeec95b7accee46ca674847b8d6a37f235de2155ab6a18acc42143832ba1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(item?.text) || readString(item?.message)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-shared.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3272}}}],"partialFingerprints":{"codehealthFindingId/v1":"02dc79a081d0c26497d3aa61a2c3592d44ef0e3fb9c884231b8ce3eb90ee2434"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(params.conversationId) || readString(params.conversation_id)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-live-owner.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f883ba0629f3cc0e692b916dd95c6d39be8696df8924cac1d31ba3f4bd25dd8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(params.turnId) || readString(params.turn_id)\u0060 appears character-identically in 3 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/thread-activity-projector.js, phodex-bridge/src/thread-context-handler.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2431}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7792349469a17cedc87a5e03eec374808bd7481ca37605e20a2856308734c3a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(rawState.cwd) || readString(rawState.current_working_directory)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/thread-activity-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3618}}}],"partialFingerprints":{"codehealthFindingId/v1":"68924945ac7b6db291d12403e77287e86d3b6fbab52ecd185924ef8734bd4a9f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(rawState.title) || readString(rawState.name)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/thread-activity-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":3617}}}],"partialFingerprints":{"codehealthFindingId/v1":"015d0a286dae386bf761e53358864579f9993cb4130a63fd110b07855070b6aa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(result?.clientId) || clientId\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-owner-transport.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":2886}}}],"partialFingerprints":{"codehealthFindingId/v1":"30679fd8321356c3059541847dca66b9e4b5fef89407f7f192bdee6a3a5c9ff5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(turn?.id) || readString(turn?.turnId) || readString(turn?.turn_id)\u0060 appears character-identically in 3 files \u2014 phodex-bridge/src/desktop-ipc-action-follower.js, phodex-bridge/src/desktop-ipc-conversation-adapter.js, phodex-bridge/src/thread-activity-projector.js. 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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f0e14440c909113a6207c2d575e80dde50f97fab432f4550861c5a765a4bb9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060readString(turn?.turnId) || readString(turn?.id)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-conversation-adapter.js, phodex-bridge/src/desktop-ipc-live-owner.js. 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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3d701f56684768bd3cb663c22a883a60a96f66e6183526a20b0935472bd496"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060result.thread \u0026\u0026 typeof result.thread === \u0022object\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-live-owner.js, phodex-bridge/src/thread-row-enrichment.js. 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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":2166}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a5ea3a85acbeec39542303493e98787481383d8e104051b4817962804666847"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060session.mac \u0026\u0026 session.mac.readyState === WebSocket.OPEN\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06d962e779c36c9a84e01c16cb683e98121a9a8bb0338bb0bd5ab2db74db15b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060session?.mac \u0026\u0026 session.mac.readyState === WebSocket.OPEN\u0060 appears character-identically in 2 files \u2014 relay/phodex-backend-relay.mjs, relay/relay.js. 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":"relay/phodex-backend-relay.mjs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cbb19cc3f3fc98c83c14c484df6bf6faa4e8a4f3a9e638fce0685f92bdac0dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status === \u0022inprogress\u0022 || status === \u0022running\u0022 || status === \u0022active\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-live-owner.js, phodex-bridge/src/desktop-ipc-shared.js. 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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1934}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e33f9a25ae517869be08f72ab5007b130b04ae31aad42af3eabd9b39ec08e9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060statusByToken[normalizeToken(value.status)] || \u0022\u0022\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/desktop-ipc-conversation-adapter.js, phodex-bridge/src/desktop-ipc-conversation-projector.js. 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":"phodex-bridge/src/desktop-ipc-conversation-adapter.js"},"region":{"startLine":1429}}}],"partialFingerprints":{"codehealthFindingId/v1":"7321666fab140aaa6fe0f55c3148627ad68fae7f36a32f5f29a8f548bb4f0ea1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof candidate === \u0022string\u0022 \u0026\u0026 candidate.trim()\u0060 appears character-identically in 3 files \u2014 phodex-bridge/src/desktop-handler.js, relay/relay.js, relay/server.js. 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":"phodex-bridge/src/desktop-handler.js"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe1db50f92841b671f0625e52f33194859f7a3fd9480b8adc646d60da827244f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof rawValue !== \u0022string\u0022 || !rawValue.trim()\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/rollout-live-mirror.js, relay/server.js. 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":"phodex-bridge/src/rollout-live-mirror.js"},"region":{"startLine":2264}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42e365288032ab4968b8858d42c4ce42bde7a57725482ccbbcae788ea4eb7ac"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value !== \u0022string\u0022 || !value.trim()\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/codex-tool-wrapper.js, relay/relay.js. 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":"phodex-bridge/src/codex-tool-wrapper.js"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7f7cfc48e983db820d632faf4c2baf2871bec4d3ac1f9fdbb761bb959ce318"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value === \u0022number\u0022 \u0026\u0026 Number.isFinite(value)\u0060 appears character-identically in 5 files \u2014 phodex-bridge/src/bridge.js, phodex-bridge/src/desktop-ipc-conversation-projector.js, phodex-bridge/src/desktop-ipc-shared.js, phodex-bridge/src/rollout-watch.js. 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":"phodex-bridge/src/bridge.js"},"region":{"startLine":5686}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e555eabe7560ecc9c94eb74031305a97e5e153b08d587e0e28428194384731"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value === \u0022string\u0022 \u0026\u0026 value.trim()\u0060 appears character-identically in 22 files \u2014 phodex-bridge/scripts/prepare-private-defaults.js, phodex-bridge/src/apply-patch-changes.js, phodex-bridge/src/bridge.js, phodex-bridge/src/codex-desktop-refresher.js. 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":"phodex-bridge/scripts/prepare-private-defaults.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c2a7a7fb2a9dc7ce069ed260b45b9e584079fbe4885993d3881c40fb9bbb567"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value \u0026\u0026 typeof value === \u0022object\u0022 \u0026\u0026 !Array.isArray(value)\u0060 appears character-identically in 2 files \u2014 phodex-bridge/src/push-notification-tracker.js, phodex-bridge/src/session-jsonl-history.js. 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":"phodex-bridge/src/push-notification-tracker.js"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"5beadb13861845944acab0133c0b730f7e961c55a8b33ddd89958e037464abb2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!supportsTurnPagination || initialTurnsLoadedByThreadID.contains(threadId)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift, CodexMobile/CodexMobile/Services/CodexService\u002BThreadHistoryPagination.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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":6029}}}],"partialFingerprints":{"codehealthFindingId/v1":"6432b46bb387d997cc4e03ca92c45e0ad37621457c6dd000d031ba912aef7765"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.hasPrefix(\u0022deleted file mode \u0022) || $0 == \u0022\u002B\u002B\u002B /dev/null\u0022\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"933d33a23109f6f83d2ab20c8432dd2998c4ffc7616e8cf0ad84be2dfa2cb04c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.hasPrefix(\u0022new file mode \u0022) || $0 == \u0022--- /dev/null\u0022\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"082a4653cea3a45868ff387fb09d9263de9f92234f7c10dbcb96e9736f473598"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.hasPrefix(\u0022rename from \u0022) || $0.hasPrefix(\u0022rename to \u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.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":"CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf5cf54169f10129ffe670521299a452366cd6e65849c86c94ff34e927da58d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(trimmed.hasPrefix(\u0022\u0027\u0022) \u0026\u0026 trimmed.hasSuffix(\u0022\u0027\u0022)) || (trimmed.hasPrefix(\u0022\\\u0022\u0022) \u0026\u0026 trimmed.hasSuffix(\u0022\\\u0022\u0022))\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4020}}}],"partialFingerprints":{"codehealthFindingId/v1":"b059a294ce55258a8d8493f36f856433feb719b69753b7276f7da29f9bb4d386"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060activeTurnIdByThread[threadId] != nil || runningThreadIDs.contains(threadId)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift, CodexMobile/CodexMobile/Services/CodexService\u002BMessages.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a27cbb344f19bd7d2dbe6006b2e936aea5ffd35e194523751dc4878513c9a9b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060activeTurnIdByThread[threadId] == nil \u0026\u0026 runningThreadIDs.contains(threadId)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift, CodexMobile/CodexMobile/Services/CodexService\u002BMessages.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d025628c12ff8d94f04d672ad4d83c7dafe9fbe7804ef4c4a27bb7b07abb754"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060candidate.role == .assistant || candidate.role == .user\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift, CodexMobile/CodexMobile/Views/Turn/Timeline/TurnTimelineReducer.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":"CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift"},"region":{"startLine":2646}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d275f7c8731248a5ac8322809c911cb812deea4aea6677614037603af5c846"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060codex.isConnected || codex.isInitialized\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/ContentView.swift, CodexMobile/CodexMobile/Views/Home/ContentViewModel.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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":2124}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ce12938549392da633b7187109ed397a730ee949a83f0043068f1ec089bd71"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060collabType == \u0022collabagenttoolcall\u0022 || collabType == \u0022collabtoolcall\u0022 || collabType.hasPrefix(\u0022collabagentspawn\u0022) || collabType.hasPrefix(\u0022c\u2026\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf6abd75ae550cac124a11400def1bb2e751ed8a3eb6117711b00ffdc7a745e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060first == \u0022env\u0022 || first.hasSuffix(\u0022/env\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3987}}}],"partialFingerprints":{"codehealthFindingId/v1":"8634c054e91053998fe54d47d86ebd5ff312bde3fe06335013f47b4c2cda3fb8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isPreparingManualScanner || isResolvingManualPairingCode\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/ContentView.swift, CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef194f945c1f061a8185038285fa33558986b2021a210d002e7f7f03ce0be16"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isPreparingManualScanner || isWakingSavedMacDisplay\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/ContentView.swift, CodexMobile/CodexMobile/Views/Sidebar/SidebarConnectionEmptyStatePanel.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":"CodexMobile/CodexMobile/ContentView.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9ae891ef2d68626c87f7fcae07f8bc3f500a0db05fa4778765c01ed91bb843"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lowered == \u0022collabagenttoolcall\u0022 || lowered == \u0022collabtoolcall\u0022\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Models/CodexCollaboration.swift, CodexMobile/CodexMobile/Models/CodexThread.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":"CodexMobile/CodexMobile/Models/CodexCollaboration.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e23c74d981e4c76ecaefb9b0a35b96c6b9fa5ba773b82922f3171c1ddca60f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060message.contains(\u0022method not found\u0022) || message.contains(\u0022unknown method\u0022) || message.contains(\u0022not implemented\u0022) || message.contains(\u0022does \u2026\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift, CodexMobile/CodexMobile/Services/CodexService\u002BThreadForkCompatibility.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":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84bd8c2363074e52ee66d48bb13904f690a8333bb008286ae25dc8a24989dbb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalized.hasPrefix(\u0022a/\u0022) || normalized.hasPrefix(\u0022b/\u0022)\u0060 appears character-identically in 3 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift, CodexMobile/CodexMobile/Services/CodexService\u002BMessages.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnPerFileDiffParser.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1675}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7549ff8bc6f1fed1edd7f5e06700508c3ec128906e91b7f5c2a5ebb517601b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalizedKind.contains(\u0022add\u0022) || normalizedKind.contains(\u0022create\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4410}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b49f4f95840325c447e9f3ecd881a8e8f65c709c2c74aa8cf76736ffb22e9ac"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalizedKind.contains(\u0022delete\u0022) || normalizedKind.contains(\u0022remove\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4422}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf9f19899e1699c49d6c939a2b042acc5e233224827163c6ec4745ad41f81c1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalizedStatus.contains(\u0022fail\u0022) || normalizedStatus.contains(\u0022error\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb01fa2656340ef844a3e615d910a484bbb6cc87c9106a16fcd52f4de16a584b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060nsError.domain == NSURLErrorDomain \u0026\u0026 nsError.code == NSURLErrorCancelled\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift, CodexMobile/CodexMobile/Views/Home/ContentViewModel.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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":2278}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e1c20b21be277c493a7b3bd5de9dedefda8347ce7665dd48b3b3f67ae430b3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rpcError.code != -32600 \u0026\u0026 rpcError.code != -32602\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift, CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecabfaa2a8d1c329501f5c6c7d8248bb16da63e583cc1b8e8d2b35dffc47111e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rpcError.code == -32600 || rpcError.code == -32602\u0060 appears character-identically in 3 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift, CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeConfig.swift, CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.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":"CodexMobile/CodexMobile/Services/CodexService\u002BRuntimeCompatibility.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"e100b5d88c7ffd37c58cdaa03ba7644de60f751d3fa1163b76707dc6fc25c0ba"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rpcError.code == -32600 || rpcError.code == -32602 || rpcError.code == -32000\u0060 appears character-identically in 3 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift, CodexMobile/CodexMobile/Services/CodexService\u002BThreadForkCompatibility.swift, CodexMobile/CodexMobile/Services/CodexService\u002BVoiceCompatibility.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":"CodexMobile/CodexMobile/Services/CodexService\u002BAccount.swift"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"fab688e922c267c5f476aec7026bee0057b9513b9b6539266459a90f1bab55a8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060second == $0 || second.hasSuffix(\u0022/\\($0)\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3988}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e298923bc78a77cf0b50dbbdd62020a82ffafa559b8b6506819c45681f57ec"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060shell == $0 || shell.hasSuffix(\u0022/\\($0)\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":3994}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd96f6396cdd7b304e1b23785ff54fa63bb03691e97cac8a782b81db77f92193"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060subscriptions.isPurchasing || subscriptions.isRestoring\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift, CodexMobile/CodexMobile/Views/Settings/SettingsSubscriptionCard.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":"CodexMobile/CodexMobile/Views/Payments/RevenueCatPaywallView.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"f170bd4b972df7b3749564cb969a8eb4266022470a49f6e23d62c19f733d1c77"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060thread.syncState == .live \u0026\u0026 comparableProjectPath(thread.normalizedProjectPath) == projectPath\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift, CodexMobile/CodexMobile/Views/Turn/Git/TurnWorktreeRouting.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":"CodexMobile/CodexMobile/Services/Coordination/WorktreeFlowCoordinator.swift"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"b119f59917b71c581638e74e1042105aeabd38f574f441aefbe36573f66ed2ce"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060token == \u0022-c\u0022 || token == \u0022-lc\u0022 || token == \u0022-cl\u0022 || token == \u0022-ic\u0022 || token == \u0022-ci\u0022\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift, CodexMobile/CodexMobile/Services/CodexService\u002BIncomingSupport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BHistory.swift"},"region":{"startLine":4001}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed81352616d134c2b6af9b9a761e6ff852aded282715729c2f8c69247d6bed93"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060totals.additions \u003E 0 || totals.deletions \u003E 0\u0060 appears character-identically in 3 files \u2014 CodexMobile/CodexMobile/Views/Sidebar/SidebarActivityRowContent.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarActivityRowContent.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14cabd41295cd5e463f49dad3c72bfa60b016461241d47cb85bb8a8490b4382"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.hasPrefix(\u0022a/\u0022) || trimmed.hasPrefix(\u0022b/\u0022)\u0060 appears character-identically in 3 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeBlockPresentation.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnFileChangeSummaryParser.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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":3295}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a9627651f6490b79068c8d2339931ab5192f7af74b4fd63a443023ed75df2f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value.hasPrefix(\u0022a/\u0022) || value.hasPrefix(\u0022b/\u0022)\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Models/AIChangeSetModels.swift, CodexMobile/CodexMobile/Views/Turn/Diff/TurnDiffSheet.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":"CodexMobile/CodexMobile/Models/AIChangeSetModels.swift"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"9525d57d3cbc0c7f040208b3497cd03b32fa5c557cffda80ce819d4c61492995"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060webSocketConnection != nil || webSocketTask != nil\u0060 appears character-identically in 2 files \u2014 CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift, CodexMobile/CodexMobile/Services/CodexService\u002BTransport.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":"CodexMobile/CodexMobile/Services/CodexService\u002BSync.swift"},"region":{"startLine":1281}}}],"partialFingerprints":{"codehealthFindingId/v1":"3164532366aace3716889b333731bde863ed9d132ed4e070077c93eaeb15df84"}},{"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":"relay/push-service.js"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ffe9a2e1cf6643198318eeac6ccf3fb86fa0b0438e336d3c1bbcdcbbac05b6"}},{"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":"phodex-bridge/src/bootstrap-codex-cli.js"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"94caddb1ecfdedb50005a25975e6f511725a278ac59e8c4d9e6b0cdb87150ced"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":1661}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1719cb5aeba14dda53fbbea8c2d058afc4fef6aa063d748473ce83281cce26"}},{"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":"phodex-bridge/src/bridge.js"},"region":{"startLine":2648}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1c26b4940975f4a58f8787a0e88eae620911f9f972c0b2579780601f5d18a5"}},{"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":"phodex-bridge/src/codex-desktop-app.js"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4d6eda38be54e51c8f0783fe541671bce8d98f9138419341cea42fbb7f403a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-runtime-settings.js"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"394530a0d353431bdb349491d210dbf3ca9e628182e4158b5333d4b0d7e45a57"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/codex-runtime-settings.js"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4fe3028f829e55298b842f448f0b26279a3c9aea342f82805c255bd3c26d42e"}},{"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":"phodex-bridge/src/daemon-state.js"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c56dd8c6c57e8002dbf8e5b739587f88dbd09df54021ca296d41bc57e0fed1d"}},{"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":"phodex-bridge/src/daemon-state.js"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"39997a9d4dc247ab2fe37f02a0c7276aa8f472eb6c20c49610dc3c62ec7f4d15"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":1438}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45acfa0f2b982349fb3585ca9f8a58ebc5ff59140c71dfdf9e450a3754a2ede"}},{"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":"phodex-bridge/src/desktop-ipc-action-follower.js"},"region":{"startLine":4161}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6b64afb6fa8cec979e066f15aa014c8704823961f2a1b4a61affade99a383d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6a8350543d7bd3221e21c70507aa4f5450496c2fa783d00ba4b9dc0543612d"}},{"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":"phodex-bridge/src/desktop-ipc-live-owner.js"},"region":{"startLine":1513}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e604a1f2ee5beadf1960daa3f093957c54f26e15bff93c23dd30bdf8379a5d"}},{"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":"phodex-bridge/src/desktop-ipc-owner-transport.js"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4ee8b4bf5049bac21378b2bb5b0f310f3b8e586de67bfe88f94902559aef63d"}},{"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":"phodex-bridge/src/desktop-ipc-shared.js"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b808a45c048d876dcfdad82bc15a926916882b61198711122169f3ba6bf8c8"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd89a58132df57542bbb5263cd9fbb5af89af296ad57dbffdb8a56a320968004"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d6efd79e1fa45bcabe811a4ae00e7a3495db9da82cb855482df4b013df3bee"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3255586c78b36bc18048a5c5c1397e6fe4a6d222e6ecca14009a836a867aafb"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1986}}}],"partialFingerprints":{"codehealthFindingId/v1":"591a43caa8c9b4d8100c7d59d4a9ef9d265bfbb6c1f9c8398eba37091b40e4d8"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":1995}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bbbcbfa4c4d5431e2bfd4b5d35bda40461480d4a1827e8388c3f085cd606598"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2001}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d72eb99f0e4d3e69ea498740c0d8d95e65ba42086ba0e3dc33ef1f67b10575f"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2009}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b4e62bb6f945a6f1368f126fbe57f54571e70b3d0e3e029873a9709293a626"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d78a8c9feb58f99afa0223c024a02888a1249dc0239e4cfb493b0700335353"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2111}}}],"partialFingerprints":{"codehealthFindingId/v1":"beeb21d58641569a6e263e92f27945031111581ecda416f917e3a5f837ea87dd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2123}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4a1851846f2be922f71a9e3c6214543b73cec68f4df3f691fcb9bd1a29c37b"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2133}}}],"partialFingerprints":{"codehealthFindingId/v1":"f33961fdfa10300aeb91281f691f6a3fdad1af2db0512473b5d0d61470795c79"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2583}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ecaedf42b946b87f88a85ef24344a1d6208edc6ac8eb7534692f0c00ed4f861"}},{"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":"phodex-bridge/src/git-handler.js"},"region":{"startLine":2900}}}],"partialFingerprints":{"codehealthFindingId/v1":"a16389ca150ab01d0cdb9b6e8392362604961617570831f09b62c02e6c27bb63"}},{"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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09f5f0215843eaece7955faa729c78fab0093192e5c5ffa5a77c85148ed9219"}},{"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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef327f65d29aa9440471f7071b5231de2be496b4191e52394a781a5a32f7df93"}},{"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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":785}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4a67f31893422e2b53226f163771691e41faea0d434528389e138fd3b82e792"}},{"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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"94edc2b22c63d1811004dbcf533f293ae2a3ca1e599234d8b8a084ae7d8db1bf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"e485ed2bce7c856d6782133e10244672749ba0ca30a7c903b1621d681172dcae"}},{"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":"phodex-bridge/src/opencode-runtime.js"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6207175a0af972203a625e4bb74b64f6b6ea2f617cb17df356bbe3ce8204cbe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/project-handler.js"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5bde43b65bacf7974882d67b9857180e0fcb4350295cf9bd7767dc5e07eb95a"}},{"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":"phodex-bridge/src/push-notification-completion-dedupe.js"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"687375a2a7e6d6108ca828fabfbf46b35aedc73935921e67739b6abd501ff031"}},{"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":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1853ec80d6b7e786829477fcc4f191c7ec2a7647c5440dc91fae4fbe6e1427"}},{"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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38dd8ee8a818eedd16e020658bae5109d41dd85f5a87142bf0aa785f1d7942a"}},{"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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a33b94f83b025c050430da96b2711a6b5b4d317a52cc066b81a82e3963744c"}},{"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":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"1321d78e72c144148f2d49e7907cf4b36d4aa274ce10977fbe87e683e136b97a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"4964d04c75d38e23d307cff8e7bbeaabfc03df4f76d1a6138ad2ec30f9caf1d2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f3a82263d34e2233e2389a1356e444509b4a7ba805abedc6457412a574dd48"}},{"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":"phodex-bridge/src/thread-list-provenance.js"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b166bb49801433ddbba805a49c408ad4441c215e64ac5074844ce242e53a137"}},{"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":"phodex-bridge/src/thread-runtime-settings-store.js"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa31fa36902d0f255ff759d3dbfaa89494d06889d21834081130695804c2bb5a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a92d498e9447bad05e08d0306d31627dbda34fe3ec5b7117c6fa72029b25b45"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/voice-handler.js"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"76deb44af2a578b7255d6486c74d4c11484b33884294617f826b2429df3464f6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-checkpoints.js"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bff691b6641b29234b10a7e20e65e01d0b5472177d5962dcf27eca3750044e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cad6e1cdd60e8e337d8604ded9eda416b3667de8227262f11c4f5d5f94ca731"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"c961fa423b2ea2755016be1ab08e9092c3bf5dcf298d7d5c69af05684613ab40"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"479895814845ba7a17268a2be204260e129d27752c589bb971792f2fdac68509"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f605f34c8e74e3607af06fbb7727953c4333b7dd8703dbf25babf84fb33212"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1152}}}],"partialFingerprints":{"codehealthFindingId/v1":"25422afa9f9874b2722473b0cc58f781b35decfc4dc1b67909af403508f5b337"}},{"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":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fbde5c2867b9ee97efcdb024e1ca9538323eb34cf935d84616c9ce84f04f0a8"}},{"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":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1326}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e3f9b17cafda7887f239314d56cadfe3c5129db0cd6f33f7e03dd9ba834426"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel\u002BGitBranchWorktree.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4466ad1630c67419be5419d9f488e54c3e20a4de7e59440f3244939f056fa15"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b2c972abf6e98d801a6879c8ab661adeb62210a21be05182e02b9496396cd8"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"7420a091232ea6f55b93c62e037964d25fa97682edb8c334f63ee01a477b348b"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c034d5400517dfac932ca8478d71ae974436df9b9c6451ae45ef619b84b770"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"38e7784d62a6001af4858a4b177809cf3d024fd5a9581ad0beb192587ee16f29"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"b85b06c319912aed83f6cd82e76af43f807e64531e0ad0224b5d82f1d643a58f"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":2256}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6bdd235a39a4fd68b82d5cc02dca5cb3de9db5713c11c767ea82e46f6a93023"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Core/TurnViewModel.swift"},"region":{"startLine":3630}}}],"partialFingerprints":{"codehealthFindingId/v1":"db2a83a3c7132021ee6b7eea22ce83b59451e6480ba7635153dacfc7d310608d"}},{"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":"CodexMobile/CodexMobile/Views/Turn/Composer/TurnComposerSecondaryBar.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"d428f8977a359a7d37d69fefdc0ba7ebd5f601180861d26f85ae1530ff2e2d0e"}},{"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":"CodexMobile/CodexMobile/Views/Terminal/GhosttyTerminalView.swift"},"region":{"startLine":1752}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f1729e665368b262ab34f5eec2c842571d5ba5102fdae0493ba2eb3ddafdd86"}},{"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":"CodexMobile/CodexMobile/Views/Sidebar/SidebarActivityListView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1c926a8716a72b08a689b5d5c752a4e669428749cd3a79f493afcad8c831c5"}},{"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":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb13e26bfcc737baff5ecb3a7cf8f2c92f9200ac077c16d592d774237dbd666f"}},{"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":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae49d7ac47251d2a01d74da39443294ad92718f5d5470417c65fb94427ca129"}},{"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":"CodexMobile/CodexMobile/Services/AIChangeSetPersistence.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97131d477696ac22fdfe3c3e76350c808b68c642a2fa74416fd404ad87dc183"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BConnection.swift"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"553471302fe268c00ca75278f130ebadc853126b258d3be0655549a3757d5075"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c59c03686a1df815d40df55c0baffad52b966bdc83bc62dca356adcd62b73be"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BIncoming.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"937fbbdd5fde586ba9732dc6a4a7f45b7e86f15d5e1d42ccdf9ec3beeca52c70"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BSecureTransport.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7727f65a2cc47a3f86aef592ea459966d5f9565b90c157166ec448d87c82e3"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadProjectRouting.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d446ad12f48ee760b2bf26e35e3ecf537e7785b55218033eef889917e07651"}},{"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":"CodexMobile/CodexMobile/Services/CodexService\u002BThreadsTurns.swift"},"region":{"startLine":1924}}}],"partialFingerprints":{"codehealthFindingId/v1":"3829e5ae01d1b556d8d4fa3dca2f5ee367242a42a71caab7fd481fd3ca5d00a1"}},{"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":"CodexMobile/CodexMobile/Services/RemodexDisplayIslandCoordinator.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92658b7a43c3a42b2aaffb29f40df60e878eeccafc76622c704754829adeb36"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060nvmExecutableCandidates\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":"CodexMobile/RemodexMenuBar/BridgeControlService.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"219c83f65f299f3ea94db0e2a7676e0c389b5ce0830ff85b16ffb101fd103aa3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060markdownLinkTargets\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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c1c1e60ca2f2d0042d424bee63b4b24d8eeb86a9fd27105a2505f652c8f088"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060absoluteImagePathMatches\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":"CodexMobile/CodexMobile/Views/Turn/Messages/CommandExecutionViews.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4bd9d2e5e1e2c3cf2265cbef52663f328ebb3daa7c270d5c0c58cb9fe69cf9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060findStagedTargetedFiles\u0060 swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/workspace-handler.js"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"8903c3c836e8e33f4a1fd5526519680c63a926974e29ac8443c49cc8ca67228c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060deleteKeychainStateString\u0060 swallows every exception into \u0060return false\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a28621595bcd6a3e9aba5b4f5cbb980b8b20d9de238bd49d33600da1bc8552e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060deleteCanonicalFileState\u0060 swallows every exception into \u0060return false\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-device-state.js"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"195f4ceb2283e09f0f9be59fee25988d5a4d5991903360a6205a9a58c78983ea"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060verifyTranscript\u0060 swallows every exception into \u0060return false\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/secure-transport.js"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5e4f5b8adcea8c3ad82f1cd166ad285d603483b50e746a37c9e839766c473e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readRecentSessionJsonlCwd\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/session-jsonl-history.js"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d287f373f04386634f87b195fd63a1d9c228000f4e56c88cf8a96f11446fea"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readOwningCheckoutRoot\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/worktree-origin.js"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b99aed81709abbad264029b9e53a09f3840b27a3b0715140dfc1a390996d6f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readJsonlThreadCwd\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"phodex-bridge/src/bridge.js"},"region":{"startLine":3912}}}],"partialFingerprints":{"codehealthFindingId/v1":"103ad92a16db9b07481b61c236481bae493c2090b6a026e989c24d36f5511e83"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readRelayRole\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/phodex-backend-relay.mjs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fefc2da2433fa0360240189001183ffdfa6bf77effeccdb40f60ef080587bf"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readAPNsPrivateKey\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/push-service.js"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02810e803f2ceac7623e5827c314fa3962ff1c89076fa2e1ea7fc2ef2f1a11a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readRelayRole\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"68975d074ea5b0f9c79037e592234da28217dc6878f733b8a9a9344a3c9f9d55"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060verifyTrustedSessionResolveSignature\u0060 swallows every exception into \u0060return false\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/relay.js"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fae0fa8220a6f0a8633b9d45edf7ea08556f0b189ff684d1944dac5abb2509c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060safePathname\u0060 swallows every exception into \u0060return \u0022/\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/server.js"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"875e2280ab38f2251d4b43d39e720cf2199680ddc7bcb1bce38b65ee546b383d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readUpgradeRole\u0060 swallows every exception into \u0060return \u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"relay/server.js"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbf8df5188d830df06cf91d56f9e77b7e865ffd8b4bf78954d2649542fc63dc"}}],"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-1104","guid":"4c918cb5-b2a6-6c55-9963-a44ee464305e","name":"Use of Unmaintained Third Party Components","shortDescription":{"text":"Use of Unmaintained Third Party Components"},"helpUri":"https://cwe.mitre.org/data/definitions/1104.html"},{"id":"CWE-1333","guid":"11a336ce-63de-c45c-845e-29ca1e8df13d","name":"CWE-1333","shortDescription":{"text":"CWE-1333"},"helpUri":"https://cwe.mitre.org/data/definitions/1333.html"},{"id":"CWE-1352","guid":"5257f322-5cfc-6b52-bedd-0b9a526b4c7d","name":"CWE-1352","shortDescription":{"text":"CWE-1352"},"helpUri":"https://cwe.mitre.org/data/definitions/1352.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-310","guid":"97174724-2e33-8455-b7cd-5c3258d1cb8f","name":"CWE-310","shortDescription":{"text":"CWE-310"},"helpUri":"https://cwe.mitre.org/data/definitions/310.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"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-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-7","guid":"4c4af28d-49e3-2d51-b597-e1396c49658b","name":"Insecure System Configuration","shortDescription":{"text":"Insecure System Configuration"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-07-Insecure-System-Configuration"}]}],"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":17,"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."]}]}