{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"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":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"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":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"DisplayModeController.computeResolutionGroups (cyclomatic 28): DisplayModeController.computeResolutionGroups 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":"Crisp/Views/DisplayModeListView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af0687ef4edbf514be24bc11b2d7e5c3e48ff306f7931ac8d5eee631aa553f4"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispControlCLIModel.matchedRequest (cyclomatic 27): CrispControlCLIModel.matchedRequest 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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"850162f706e01199cad6e0ecd8c97db60cfff2e2c60e0d97cf9cf94915586e42"}},{"ruleId":"D1","level":"warning","message":{"text":"OSDBannerPanel.openGlass (cyclomatic 27): OSDBannerPanel.openGlass has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/OSDBannerPanel.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"43959e2da5b769c6b241bc0ae7d6fb02c9eee5a85880c9edc1d7bc2870adb107"}},{"ruleId":"D1","level":"warning","message":{"text":"PresetService.applyPreset (cyclomatic 23): PresetService.applyPreset 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":"Crisp/Services/PresetService.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7ae62c4d7d2ef0faa53062b21ccc85bf8027104b0431a6d4d60dacc363f1b2d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.swift.top-level code (cyclomatic 23): main.swift.top-level code has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/crispctl/main.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b3dbd95018174551644fc16f9f0014f99e3862982b5a086105d8b3724f0f9a"}},{"ruleId":"D1","level":"warning","message":{"text":"BrightnessSliderView.body (cyclomatic 22): BrightnessSliderView.body 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":"Crisp/Views/BrightnessSliderView.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"7148d0d7871ed3495f0b8049de1b2eac53875b9c27fb74f7e2a89302563fa2e2"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelCanvas.layoutNow (cyclomatic 21): PanelCanvas.layoutNow 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":"Crisp/App/PanelCanvas.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f3eea227d12f6ed092d21444a74f26b2240892425c92b0976478c6ca823f30e"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispControlText.render (cyclomatic 21): CrispControlText.render 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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"23e0fde9dfcbfa2adeb79e4aaf40c51abb88630bbfc8f9737707983621127784"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispControlServer.reply (cyclomatic 21): CrispControlServer.reply 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":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6eff7654fb58924a1879f0ba4946c50246c8ccd6a6b5ee5bae69a804cbb28ae"}},{"ruleId":"D1","level":"warning","message":{"text":"PhysicalDisplayToggleService.restoreStates (cyclomatic 21): PhysicalDisplayToggleService.restoreStates 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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"06702342b92f7ada6939046f9ff1ba9c6c199178a9a9c6d1136a1c90079b9229"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.rebuildBlocksIfNeeded (cyclomatic 20): AppDelegate.rebuildBlocksIfNeeded 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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4aeddcca7f7b09b4594eb2e90958c357accc1ddc68d9acd70db2af53f58fee2"}},{"ruleId":"D1","level":"warning","message":{"text":"ArrangementSnap.snapped (cyclomatic 20): ArrangementSnap.snapped 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":"Crisp/Models/ArrangementSnap.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c348c2f1c7cb54fdd746d87fb1aec059e8a54a35fdc6ec351d7f81210f96555"}},{"ruleId":"D1","level":"warning","message":{"text":"DDCService.buildAVServiceMapByProximity (cyclomatic 20): DDCService.buildAVServiceMapByProximity 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee86f97308cc072f8a56ea958c925978bcbd61f55c73e9583cc50c0d85acc4c"}},{"ruleId":"D1","level":"warning","message":{"text":"EdgeCrossing.target (cyclomatic 19): EdgeCrossing.target has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/EdgeCrossing.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c92381b4b1bcb7c6fa9a65f73f138de56073d6b513e6bf9de3003922bafef95"}},{"ruleId":"D1","level":"warning","message":{"text":"AutoBrightnessService.applyBrightness (cyclomatic 19): AutoBrightnessService.applyBrightness 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":"Crisp/Services/AutoBrightnessService.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f90345a3fd64981dbee115f9a979ab5a2c16c6ef720cd3abc2384db776c92bb"}},{"ruleId":"D1","level":"warning","message":{"text":"DDCService.intelReadSynchronous (cyclomatic 18): DDCService.intelReadSynchronous 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a743ca5df095696f62f6cf4caf299051b159e1915933ee759a1d31f5a57e654"}},{"ruleId":"D1","level":"warning","message":{"text":"PhysicalDisplayToggleService.softReconnect (cyclomatic 18): PhysicalDisplayToggleService.softReconnect 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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a553b0113cf1fa6dc4c1ee9dbd367adc34f931c747f3a1755730cd1aabe8eb3"}},{"ruleId":"D1","level":"warning","message":{"text":"PhysicalDisplayToggleService.restoreIfNoActiveDisplay (cyclomatic 18): PhysicalDisplayToggleService.restoreIfNoActiveDisplay 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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb36306edf282c742bf077023a7b1c3e89777c699333b79930be950417198f6"}},{"ruleId":"D1","level":"warning","message":{"text":"SavePresetForm.body (cyclomatic 18): SavePresetForm.body has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb63c01761466f18079fc3251b62af2edea574263eda8764ccb0b0be8bb55671"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.applicationDidFinishLaunching (cyclomatic 17): AppDelegate.applicationDidFinishLaunching 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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"197153136d0119c8efb08b0ee6bad5dcf8448ce420591228648728c935673e6d"}},{"ruleId":"D1","level":"warning","message":{"text":"PhysicalDisplayToggleService.recoverStrandedSoftReconnect (cyclomatic 17): PhysicalDisplayToggleService.recoverStrandedSoftReconnect 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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"61bc2242f54818adef0218c781326e260999fd70cb4cdf4732d2d47c8edcd26c"}},{"ruleId":"D1","level":"warning","message":{"text":"PresetService.setCapture (cyclomatic 17): PresetService.setCapture has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PresetService.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49a0ae6205f43e22f3764a3c040bb0c7bb8778d718097df03bd564c87428161"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.showPanel (cyclomatic 16): AppDelegate.showPanel 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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"60708d20fca6718e50226a7ba254fc939e7ef5fefb98b9989bf7667fdba639f9"}},{"ruleId":"D1","level":"warning","message":{"text":"DDCServiceMatcher.match (cyclomatic 16): DDCServiceMatcher.match 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":"Crisp/Models/DDCServiceMatcher.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b8e63bd5922834b14ab38ace7452f3cb0a23359db6ee1cbf4f1d1c4f48bef12"}},{"ruleId":"D1","level":"warning","message":{"text":"BrightnessService.refreshBrightness (cyclomatic 16): BrightnessService.refreshBrightness 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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7cbccba492fd10ef602e432c9fe6cd55251befa28eac5d00530724b1423463e"}},{"ruleId":"D1","level":"warning","message":{"text":"DDCService.framebufferService (cyclomatic 16): DDCService.framebufferService 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f30e2030e99654246599703f55ce5529be2c47a9273f91fd81f39d49c4e7e4c"}},{"ruleId":"D1","level":"warning","message":{"text":"ResolutionService.restoreModeAfterWakeIfNeeded (cyclomatic 16): ResolutionService.restoreModeAfterWakeIfNeeded 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":"Crisp/Services/ResolutionService.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a762d99f6945adac1816da8dbcf33730f50d3d6bb93f364ad64d67ff63cba75"}},{"ruleId":"D2","level":"warning","message":{"text":"PresetService.applyPreset (cognitive 40): PresetService.applyPreset has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 7, match/switch 1 (3 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PresetService.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"a932941fc3e13342426414edccc8ef0d9388efff017533820265f0692a46bf7a"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessSliderView.body (cognitive 35): BrightnessSliderView.body has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 7 (15 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/BrightnessSliderView.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c925ea1f74e1e64b6329ba1b24d02509575f9ec72cc7ade940254d2b1748d11a"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessService.refreshBrightness (cognitive 33): BrightnessService.refreshBrightness has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"969fe0cfeb680294211eed090c1dd9c00f7a608fdfce907deca9e640cc6bb23b"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCService.buildAVServiceMapByProximity (cognitive 31): DDCService.buildAVServiceMapByProximity has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 4 (5 pts), ternaries 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/DDCService.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a0de3cc684f7952be56ae7bfdef163930408d80fae17060b38627bacca7270d"}},{"ruleId":"D2","level":"warning","message":{"text":"PhysicalDisplayToggleService.restoreStates (cognitive 31): PhysicalDisplayToggleService.restoreStates has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 8 (11 pts), boolean chains 6, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ad466107803f653cf09f0adc7b38044d5c6c448138b2fbb6f2aa58979b9a3d"}},{"ruleId":"D2","level":"warning","message":{"text":"OSDBannerPanel.openGlass (cognitive 29): OSDBannerPanel.openGlass has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 19, if/else 5 (8 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/OSDBannerPanel.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a14af1caceab6a782badd6898b4c7ea22ae9453e6d84d8e9874b4cb8f61649"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispControlCLIModel.matchedRequest (cognitive 28): CrispControlCLIModel.matchedRequest has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 9, match/switch 2 (4 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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"a85844c5d3745b247f94d0fbb34db354f8f53f27991871a93995f068ab515a36"}},{"ruleId":"D2","level":"warning","message":{"text":"PhysicalDisplayToggleService.softReconnect (cognitive 27): PhysicalDisplayToggleService.softReconnect has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1d79e50f07b9c5e3b8134a7361171df22ab99a17794b0a69f21c3efe2a3c26"}},{"ruleId":"D2","level":"warning","message":{"text":"DisplayModeController.computeResolutionGroups (cognitive 27): DisplayModeController.computeResolutionGroups has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 18, if/else 8, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/DisplayModeListView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d09c6026a8138616d6b81a13db59685a61bfcea5a6b3f11c330d2ecaaf4479"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelCanvas.layoutNow (cognitive 26): PanelCanvas.layoutNow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/App/PanelCanvas.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ee5eb231a1e1cb0bec23cc7a9278540586a232ba1703dfffa912c70b3627e9"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispControlServer.reply (cognitive 25): CrispControlServer.reply has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"3effaf7ddbc524d1beab2b14f1fa30853be8f5d3f932815c72efcc23a97e20f3"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCService.intelReadSynchronous (cognitive 25): DDCService.intelReadSynchronous has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19dc75b90ac698c365c2af2f50ea530a6afc9eeb140d098bd5659f77718cab2"}},{"ruleId":"D2","level":"warning","message":{"text":"ArrangementSnap.snapped (cognitive 24): ArrangementSnap.snapped has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 6 (7 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/ArrangementSnap.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"057798f3276f89a85ee665630c41c32cc56e8793f90d7fda52ef485f83789ebd"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoBrightnessService.applyBrightness (cognitive 24): AutoBrightnessService.applyBrightness has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 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":"Crisp/Services/AutoBrightnessService.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da63b238aa8a712982521173056ec61bd6b58d8473c8efb2b171980f7143896"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessBoostService.setEnabled (cognitive 24): BrightnessBoostService.setEnabled has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5 (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":"Crisp/Services/BrightnessBoostService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6624619a72bb9f89ce2d41326bcf1434501634552ec194358cd8e03dffa5a8d"}},{"ruleId":"D2","level":"warning","message":{"text":"PhysicalDisplayToggleService.recoverStrandedSoftReconnect (cognitive 24): PhysicalDisplayToggleService.recoverStrandedSoftReconnect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9009e94ed51a457702a41edd40a71f13410ef6ee1185c25a02af7368491fc5a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.swift.top-level code (cognitive 24): main.swift.top-level code has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 4 (8 pts), error handling 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/crispctl/main.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"5764f5d03a47580bf45b961cff543f2282324c1d1b69b559d74b486d19f067c3"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.showPanel (cognitive 23): AppDelegate.showPanel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33ffd729e169876121340ce307cefdb8c27165d7b53342b275113256aae42b3"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessService.setBrightnessSmooth (cognitive 23): BrightnessService.setBrightnessSmooth has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba94930c941fc5ec8c42f17520b65a2e809f9e5f131433f24cfd4f30538c356"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCService.framebufferService (cognitive 23): DDCService.framebufferService has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0715fb250b40098694cf2fe17e76835c6464cab10826058a2a3c4a885a9cd5"}},{"ruleId":"D2","level":"warning","message":{"text":"PhysicalDisplayToggleService.restoreIfNoActiveDisplay (cognitive 23): PhysicalDisplayToggleService.restoreIfNoActiveDisplay has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad9e1534ab957673f9ca2161a428184a85e3c278a7ac1078b93aed1175537829"}},{"ruleId":"D2","level":"warning","message":{"text":"CombinedBrightnessView.body (cognitive 23): CombinedBrightnessView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 4 (8 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/BrightnessSliderView.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"d681ef3741729c1851a95e143be80013f24a9721cc5de401da966fc1b682a94d"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsView.body (cognitive 23): SettingsView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/MenuBarView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"435bbee5cde38390db70406c45a1f1be96364dabf9cb8cc87bbd3db702dfd0c7"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCInputSource.values (cognitive 22): DDCInputSource.values has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/DDCInputSource.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfa90bb69133561a0b2e6ed66ccc999612af5af195fa884b7352568555f27c2"}},{"ruleId":"D2","level":"warning","message":{"text":"EdgeCrossing.target (cognitive 22): EdgeCrossing.target has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 10, loops 1 (nesting depth added 4). Of this number, 20 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/EdgeCrossing.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b1de4e9e5b54e59d095a83ad0729ba52f4f33a8320e207aaee7150d0c8cfb6"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.applicationDidFinishLaunching (cognitive 21): AppDelegate.applicationDidFinishLaunching has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/App/AppDelegate.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f91872c52290c3dcba0713b68a34149bf502e9fad3ab7d49910be85365e014d"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessBoostService.startHeadroomPollIfNeeded (cognitive 20): BrightnessBoostService.startHeadroomPollIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessBoostService.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"02049e05c34476d3b10a569261313e5fa51263fe6d287874e1c753e4294cf788"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessService.getInternalBrightness (cognitive 20): BrightnessService.getInternalBrightness has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, 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. This shape REPEATS in the file: one other method here (BrightnessService.setInternalBrightness) 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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0451b6670eb4f871c64d4f2c5b3d2e98ab8f068c1c5252d807ca0a58b30a07f"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessService.setInternalBrightness (cognitive 20): BrightnessService.setInternalBrightness has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, 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. This shape REPEATS in the file: one other method here (BrightnessService.getInternalBrightness) 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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"21d0088a90fdaa5e754cfeea4cac6a1168b2401ea7f87168c3752e70c3377b8f"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCService.readBatchVCPCodes (cognitive 20): DDCService.readBatchVCPCodes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/DDCService.swift"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ef7d0a8dc7dc2ca50b8768cd73edbf00a4931cabd70e7bb52e86df5a5d8352"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.rebuildBlocksIfNeeded (cognitive 19): AppDelegate.rebuildBlocksIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 3, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/App/AppDelegate.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0d7ff3cfdca686998d8e2288806fb8e63815e206b7312c469e4175cbecfb0f"}},{"ruleId":"D2","level":"warning","message":{"text":"DDCServiceMatcher.match (cognitive 19): DDCServiceMatcher.match has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (7 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":"Crisp/Models/DDCServiceMatcher.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee530f107675c7b6c5212e298fc3e5be921e7c10408668738013c78845781764"}},{"ruleId":"D2","level":"warning","message":{"text":"SavePresetForm.body (cognitive 19): SavePresetForm.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, ternaries 5 (7 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfef1fc1efd1adba00396fcae89e8d15a477f997c6ad177eafdf91ae9944a38f"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispControlText.render (cognitive 18): CrispControlText.render has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"2952451c49511a579857e2d2715db975b73609eb40ed94fb4af13663ed57a3b7"}},{"ruleId":"D2","level":"warning","message":{"text":"MirroredModeService.setLooksLike (cognitive 18): MirroredModeService.setLooksLike has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), 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":"Crisp/Services/MirroredModeService.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e21b17288a62e76a735a5f65695a4ff8ad6291ebbe1bb7733cfcdc05a860af7"}},{"ruleId":"D2","level":"warning","message":{"text":"VirtualDisplayService.create (cognitive 18): VirtualDisplayService.create has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (7 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/VirtualDisplayService.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32c2c2f1518cad3854b597387b1e52569800434e14b7663e0a47d99fedb1563"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispControlModel.handleImage (cognitive 17): CrispControlModel.handleImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (3 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fb7b6ea2c9c195762368e0b8eeceb5f447e5798e105beffaab296049b1e30b"}},{"ruleId":"D2","level":"warning","message":{"text":"BrightnessKeyService.handleEventFromCallback (cognitive 17): BrightnessKeyService.handleEventFromCallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Crisp/Services/BrightnessKeyService.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"0450302f4aad2638c509589852704856e8522cdd237e90cefaf2ee0c8a3c4264"}},{"ruleId":"D2","level":"warning","message":{"text":"ColorProfileService.currentProfileURL (cognitive 17): ColorProfileService.currentProfileURL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/ColorProfileService.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"3398442eaded30592e2cf685162b908c93626fae4034f5904e76bd62e08ff89e"}},{"ruleId":"D2","level":"warning","message":{"text":"OSDBannerPanel.reveal (cognitive 17): OSDBannerPanel.reveal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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":"Crisp/Services/OSDBannerPanel.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"41eb1b53e010f5088a00bf6802a112d5836710d650ffaf22d1355011129c19e6"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelCanvas.animateToTargets (cognitive 16): PanelCanvas.animateToTargets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (4 pts), boolean chains 3, 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":"Crisp/App/PanelCanvas.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d6680fa8cfcc82797d46d878d5d382f73dc933adb4c1c118ff2a5a0c69ee9e"}},{"ruleId":"D2","level":"warning","message":{"text":"ColorProfileService.enumerateProfiles (cognitive 16): ColorProfileService.enumerateProfiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 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":"Crisp/Services/ColorProfileService.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee4689e94dc037b700ee33b665bfbd544b9452b268da2508a69e360650673c9"}},{"ruleId":"D2","level":"warning","message":{"text":"OSDBannerService.makePanel (cognitive 16): OSDBannerService.makePanel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, 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":"Crisp/Services/OSDBannerService.swift"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"09db80605da4f8f08854ca6a267d84d7d48247e7903f57d607d93567f79ebaf9"}},{"ruleId":"D2","level":"warning","message":{"text":"VirtualDisplayService.applyNativeResolution (cognitive 16): VirtualDisplayService.applyNativeResolution has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 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":"Crisp/Services/VirtualDisplayService.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b56a946ca9f4fdc768463ce1095f2b214b8e528b4313fe4acdbc954317ab0db"}},{"ruleId":"D2","level":"warning","message":{"text":"ArrangementView.thumbnails (cognitive 16): ArrangementView.thumbnails has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 5, boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/ArrangementView.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bca8224cf1027eed9bab9ca422dd898034e983f52ad186b454d3dc408c81fe5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Models/CrispControlModel.swift: FileTooLong \u2014 936 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 436 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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f0e55568463d6d183874ab2cce5c60a3fb64252425fc51422f1d99e0d0f17c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PhysicalDisplayToggleService: TooManyMethods \u2014 52 methods. The bar is 30 methods; this is 22 over it, 1.73\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e89dfd91d90125564944d25cc6b686aae5d5d8f6e2dfcc7b8b67e7e5a94fb74"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DDCService: ClassTooLong \u2014 579 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 179 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"6019a9013be66cb3ee2141fbd968dd1c9cf7234f405d48d9c08eddfb819a8479"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AppDelegate: ClassTooLong \u2014 563 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 163 over it, 1.41\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/App/AppDelegate.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"315e419870fb7d92711b7df6e3e8f7bc308c0bd6e427f1052af52e77cc65b26b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsView.body: MethodTooLong \u2014 body 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":"Crisp/Views/MenuBarView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"132f735659cb4ca097a2f5c7349f5ca0fa6e5657b4759a77ad8739437d52bc7f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PhysicalDisplayToggleService: ClassTooLong \u2014 555 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 155 over it, 1.39\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71485cd92198c21e9431f28fd50f2000fda8577365b757db0fc307c1542b7af"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BrightnessService: ClassTooLong \u2014 547 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 147 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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a06e1a41f04a747078b5da01bae14dfb0d8d2fa627dcb734fb3bb47ea64291"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: App/AppDelegate.swift: FileTooLong \u2014 673 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: AppDelegate (18-1002). The bar is 500 significant lines; this is 173 over it, 1.35\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/App/AppDelegate.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be28e58eea3994956c8da7d3ae6dcc22a346d51640ea9e71c320acf3e20d1222"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SavePresetForm.body: MethodTooLong \u2014 body runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e7e0d04c176e2d305affc9681db2f816b79a37e6c63306b92b10bd7b41f61b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/BrightnessService.swift: FileTooLong \u2014 669 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: BrightnessService (174-1134). The bar is 500 significant lines; this is 169 over it, 1.34\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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"078d8fc813196ce91ae804ad4e8bc17480d3aad48a866434ca5fd983d535ebe0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrightnessService: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a5a48a76f36958cfd7a67c490276ae586ddb06a09576f4724744de7a9223f1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AppDelegate.rebuildBlocksIfNeeded: MethodTooLong \u2014 rebuildBlocksIfNeeded 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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c7d309729f138c94b19ddf31e0bf1e420ef8f741d9e87693155a699453a348b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/PhysicalDisplayToggleService.swift: FileTooLong \u2014 605 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: PhysicalDisplayToggleService (14-1031). The bar is 500 significant lines; this is 105 over it, 1.21\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b33ec13e8fbb359807f14dce974cbf22fd6ae65ed713913bff7e11f54fc1455b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/DDCService.swift: FileTooLong \u2014 598 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DDCService (32-958). The bar is 500 significant lines; this is 98 over it, 1.20\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/DDCService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"682238e17c8ce3dfae076571075ec7a15c66c0f48786350b7d5fd506676eaed6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/OSDBannerService.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":"Crisp/Services/OSDBannerService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"906f3bfbfcef75299e0d6b6e881770954f0d2cdd7e1c6e6dcbf8afcf18c1d49c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/DisplayModeListView.swift: FileTooLong \u2014 563 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 63 over it, 1.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/DisplayModeListView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"743c191b485ab2e3a75e9b10ca99538c93c9ef50cac77fb54f2f027e5c329238"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DDCService: 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e714dee0d9836c747aa7c0872f54576a4b91a65186fd158c0a636f5215e67816"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/MenuBarView.swift: FileTooLong \u2014 516 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 16 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/MenuBarView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f85ba1ef06039dac1df30e22c124d36edf52aa18b2f2fcf464b061b7b1f2dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): Crisp/Models/CrispControlModel.swift:415-462 | Crisp/Models/CrispControlModel.swift:466-490 | Crisp/Models/CrispControlModel.swift:494-514 | Crisp/Models/CrispControlModel.swift:516-538 | Crisp/Models/CrispControlModel.swift:542-573 | Crisp/Models/CrispControlModel.swift:634-663 | Crisp/Models/CrispControlModel.swift:665-705 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6bf19fe184c2896abe9aed0bc38b66591da1d4a1308456033898a4a52aa45bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Crisp/Services/DDCService.swift:105-212 | scripts/ddc-probe.swift:36-121 | scripts/ddc-stress-probe.swift:34-117 | scripts/ddc-write-probe.swift:22-111 \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":"Crisp/Services/DDCService.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5525343381e01e0c1726470ede451c8278f2194555ed8caf4389d403fee80ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Crisp/Services/DDCService.swift:416-431 | scripts/ddc-probe.swift:28-33 | scripts/ddc-stress-probe.swift:26-31 | scripts/ddc-write-probe.swift:38-43 \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":"Crisp/Services/DDCService.swift"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b23f391939c8477ead3f300aa8fe0ac5b5030396ccd2a14e8e32f13d74d4dbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Crisp/Services/EDROverlayManager.swift:80-140 | scripts/edr-spike.swift:21-108 | scripts/edr-spike2.swift:11-111 | scripts/edr-spike3.swift:10-105 \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":"Crisp/Services/EDROverlayManager.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c283edc1c4ed161ea4d45024091358db4f7fc463a710a698c514308064eb73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): Crisp/Services/BrightnessService.swift:1021-1077 | Crisp/Services/BrightnessService.swift:1079-1133 \u2014 These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30c14e8b227fe93a8eb276b4f0081c751e70d8164a72e5298ce02f740e978bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Crisp/Services/GammaService.swift:288-317 | Crisp/Services/GammaService.swift:420-455 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/GammaService.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"392f879c809eff41404105872e3671667eb44783c82527e54c750611c3fbfb12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Crisp/Views/PanelBlocks.swift:186-206 | Crisp/Views/PanelBlocks.swift:221-249 \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":"Crisp/Views/PanelBlocks.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7371a15635640a435631285bc0d408d339edc149712657f81cd47e42193bad4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Crisp/Views/SystemAutoBrightnessView.swift:50-76 | Crisp/Views/VolumeOverrideView.swift:13-34 \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":"Crisp/Views/SystemAutoBrightnessView.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d5bc5ed4dfbf093e0d71943e3f6dc92992476765320da18491eaa0d45eabaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Crisp/Models/CombinedBrightnessMath.swift:18-34 | Crisp/Models/CombinedBrightnessMath.swift:36-51 \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":"Crisp/Models/CombinedBrightnessMath.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e42240e365ef27604f94279879b8c3ac11a8d1ea7e9e43d1d7d3e067d392fd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Crisp/Services/PhysicalDisplayToggleService.swift:1048-1058 | Crisp/Services/PhysicalDisplayToggleService.swift:1062-1075 \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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e1add81013e4a283131ebba04e24ff0cab024db79026fc31bfe7d5afc2dddb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Crisp/Services/CrispControlServer.swift:471-483 | Sources/crispctl/main.swift:61-75 \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":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8f92501bec00e59f35ec8d7ffedb33671bfd740affbea3dbd0f36817fc68e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Crisp/Services/PhysicalDisplayToggleService.swift:156-162 | Crisp/Services/ResolutionService.swift:50-56 \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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0be0901b0915f631968a498a5600068299fc6342b8349a984772717a22e2c7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Crisp/Services/MirrorService.swift:27-45 | Crisp/Services/MirrorService.swift:68-82 \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":"Crisp/Services/MirrorService.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb23b7db05b794944ed7ec04a192dce946d2f12bb437eebde4b1dc80fa8f160"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Crisp/Views/VirtualDisplayView.swift:159-176 | Crisp/Views/VirtualDisplayView.swift:178-194 \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":"Crisp/Views/VirtualDisplayView.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"55876bcdd576dcb068be371321bc9d25dcb24bee6359260c2004745b16469217"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Crisp/Services/CoreBrightnessService.swift:183-188 | Crisp/Services/CoreBrightnessService.swift:190-195 \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":"Crisp/Services/CoreBrightnessService.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"44673028a38e165b94672e2772cad2668727d82676c0993486d60d2c9f5323df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Crisp/Models/CombinedBrightnessMath.swift:56-68 | Crisp/Models/CombinedBrightnessMath.swift:72-86 \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":"Crisp/Models/CombinedBrightnessMath.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f184105479d4a06ee168fc7f2b6e7346e03cd5e5bc8bfd7fb18c2aea23973c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Crisp/Views/MenuBarView.swift:859-869 | Crisp/Views/PhysicalDisplayToggleView.swift:232-242 \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":"Crisp/Views/MenuBarView.swift"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4555163dfff8b24a7c775e430df2cd782b7d524f22a5ca14bc27170d302d88f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Crisp/Services/VolumeService.swift:192-203 | Crisp/Services/VolumeService.swift:205-215 \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":"Crisp/Services/VolumeService.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"651aa45cf5ee5b3a34b138826ce69c47e24b7d3ca5c708465c3a6869df77f7f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Crisp/Services/BrightnessBoostService.swift:418-423 | Crisp/Services/BrightnessBoostService.swift:425-430 \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":"Crisp/Services/BrightnessBoostService.swift"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f1523f715ac32fbd231a790f55b2366ada9c1e11eeb74bd6e56e549cd6d619"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Crisp/Services/BrightnessBoostService.swift:485-488 | Crisp/Services/DisplayPresetService.swift:27-30 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessBoostService.swift"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"79494f49bd2ea4a09add6d5de63158002f9404cdfe3022e79e27e8e310004cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Crisp/Views/ArrangementView.swift:314-328 | Crisp/Views/ArrangementView.swift:344-351 \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":"Crisp/Views/ArrangementView.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"c605db73b5fc475d62cca06ca48b13681d4aaac0133237842a13f1db283e0ab5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Crisp/Services/BrightnessService.swift:1013-1019 | Crisp/Services/InputSwitchService.swift:162-168 | Crisp/Services/PhysicalDisplayToggleService.swift:590-596 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"48d06e21e2552d9da2c21644fa5aeec4ffe6144e171331d487df513b229889e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Crisp/Views/ShortcutsSectionView.swift:79-87 | Crisp/Views/InputSourceView.swift:117-124 \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":"Crisp/Views/ShortcutsSectionView.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"50047af3304e6804a8b84bddc3859e2f7693e3c89d7a0ec0515bc2cd15ebf6e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Crisp/Models/DisplayInfo.swift:50-54 | Crisp/Services/BrightnessBoostService.swift:432-438 \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":"Crisp/Models/DisplayInfo.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3bfeb777f5e2aa05540a3676bbbc34020015b324644d2d5950905e91a65e74f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): Crisp/App/AppDelegate.swift:818-821 | Crisp/Services/BrightnessService.swift:234-237 | Crisp/Services/ResolutionService.swift:59-62 \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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c159c8124d609e44f9bcee530a8504712386dd96fd589ca54d76f8250b55ce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Crisp/Services/DDCService.swift:44-46 | Crisp/Services/PhysicalDisplayToggleService.swift:127-129 \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":"Crisp/Services/DDCService.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e169282cc95bd3678645f6090db9f9becac93c5150a930e063ed29368169652"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): Crisp/Services/BrightnessService.swift:1041-1061 | Crisp/Services/BrightnessService.swift:1097-1119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Services/BrightnessService.swift:1041\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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d48bfeb3e854b5305bb9b8a62cb9404a3262f52a1d1c9290f83da0553b03c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201320 lines \u00D7 2): Crisp/Services/EDROverlayManager.swift:84-103 | scripts/edr-spike3.swift:28-37 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/EDROverlayManager.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2c95a638f5dc2d8cd6bbe11cd3f6b8d17efd27950466991e9d21e00c044f95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Crisp/Views/PresetListView.swift:164-182 | Crisp/Views/VirtualDisplayView.swift:233-251 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Views/PresetListView.swift:164\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":"Crisp/Views/PresetListView.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa72e07c754acf6f9840a2e207a379ce8f0731dff3550ca1d7a1445bd9aaec5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201318 lines \u00D7 2): Crisp/Services/DDCService.swift:594-611 | Crisp/Services/DDCService.swift:644-655 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Services/DDCService.swift:594\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. 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, \u0060Crisp/Services/DDCService.swift:642\u0060 calls \u0060intelReadSynchronous\u0060, \u0060framebufferService\u0060 and \u0060Crisp/Services/DDCService.swift:593\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":"Crisp/Services/DDCService.swift"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb78160541c6808593706d0e0a1d15cb008aec26ea1357ab12b932718c78389"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Crisp/Views/PanelBlocks.swift:190-205 | Crisp/Views/PanelBlocks.swift:226-241 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Views/PanelBlocks.swift:190\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/PanelBlocks.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b26632edad20894f09d710aea260d7161cfab3dfe881558988bfc97c315c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): Crisp/Services/EDROverlayManager.swift:108-121 | scripts/edr-spike.swift:71-84 | scripts/edr-spike2.swift:45-57 | scripts/edr-spike3.swift:41-53 \u2014 before extracting anything, compare \u0060scripts/edr-spike.swift\u0060 and \u0060scripts/edr-spike2.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/edr-spike.swift:70\u0060 calls \u0060MTLCreateSystemDefaultDevice\u0060 and \u0060Crisp/Services/EDROverlayManager.swift:107\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":"Crisp/Services/EDROverlayManager.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d70d5b8cf08ac05f5a25c95d00ad3cf602d22e7cc8612acb0f1186d4560317"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201314 lines \u00D7 2): Crisp/Services/DDCService.swift:467-475 | Crisp/Services/HiDPIService.swift:203-216 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/DDCService.swift"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51909570d5751b5df7381b593bd19a0ba7f311bc9989d97597ecb582aa5d85c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Crisp/Views/DisplayModeListView.swift:742-755 | Crisp/Views/RotationView.swift:80-93 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a 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":"Crisp/Views/DisplayModeListView.swift"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"d753a888519f5b40c6352b0fd621dee55ec334b93ca52009ff985da39443e14f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Crisp/Views/SavePresetView.swift:181-193 | Crisp/Views/VirtualDisplayView.swift:366-378 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a 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 \u0060Crisp/Views/SavePresetView.swift:181\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5dbfa321d8f6ac5b416055edf1d70dbca55f67a91616a1cf21b625d7a28743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Crisp/Services/BrightnessService.swift:1057-1067 | Crisp/Services/DDCService.swift:449-459 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a 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 \u0060Crisp/Services/BrightnessService.swift:1057\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Crisp/Services/DDCService.swift:446\u0060 calls \u0060CGDisplayVendorNumber\u0060, \u0060CGDisplayModelNumber\u0060 and \u0060Crisp/Services/BrightnessService.swift:1055\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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b427c8f124acc494ca5e3f7adb5e5500f649ee2c8068fbf3292684b0b5bcb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Crisp/Services/CrispControlServer.swift:472-479 | Sources/crispctl/main.swift:63-71 \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 \u0060Crisp/Services/CrispControlServer.swift:472\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":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd43c52e9ebbebe8442e7bc9d3216f6ffb7c204f81a46a111727a02a02bed3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Crisp/Views/SavePresetView.swift:332-340 | Crisp/Views/VirtualDisplayView.swift:442-450 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Views/SavePresetView.swift:332\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"259fd9f5ecf2b7fe1e659317a534b8d8854e8434b5e4d543e694388a9a43549b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Crisp/Services/CrispControlServer.swift:43-48 | Sources/crispctl/main.swift:37-44 \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 \u0060Crisp/Services/CrispControlServer.swift:43\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":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ae89e8675a90a4509c4fdaa3121ce646d3335ff53da695107afbbd4ff3736d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Crisp/Services/MirroredModeService.swift:333-340 | Crisp/Services/VirtualDisplayService.swift:255-262 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/MirroredModeService.swift"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d92c3051e414a25979fae0d4f92310168cd4cd6a5669fc30870d8d1fed579f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Crisp/Views/ExtraBrightnessView.swift:21-28 | Crisp/Views/HDRToggleView.swift:25-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Views/ExtraBrightnessView.swift:21\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":"Crisp/Views/ExtraBrightnessView.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"efb4240198fd6a0bf5c28b191f05af9fbb7fc70be9fb11816ee175699406514f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): Crisp/Models/CrispControlModel.swift:433-438 | Crisp/Models/CrispControlModel.swift:469-474 | Crisp/Models/CrispControlModel.swift:495-500 | Crisp/Models/CrispControlModel.swift:547-552 | Crisp/Models/CrispControlModel.swift:637-642 | Crisp/Models/CrispControlModel.swift:671-676 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, 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, \u0060Crisp/Models/CrispControlModel.swift:502\u0060 calls \u0060init\u0060, \u0060failure\u0060 and \u0060Crisp/Models/CrispControlModel.swift:475\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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d486978df1342e8168ce6cc14029145ce4bc30f05e7e42b9a3b4d6400998805"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Crisp/Services/DDCService.swift:804-809 | Crisp/Services/DDCService.swift:943-948 \u2014 both copies are in the same file, so extract the block 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":"Crisp/Services/DDCService.swift"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e2305f701e54a8ed3d1beeb532f168f03846dd1008db57ace58bf141c4b74db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Crisp/Services/DDCService.swift:130-136 | scripts/ddc-probe.swift:58-62 | scripts/ddc-stress-probe.swift:43-47 | scripts/ddc-write-probe.swift:70-74 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Services/DDCService.swift:130\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/DDCService.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aeea9bbd93f692c2e8269c39a03d8674559db436b8db52eb39be3f497824d97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Crisp/Services/DDCService.swift:420-425 | scripts/ddc-probe.swift:28-33 | scripts/ddc-stress-probe.swift:26-31 | scripts/ddc-write-probe.swift:38-43 \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":"Crisp/Services/DDCService.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8ca255065f12b2fcbe57b7cd4083dda64a3a3b4631ef8aa13ddb746a811e00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Crisp/Models/CrispControlModel.swift:434-438 | Crisp/Models/CrispControlModel.swift:532-536 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Models/CrispControlModel.swift:434\u0060 it begins part-way through the construct above it, so those exact 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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd1b1d93f418bfecab785f36fa92bd032e470aeebc7bae6ed808872ca19d8cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Crisp/Services/GammaService.swift:313-317 | Crisp/Services/GammaService.swift:450-455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Crisp/Services/GammaService.swift:313\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":"Crisp/Services/GammaService.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f674114dbb226f4709cae578e10d91f8202053ced170de6a4610413dd2b87e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Crisp/Services/BrightnessBoostService.swift:103-110 | Crisp/Services/EDROverlayManager.swift:33-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/BrightnessBoostService.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"7989eaae10f28590d427b87d85ac23675b47e6e4fa010f26cd7c92ebc52a0fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201324 lines \u00D7 2): scripts/edr-spike2.swift:12-35 | scripts/edr-spike3.swift:11-30 \u2014 before extracting anything, compare \u0060scripts/edr-spike2.swift\u0060 and \u0060scripts/edr-spike3.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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":"scripts/edr-spike2.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0531dd617fd41b74979ea81e0a1346f0263a2aa508ded83aa28ae77107e0fdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): scripts/edr-spike.swift:59-75 | scripts/edr-spike2.swift:33-49 \u2014 before extracting anything, compare \u0060scripts/edr-spike.swift\u0060 and \u0060scripts/edr-spike2.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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":"scripts/edr-spike.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c00fa93c463b3c668b773c36cd057937f8aab567c7bb17ce19e1b971f31070"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): scripts/edr-spike.swift:56-63 | scripts/edr-spike2.swift:30-37 | scripts/edr-spike3.swift:25-32 \u2014 before extracting anything, compare \u0060scripts/edr-spike.swift\u0060 and \u0060scripts/edr-spike2.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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":"scripts/edr-spike.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"beb6d32c092a2b9fca56d3e46fc1e4a360ea9095656e79df576567fcac7665e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/edr-spike.swift:89-93 | scripts/edr-spike2.swift:61-65 \u2014 before extracting anything, compare \u0060scripts/edr-spike.swift\u0060 and \u0060scripts/edr-spike2.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/edr-spike.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"144527e5384e49bb0a69d100a06ea4b27bf60b2c0a8469d3fbad2c9b64a2ac6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): scripts/ddc-probe.swift:21-26 | scripts/ddc-stress-probe.swift:19-24 | scripts/ddc-write-probe.swift:31-36 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/ddc-probe.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"b28d62c15f14fd673593b9a525444f50c7b24e2da5f6198ba5b4749ede652139"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ResolutionService (LCOM4 5): ResolutionService\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":"Crisp/Services/ResolutionService.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32ffcd53cd1b52e2e223312856efd2082846147621b2ed0f79ca93d6f1dd034"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: BrightnessService (LCOM4 4): BrightnessService\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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a99af80ef52a6228d2d36b9c2252e59507109c44991ec1ed937f283ae1be0a3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Models/CrispControlModel.swift: Crisp/Models/CrispControlModel.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in CrispControlCLIModel.matchedRequest at line 1054. 1 of those changes was a fix/bug commit, and the other 25 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Models/CrispControlModel.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":"Crisp/Models/CrispControlModel.swift"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"df71643e9f3441003e74d7d8a989359fb271cb9ce86fe19138343f77ff343369"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/PhysicalDisplayToggleService.swift: Crisp/Services/PhysicalDisplayToggleService.swift changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PhysicalDisplayToggleService.restoreStates at line 333. 7 of those changes were fix/bug commits, and the other 26 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/PhysicalDisplayToggleService.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":"Crisp/Services/PhysicalDisplayToggleService.swift"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f62a04fb337b51475e666e150badfc856daff99c5f1eb984be6b1dc74b1a2bf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/App/AppDelegate.swift: Crisp/App/AppDelegate.swift changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AppDelegate.rebuildBlocksIfNeeded at line 561. 1 of those changes was a fix/bug commit, and the other 27 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/App/AppDelegate.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":"Crisp/App/AppDelegate.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b25d8256871413f6ba9de93986be6c8184d09ea76407dc4d9f25600ed29340"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Views/DisplayModeListView.swift: Crisp/Views/DisplayModeListView.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in DisplayModeController.computeResolutionGroups at line 67. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Views/DisplayModeListView.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":"Crisp/Views/DisplayModeListView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"407d3df0699687198abecc423f95f0717b7d4b083d396d31a68009c04dbe458a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/CrispControlServer.swift: Crisp/Services/CrispControlServer.swift changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in CrispControlServer.reply at line 129. 1 of those changes was a fix/bug commit, and the other 17 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/CrispControlServer.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":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"e818ea85581cc85881416d101a5977fb7456c67579791138500f920d1575a0d9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/DDCService.swift: Crisp/Services/DDCService.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in DDCService.buildAVServiceMapByProximity at line 105. 1 of those changes was a fix/bug commit, and the other 12 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/DDCService.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":"Crisp/Services/DDCService.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"861a7a6c0d9da5653a3c890db2ccd6f674f3453603f6cce6c21cb01e734a0791"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/PresetService.swift: Crisp/Services/PresetService.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in PresetService.applyPreset at line 188. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/PresetService.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":"Crisp/Services/PresetService.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"4894d094d76d4156ecbc496ec2fad17df2156d8b52ee599d138aa6bf9b58a6dd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/crispctl/main.swift: Sources/crispctl/main.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in main.swift.top-level code at line 6. 1 of those changes was a fix/bug commit, 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Sources/crispctl/main.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/crispctl/main.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78949d295c66fab1533b82d58151a38418fde5a9ce3789c437eb2d07833ec72"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Views/BrightnessSliderView.swift: Crisp/Views/BrightnessSliderView.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in BrightnessSliderView.body at line 84. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Views/BrightnessSliderView.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":"Crisp/Views/BrightnessSliderView.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3947d28ad2130b4971fb2da61df844d5e8810903a52def7d52d71d0e3ad2059"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Views/SavePresetView.swift: Crisp/Views/SavePresetView.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SavePresetForm.body at line 161. 1 of those changes was a fix/bug commit, and the other 7 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Views/SavePresetView.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":"Crisp/Views/SavePresetView.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed51b5b4fba90e792a03628092ba5370b7d6575a129d3664181c2a83c16e4532"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/BrightnessService.swift: Crisp/Services/BrightnessService.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in BrightnessService.refreshBrightness at line 306. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/BrightnessService.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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"e950dacb6cc66250645fd695a31990b01bf7d76d30aa33d5dac0f273eed8b269"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/ResolutionService.swift: Crisp/Services/ResolutionService.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ResolutionService.restoreModeAfterWakeIfNeeded at line 74. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/ResolutionService.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":"Crisp/Services/ResolutionService.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd11767270af35ed0c5cbb0c91ae82e79f75da1893b3144abf6703a173721ea0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/mirror-hidpi-probe.swift: scripts/mirror-hidpi-probe.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in mirror-hidpi-probe.swift.top-level code at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- scripts/mirror-hidpi-probe.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/mirror-hidpi-probe.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"820e2030d816ae6ffa17ffabf387533b4c1df54f56204cfcdb8555bfa9a0a1c6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/App/PanelCanvas.swift: Crisp/App/PanelCanvas.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PanelCanvas.layoutNow at line 480. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/App/PanelCanvas.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":"Crisp/App/PanelCanvas.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"98bd349cb2ff30162ed464f98b798792c06f258d2fa0748c7f04a1101bb17081"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Crisp/Services/AutoBrightnessService.swift: Crisp/Services/AutoBrightnessService.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AutoBrightnessService.applyBrightness at line 222. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:18:43 \u002B01:00\u0027 --until=\u00272026-11-13 19:18:43 \u002B01:00\u0027 --full-history --no-merges -- Crisp/Services/AutoBrightnessService.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":"Crisp/Services/AutoBrightnessService.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b03b361e5dbb6fc3960f8e50633b8eb468955eab590cc2f13ea046bd4274788"}},{"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":"0dbb915274563a1a1c7710b67a8c19d2a107f22fcaf0daddfce999f66be50e9d"},"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":"ed65b9c95a4dc53898afcb477735e650c15707ac619af8959b21ca0939b1e0af"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: CrispControlServer.swift \u2194 main.swift: \u0060Crisp/Services/CrispControlServer.swift\u0060 (context Crisp) and \u0060Sources/crispctl/main.swift\u0060 (context Sources) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u0060bd0010ca\u0060 crispctl: add virtual list, on and off (#233); \u0060b9967e5b\u0060 Review fixes before 1.6.0; \u0060982a47f6\u0060 crispctl: add external HDR controls (#116) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Crisp/Services/CrispControlServer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"962029287ad2863d9838af08e272832ca76b8fdc4195fc1532497ec7a61b6b41"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/ci.yml"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060location == nil || location == \u0022External\u0022\u0060 appears character-identically in 4 files \u2014 Crisp/Services/DDCService.swift, scripts/ddc-probe.swift, scripts/ddc-stress-probe.swift, scripts/ddc-write-probe.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":"Crisp/Services/DDCService.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe31dc7af159a7267d9bb7b2effe7df3d247b8f5cd6b1b470c054e1c583b084"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060servicePort != MACH_PORT_NULL \u0026\u0026 servicePort != 0\u0060 appears character-identically in 2 files \u2014 Crisp/Services/BrightnessService.swift, Crisp/Services/DDCService.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":"Crisp/Services/BrightnessService.swift"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d2b1609d5c619e92f694004e57b5c8c98a5848694edfcc1a740beb08dd5617"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060v != 0 \u0026\u0026 m != 0 \u0026\u0026 v \u003C= 0xFFFF \u0026\u0026 m \u003C= 0xFFFF\u0060 appears character-identically in 2 files \u2014 scripts/phantom-probe.swift, scripts/settle-probe.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":"scripts/phantom-probe.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc54748a78b74aedcd0ccd35c5910efcb0fd057456289cab1e01cb378dac3b1"}},{"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":"Crisp/Services/LaunchService.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"74266227a56625b1f0fd0a2cdd87927c038ae76b8d19b08feb0a56d4b3d6c458"}},{"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":"Crisp/Services/LaunchService.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b1572990189618e9477bde53375fe211d441a5f7af68521aa7bdb56c87172c1"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":5,"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."]}]}