{"$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":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"id":"AC2","name":"Forms \u0026 labels","shortDescription":{"text":"Forms \u0026 labels"},"helpUri":"https://codehealth.canine.dev/dimensions/AC2"},{"id":"AC3","name":"Page structure","shortDescription":{"text":"Page structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AC3"},{"id":"AC5","name":"ARIA correctness","shortDescription":{"text":"ARIA correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/AC5"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"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":"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":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.refreshBubble (cyclomatic 43): OverlayViewModel.refreshBubble has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b2c21c7be07ce2f05328e241299108dd9052d2d202e7eb0084cd18e947b37f"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.inspectMainSession (cyclomatic 41): OverlayViewModel.inspectMainSession has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1683}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8047525e1f7ac761f3bfbcefac5a316a557c1edf8e15e4e0994f8ed2405a3f7"}},{"ruleId":"D1","level":"warning","message":{"text":"SpriteVideoPlayerView.applyPhaseUnlocked (cyclomatic 40): SpriteVideoPlayerView.applyPhaseUnlocked has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2912}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7c80a0ee5ab9ce1f4089cdcf89e755c747aca05abcf1be1985f47c08d6b80f"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.resolveStateFromWebSocket (cyclomatic 28): OverlayViewModel.resolveStateFromWebSocket has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4324cc8a869058a6d7c92bbe2873b9544119f67da0a1396a84ef44be422e652"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.resolveStateFromFiles (cyclomatic 24): OverlayViewModel.resolveStateFromFiles has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ebf4c9ba2c3a0f985e21ea1e2bc23a1bc178954618873f33a544339f4140d1"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.handleAgentEvent (cyclomatic 21): OverlayViewModel.handleAgentEvent 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2082}}}],"partialFingerprints":{"codehealthFindingId/v1":"9149cfaea7f200bc484862180baf4cd020ee8a172d0d16902c0636e58a75260a"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.refreshFromFiles (cyclomatic 20): OverlayViewModel.refreshFromFiles 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"1482ebd08b468f1093c95a3e04b3ed67aa8a53e0467dd76e8af010031707514b"}},{"ruleId":"D1","level":"warning","message":{"text":"OverlayViewModel.handleWebSocketText (cyclomatic 20): OverlayViewModel.handleWebSocketText 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1888}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c8d8a2643212f6b8e31884a277596d1b83773ac7ff7fc08202dde5658a2bd5"}},{"ruleId":"D1","level":"warning","message":{"text":"AppConfig.resolveGatewayTokenCandidate (cyclomatic 19): AppConfig.resolveGatewayTokenCandidate 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01d144c24a507c11db5c1c337b4fe29b64c5a0a9ef46d4735b305876df8bdbe"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsoleHandler.do_POST (cyclomatic 18): ConsoleHandler.do_POST 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":"desk-sprite/console_server.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9de78fb5df39f5b9d1a3bb212863608c1ec742d2aaf779c6a51f341bd610a7a"}},{"ruleId":"D1","level":"warning","message":{"text":"AppConfig.parseDotEnv (cyclomatic 16): AppConfig.parseDotEnv 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"6974da864021b740f03e7418968387f3b1073484692cfa22b9538821005089a4"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.inspectMainSession (cognitive 88): OverlayViewModel.inspectMainSession has cognitive complexity 88 (threshold 15). Drivers by points: if/else 25 (69 pts), boolean chains 13, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1683}}}],"partialFingerprints":{"codehealthFindingId/v1":"790cb990fa2298247265222fd5855f44f7fdfa502cecca7729000a5ae67b9aa6"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.refreshBubble (cognitive 65): OverlayViewModel.refreshBubble has cognitive complexity 65 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 16, match/switch 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ecb42bcb33f7ab229d36322ddc8ba91d022f493f34641aa5490620ce6a18d02"}},{"ruleId":"D2","level":"warning","message":{"text":"SpriteVideoPlayerView.applyPhaseUnlocked (cognitive 56): SpriteVideoPlayerView.applyPhaseUnlocked has cognitive complexity 56 (threshold 15). Drivers by points: if/else 28 (45 pts), boolean chains 11 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2912}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd2d76d49839397772ae612937e4b176ac88b624560da525205398420ebce492"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.handleAgentEvent (cognitive 37): OverlayViewModel.handleAgentEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2082}}}],"partialFingerprints":{"codehealthFindingId/v1":"759046b423cb770f228739c7fbd312ec1c0efe369221a4cb21062fe4767fe483"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.handleWebSocketText (cognitive 35): OverlayViewModel.handleWebSocketText has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1888}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f261959d15773e97183ec53b5760ff88aeb7e9cb91e6b530018b1e4636920cb"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.refreshFromFiles (cognitive 34): OverlayViewModel.refreshFromFiles has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 3, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"2febd5e60958bf5b291f3018f7dd2bf30cb2f7aabfeede529611ca3a182edb33"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.resolveStateFromWebSocket (cognitive 32): OverlayViewModel.resolveStateFromWebSocket has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 12 (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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"663b8ccae5409982dddfaea0a316d6c449caac2582df7a97a30ddf7d9ecd68a7"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.resolveStateFromFiles (cognitive 23): OverlayViewModel.resolveStateFromFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6bf823b83a474192f59a6c639e942c89dfa260a2aed1c39176fd0207a50a0e6"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsoleHandler.do_POST (cognitive 23): ConsoleHandler.do_POST has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 8 (9 pts), ternaries 3 (4 pts), boolean chains 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":"desk-sprite/console_server.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"193c8920ab5c6d284619aa29db68c09c5634a47f9767141545444bf625188fdb"}},{"ruleId":"D2","level":"warning","message":{"text":"AppConfig.resolveGatewayTokenCandidate (cognitive 22): AppConfig.resolveGatewayTokenCandidate has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b97bba61574ed20ebf28ca8f9d09e3850844e43f758f60047e3853451a0aa90"}},{"ruleId":"D2","level":"warning","message":{"text":"AppConfig.parseDotEnv (cognitive 21): AppConfig.parseDotEnv has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"24af40f874c9463e4de1582b30ace441926fc4bfc29a2a1461b7ddfb091a0aed"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.tick (cognitive 19): OverlayViewModel.tick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"63779e1f5f92823ae847c4b6b52fdeeae1a8c6d9c4b9d5d9f50f8693fd89d37c"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayViewModel.cleanupStaleWebSocketRuns (cognitive 17): OverlayViewModel.cleanupStaleWebSocketRuns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7529cf4e69f6cffede0c52c7ef149c50528d0bd27e21f31faebbb97557971c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: DeskSprite/main.swift: FileTooLong \u2014 3426 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2926 over it, 6.85\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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b9056b993f999dbf916a32d2de201c9eff32fbcd0c8c8a2a589123ad68c4ac1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OverlayViewModel: ClassTooLong \u2014 1861 significant lines (blank, comment-only and punctuation-only lines excluded), 111 methods. The bar is 400 significant lines; this is 1461 over it, 4.65\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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b23ad557b584d766f32cd6bc2aaa99b8d391bcd31ad5f0f24d43df045e7eb2d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OverlayViewModel: TooManyMethods \u2014 111 methods. The bar is 30 methods; this is 81 over it, 3.70\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54e0664199f6bc05ae9f25b4a43f9d62d53c49ac59eac1d9f34dd3e72a2f6d9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SpriteVideoPlayerView.applyPhaseUnlocked: MethodTooLong \u2014 applyPhaseUnlocked runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2912}}}],"partialFingerprints":{"codehealthFindingId/v1":"05489e08b9b0e1ca374a51e797c53eb24b9b87053aaa28892db1f62b4359e3ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): desk-sprite/Sources/DeskSprite/main.swift:3352-3386 | desk-sprite/Sources/DeskSprite/main.swift:3388-3420 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":3352}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9d8f8aa07b31f7d60f64a4c8e1054c7184347d6575c65c6876449e2c75b438"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): desk-sprite/Sources/DeskSprite/main.swift:4100-4123 | desk-sprite/Sources/DeskSprite/main.swift:4125-4148 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":4100}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c5b67371e19266c8abe7852e2953f83da0f1692cd89535d15fb4f9682c73bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): desk-sprite/Sources/DeskSprite/main.swift:1331-1346 | desk-sprite/Sources/DeskSprite/main.swift:1348-1363 \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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1331}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4ec45042b938495375a2b44e143dde26d8fb0a421f139a7b12e09b598f0aa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): desk-sprite/Sources/DeskSprite/main.swift:2264-2273 | desk-sprite/Sources/DeskSprite/main.swift:2279-2293 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2264}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a91d12c149ad89df0456926f2db5101c2f314be730ad56290c5bab8dd70aeee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): desk-sprite/Sources/DeskSprite/main.swift:2387-2395 | desk-sprite/Sources/DeskSprite/main.swift:2397-2405 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2387}}}],"partialFingerprints":{"codehealthFindingId/v1":"09c59d745ca4c5d08159a2e7aa0784b30f95aa3c8cf755322e196c7a96091ef6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:455-467 | desk-sprite/Sources/DeskSprite/main.swift:2172-2183 \u2014 both copies are in the same file, so extract the block 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"8358abbd41e741616e9f9875c30665b043fc9062a05703eeec6b8f7f3b982219"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:4299-4310 | desk-sprite/Sources/DeskSprite/main.swift:4316-4327 \u2014 both copies are in the same file, so extract the block 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":4299}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae74c64760f7104f11b93e1614bfd075a21cf58a7ee700563d9524d9e7f760a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:4304-4314 | desk-sprite/Sources/DeskSprite/main.swift:4338-4348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060desk-sprite/Sources/DeskSprite/main.swift:4304\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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":4304}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9ae8779fb8c14ad63e9bc7f19964915667630ad52b5ce2fbcc3998b28c1e56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:472-481 | desk-sprite/Sources/DeskSprite/main.swift:536-545 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060desk-sprite/Sources/DeskSprite/main.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"92903d252d74878d77ec3da91d17e1a5a36bb0e59432a1adfdbfd1b6da1a5b82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:2538-2545 | desk-sprite/Sources/DeskSprite/main.swift:2579-2586 \u2014 both copies are in the same file, so extract the block 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2538}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ea29a13cd1a6a14e27d48e9a8476725e9455e08e83fc5a096540cbba48905a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:3355-3362 | desk-sprite/Sources/DeskSprite/main.swift:3391-3398 \u2014 both copies are in the same file, so extract the block 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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":3355}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86031c9106e93265e227a16ce68fe86717a691d11bb84ad11189fb343f48e8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:4033-4040 | desk-sprite/Sources/DeskSprite/main.swift:4053-4060 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060desk-sprite/Sources/DeskSprite/main.swift:4033\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060desk-sprite/Sources/DeskSprite/main.swift:4041\u0060 calls \u0060rotationEffect\u0060, \u0060degrees\u0060 and \u0060desk-sprite/Sources/DeskSprite/main.swift:4061\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":4033}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af115da7473a8ab85c1931adf589157c01f461b2d5848ac694dfc85e37208ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): desk-sprite/Sources/DeskSprite/main.swift:3474-3480 | desk-sprite/Sources/DeskSprite/main.swift:3676-3682 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060desk-sprite/Sources/DeskSprite/main.swift:3474\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060desk-sprite/Sources/DeskSprite/main.swift:3683\u0060 calls \u0060stroke\u0060, \u0060opacity\u0060, \u0060RoundedRectangle\u0060 and \u0060desk-sprite/Sources/DeskSprite/main.swift:3481\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":3474}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a0c420a1bb0c5a1174943d38f398d7f6e77f0339a8aacfc00e37d6e7ba23c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): desk-sprite/Sources/DeskSprite/main.swift:2296-2300 | desk-sprite/Sources/DeskSprite/main.swift:2316-2320 | desk-sprite/Sources/DeskSprite/main.swift:2338-2342 | desk-sprite/Sources/DeskSprite/main.swift:2354-2358 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060desk-sprite/Sources/DeskSprite/main.swift:2296\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060desk-sprite/Sources/DeskSprite/main.swift:2312\u0060 calls \u0060contains\u0060 and \u0060desk-sprite/Sources/DeskSprite/main.swift:2333\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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2296}}}],"partialFingerprints":{"codehealthFindingId/v1":"7691782eee0a33d84eb7df5747aa99aed775cafcdc885b4b30146d8c00560be9"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: desk-sprite/console_server.py: 47.7% line coverage (122/256)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/console_server.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"520813d139e22eece3d6510fa847738c351fd7e7ae454ffc4c59d310eeada219"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060desk-sprite/Package.swift\u0060 makes this repository a deployable product (line 10)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Package.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86f594614ddede93eb099ac7c8a991c0b3ffda1069674ed324550b352267fca"}},{"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":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/console/index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"7225f4514e04deb824c93dc6a9c00e593f56dc8c7a3fb5387fbe7e9d5a74ea83"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"ruleId":"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":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/console_server.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3366df71ede201fbb45f6b9ed56246003699e27348f005cf63df6d0ac27b379a"}},{"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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1343}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f418bfada430b1530c545a5431c921ac7d9225ec988439656eece4461f78abe"}},{"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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afdd41bf24272f1d8f24ceb669cd07fad8db34247054eace0e430f53a69435f"}},{"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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1529}}}],"partialFingerprints":{"codehealthFindingId/v1":"68eeb5fffec3c3b9b7aafff48ad3a406ea02cd0c4a2cb03852e7da45093811c7"}},{"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":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":1617}}}],"partialFingerprints":{"codehealthFindingId/v1":"2255ff6e6ec20c745e777c6d8b277b26ae5a7cb91bbe48ce837a82d72a791d87"}},{"ruleId":"X6","level":"note","message":{"text":"Hand-rolled JSON/XML parsing via regex: A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand \u2014 malformed or differently-typed content (e.g. \u0060\u0022amount\u0022: \u00225\u0022\u0060 as a string) silently mis-parses instead of failing validation. This Swift code already uses a real parser in the same package; use it here too."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2533}}}],"partialFingerprints":{"codehealthFindingId/v1":"00123488e3b66ecf00f2eb5ab3e7754b298c47564a75e83aa986f8a9f8c1c22a"}},{"ruleId":"X6","level":"note","message":{"text":"Hand-rolled JSON/XML parsing via regex: A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand \u2014 malformed or differently-typed content (e.g. \u0060\u0022amount\u0022: \u00225\u0022\u0060 as a string) silently mis-parses instead of failing validation. This Swift code already uses a real parser in the same package; use it here too."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":2534}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e219e29e2953db6ae5366d078d8404d449502d7a2c151ef89a85812b5677b2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_load_console_config_unlocked\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/console_server.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec32b572f8560d2c29ea499129e6422a590f22b9713af62b3c2beb7c8cd763e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060parseDotEnv\u0060 turns every thrown error into \u0060[:]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"desk-sprite/Sources/DeskSprite/main.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec922d6795ccfdea2ac1680a926b493ef3c06b3df41804d2848e0d2aa6435d86"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"}]}],"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":2,"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."]}]}