{"$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":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","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-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"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":"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":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"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":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"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":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"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":"BlueCursorView.body (cyclomatic 25): BlueCursorView.body has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/OverlayWindow.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a55c4af3bde5317ba5911265ae6d9b77c16ffb877d6b3ced02e37f56a35995"}},{"ruleId":"D1","level":"warning","message":{"text":"WindowPositionManager.shrinkOverlappingFocusedWindow (cyclomatic 18): WindowPositionManager.shrinkOverlappingFocusedWindow 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":"leanring-buddy/WindowPositionManager.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"3debc9de49f8c4376f75a18b800528807d6fbdcb218774a90a68874556d1aa29"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeAPI.analyzeImageStreaming (cyclomatic 17): ClaudeAPI.analyzeImageStreaming 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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c71df9b959e56c735c1252672ad0c10648dc4b7fadac3587590d401eb7157e7"}},{"ruleId":"D2","level":"warning","message":{"text":"BlueCursorView.body (cognitive 25): BlueCursorView.body has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7, ternaries 6. 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":"leanring-buddy/OverlayWindow.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"669681635c66864b53ca6642ba101bd74983a1c6f9a799333cfd6339cc82c77c"}},{"ruleId":"D2","level":"warning","message":{"text":"CompanionManager.sendTranscriptToClaudeWithScreenshot (cognitive 24): CompanionManager.sendTranscriptToClaudeWithScreenshot has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e180239676a21c4225d35252492d887d45dc5c8b41e829a588b5620d9fd509"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPI.analyzeImageStreaming (cognitive 21): ClaudeAPI.analyzeImageStreaming has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"23882a5528e570d1318091e6ea6379ba93388795bd4542125b3db50be8b90ff2"}},{"ruleId":"D2","level":"warning","message":{"text":"WindowPositionManager.shrinkOverlappingFocusedWindow (cognitive 19): WindowPositionManager.shrinkOverlappingFocusedWindow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 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":"leanring-buddy/WindowPositionManager.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"95730f7f755e6989296fed0b786f6b12a8abd541a610030810473f9a89c1b007"}},{"ruleId":"D2","level":"warning","message":{"text":"BuddyPushToTalkShortcut.shortcutTransition (cognitive 17): BuddyPushToTalkShortcut.shortcutTransition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/BuddyDictationManager.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"523782aaf6048c60f9d68b6c65c46a39888209f295f3ec5b4a57d895fc7145ba"}},{"ruleId":"D2","level":"warning","message":{"text":"CompanionScreenCaptureUtility.captureAllScreensAsJPEG (cognitive 16): CompanionScreenCaptureUtility.captureAllScreensAsJPEG has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionScreenCaptureUtility.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e65ceae688ecaaacf2ccade97868b374dbb1903eca6f85fa4e8fa26aac3785a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CompanionManager: ClassTooLong \u2014 558 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 158 over it, 1.40\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"568d3f8261067a0f3f13a97725d1ff80ea12ba9b657dca4709b412b03434dae4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BlueCursorView.body: MethodTooLong \u2014 body runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/OverlayWindow.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"10cca408e44d1a8b87de4c41ef0415c25a6627e88683e44bf6f5c854385a4f9c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CompanionPanelView: ClassTooLong \u2014 513 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 113 over it, 1.28\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44c80388283e5bafdb94c4aa63dca55c1983a57418c4e5fae21e09780c280aa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: leanring-buddy/BuddyDictationManager.swift: FileTooLong \u2014 583 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: BuddyDictationManager (218-866). The bar is 500 significant lines; this is 83 over it, 1.17\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":"leanring-buddy/BuddyDictationManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"239f2491d0329e3aa54065687876d251b27b12a25cdfaabda211ea3b8d38f97c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: leanring-buddy/CompanionManager.swift: FileTooLong \u2014 570 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: CompanionManager (25-1026). The bar is 500 significant lines; this is 70 over it, 1.14\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":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9823d14326822aedff4e5bfaf508571d3c9a087e968ca59cf9b00840ac0af19a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BuddyDictationManager: ClassTooLong \u2014 433 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 33 over it, 1.08\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":"leanring-buddy/BuddyDictationManager.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4eab20b8051a7a46e08513041ebc5ed0a90950b3a4bf901d2eb0100312fdf87"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: leanring-buddy/CompanionPanelView.swift: FileTooLong \u2014 515 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CompanionPanelView (13-761). The bar is 500 significant lines; this is 15 over it, 1.03\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"830869eb391a3f22cc6c54810f8841acaae14b47984b4d3452858fa62065a30c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 25 shared lines): leanring-buddy/CompanionPanelView.swift:266-334 | leanring-buddy/CompanionPanelView.swift:336-391 | leanring-buddy/CompanionPanelView.swift:393-437 | leanring-buddy/CompanionPanelView.swift:439-492 | leanring-buddy/CompanionPanelView.swift:494-544 \u2014 These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f595ab79636bbe8edc566cd4b8ca4062fe28d8eef313aea43466f0493759cd66"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (49 shared lines): leanring-buddy/ClaudeAPI.swift:215-290 | leanring-buddy/OpenAIAPI.swift:50-141 \u2014 These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c05b27eb615a78330f5ebdfac7e9a1db92b48973bea1eb8cb5dcffb6b804343"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): leanring-buddy/DesignSystem.swift:342-360 | leanring-buddy/DesignSystem.swift:379-402 | leanring-buddy/DesignSystem.swift:424-440 | leanring-buddy/DesignSystem.swift:450-475 | leanring-buddy/DesignSystem.swift:501-529 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"264cbaf370491dc93b72d1f54301b8c130e6486d8c6af41cb5448ef444aa3238"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): leanring-buddy/CompanionManager.swift:896-927 | leanring-buddy/OverlayWindow.swift:677-702 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1f54d4883fa39e1815b2a6ff8ddf21109dee6eaa2274467f6038c5c1b07df83"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): leanring-buddy/CompanionPanelView.swift:550-575 | leanring-buddy/CompanionPanelView.swift:577-597 \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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"98df7055bbf49f5bd88eadef98eae0102746ee9242071fa6af71511f2cc4917a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): leanring-buddy/BuddyDictationManager.swift:790-810 | leanring-buddy/BuddyDictationManager.swift:812-832 \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":"leanring-buddy/BuddyDictationManager.swift"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ded36a690ec0277e3d4cfadc96417267b0a2b9c3d17a803c8353ff2917ae26"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:182-196 | leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:376-390 \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":"leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a42ef1bd7bd9bd669133c0795c6e1aaabc50928b59ab782538ada1c6eaa364"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): leanring-buddy/AppleSpeechTranscriptionProvider.swift:26-42 | leanring-buddy/OpenAIAudioTranscriptionProvider.swift:36-56 \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":"leanring-buddy/AppleSpeechTranscriptionProvider.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"5acfb76c74a5a98a3ebc0335e2fad6ddec156ec0a08867afe4fbfbd0eae1c5ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:140-156 | leanring-buddy/OpenAIAudioTranscriptionProvider.swift:88-108 \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":"leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d937b24b7c96725e170390f7493d6033d1d22880cc76a3e15061b39ff5b3c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): leanring-buddy/ClaudeAPI.swift:17-37 | leanring-buddy/ElementLocationDetector.swift:38-50 | leanring-buddy/OpenAIAPI.swift:15-36 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"593c9477d2efa852ad935204a201aeb04e84bb078c0ded8a244b9834d8c1aa04"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): leanring-buddy/CompanionManager.swift:414-420 | leanring-buddy/CompanionResponseOverlay.swift:106-113 \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":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a22b5e5d605a418f2c46159fe20b7a73cd538e02dc2b89870de858ba31917f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): leanring-buddy/ClaudeAPI.swift:117-143 | leanring-buddy/ClaudeAPI.swift:228-254 \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 \u0060leanring-buddy/ClaudeAPI.swift:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f020fc4797eed264575d7ea466f1fb493ae0832c7561481c1c97cd2a39230ee4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201322 lines \u00D7 2): leanring-buddy/CompanionManager.swift:653-674 | leanring-buddy/CompanionManager.swift:999-1013 \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":"leanring-buddy/CompanionManager.swift"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b37fc5f6f6caa2a5c51a69501466067cc0d8651d7863b2170ac5bcd9ccc372b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): leanring-buddy/ClaudeAPI.swift:261-278 | leanring-buddy/OpenAIAPI.swift:109-128 \u2014 before extracting anything, compare \u0060leanring-buddy/ClaudeAPI.swift\u0060 and \u0060leanring-buddy/OpenAIAPI.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b02a7027ec7af0bc2ff63e74fd0f3340cf68e790868bcd13f24c34f3941e7d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): leanring-buddy/CompanionPanelView.swift:268-285 | leanring-buddy/CompanionPanelView.swift:395-412 | leanring-buddy/CompanionPanelView.swift:441-458 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/CompanionPanelView.swift:268\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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00602\u0060 in one and \u00604\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b73b238882a413bd18fec35c559cf97b4fd30cf02703242135b8a371ef29ef0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): leanring-buddy/DesignSystem.swift:457-471 | leanring-buddy/DesignSystem.swift:511-525 \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 \u0060leanring-buddy/DesignSystem.swift:457\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":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f545d7557ecd1863daa89deab54430f9da0a941ef9e7daed56de87c9263bc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): leanring-buddy/OverlayWindow.swift:193-207 | leanring-buddy/OverlayWindow.swift:237-251 \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 \u0060leanring-buddy/OverlayWindow.swift:193\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":"leanring-buddy/OverlayWindow.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"6abad1f764d56429e67a8f9894a9ebeab6d53fb7f751971bda0ccd3ce1f31ec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): leanring-buddy/CompanionPanelView.swift:378-391 | leanring-buddy/CompanionPanelView.swift:424-437 | leanring-buddy/CompanionPanelView.swift:479-492 | leanring-buddy/CompanionPanelView.swift:531-544 \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 \u0060leanring-buddy/CompanionPanelView.swift:378\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"d54f652c623e68d875f5dd9ef3722dd969a58d5d9f72d4d689b378a6fbbeea06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): leanring-buddy/CompanionPanelView.swift:550-563 | leanring-buddy/CompanionPanelView.swift:577-590 \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 \u0060leanring-buddy/CompanionPanelView.swift:550\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00604\u0060 in one and \u00608\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0fd7539ce8c8592af78f500e7127935e50f97de6ea77bf4f43d0e72e78dd28d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): leanring-buddy/CompanionPanelView.swift:297-309 | leanring-buddy/CompanionPanelView.swift:375-387 | leanring-buddy/CompanionPanelView.swift:421-433 | leanring-buddy/CompanionPanelView.swift:476-488 | leanring-buddy/CompanionPanelView.swift:528-540 \u2014 all 5 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 \u0060leanring-buddy/CompanionPanelView.swift:297\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"f783a685b8382d61a5ae0865f7ef469651e55b4a0aab8bb10648edb610b18c8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): leanring-buddy/CompanionPanelView.swift:276-288 | leanring-buddy/CompanionPanelView.swift:403-415 | leanring-buddy/CompanionPanelView.swift:449-461 | leanring-buddy/CompanionPanelView.swift:508-520 \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 \u0060leanring-buddy/CompanionPanelView.swift:276\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6706d5d79319b46832a07c532e6637ba151733df830b87d01977705d74b37c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 3): leanring-buddy/ClaudeAPI.swift:134-144 | leanring-buddy/ClaudeAPI.swift:245-255 | leanring-buddy/OpenAIAPI.swift:92-104 \u2014 before extracting anything, compare \u0060leanring-buddy/ClaudeAPI.swift\u0060 and \u0060leanring-buddy/OpenAIAPI.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/ClaudeAPI.swift:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a8b5b00ab3c60e512e531526808b26a3310229088151631748d23356984858"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): leanring-buddy/CompanionPanelView.swift:280-291 | leanring-buddy/CompanionPanelView.swift:358-369 | leanring-buddy/CompanionPanelView.swift:407-418 | leanring-buddy/CompanionPanelView.swift:453-464 | leanring-buddy/CompanionPanelView.swift:512-523 \u2014 all 5 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 \u0060leanring-buddy/CompanionPanelView.swift:280\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00608\u0060 in one and \u00601\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abadfa0ca42a8c48dd8e1d45a8b01666c2a8461686483a716544f9561e5021b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): leanring-buddy/ClaudeAPI.swift:51-62 | leanring-buddy/ElementLocationDetector.swift:325-334 \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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca84833e835884049deaf92163ed40068d68d28da03e0f3f58a29cfe219f27da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): leanring-buddy/CompanionPanelView.swift:687-697 | leanring-buddy/CompanionPanelView.swift:704-714 \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 \u0060leanring-buddy/CompanionPanelView.swift:687\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00602\u0060 in one and \u00606\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf5c6411db4b3fbb5392b375744613d7e0f29d6c1501cd2ebbb1608d3cdafb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): leanring-buddy/DesignSystem.swift:342-352 | leanring-buddy/DesignSystem.swift:450-460 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/DesignSystem.swift:342\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":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef697abe954c8f7dd8df6c4548c0cb433fb645e843892ca871a3fab3ce59253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): leanring-buddy/CompanionPanelView.swift:193-202 | leanring-buddy/CompanionPanelView.swift:666-675 \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 \u0060leanring-buddy/CompanionPanelView.swift:193\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"f50294de11917fa6a9877dfe169e88f8571b170b0c4ff5c4f3be3beb3d8a8264"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): leanring-buddy/ClaudeAPI.swift:116-124 | leanring-buddy/ClaudeAPI.swift:227-235 | leanring-buddy/OpenAIAPI.swift:76-84 \u2014 before extracting anything, compare \u0060leanring-buddy/ClaudeAPI.swift\u0060 and \u0060leanring-buddy/OpenAIAPI.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/ClaudeAPI.swift:116\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c4d9b163a69b283f63985e7dc2641b612fe100dc2040d11680a33c07440332"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): leanring-buddy/CompanionPanelView.swift:151-159 | leanring-buddy/CompanionPanelView.swift:163-171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/CompanionPanelView.swift:151\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c39c649ce80a175e3bcb3e032124190293fc7c9c618fdafabc62d3767117688"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): leanring-buddy/OverlayWindow.swift:192-198 | leanring-buddy/OverlayWindow.swift:236-242 | leanring-buddy/OverlayWindow.swift:266-273 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/OverlayWindow.swift:192\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy/OverlayWindow.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c1f6a38b192e4755b2fe69ca8a4e03f1fe4917a5e1b350c0d1896ed987e1f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): leanring-buddy/CompanionPanelView.swift:206-213 | leanring-buddy/CompanionPanelView.swift:226-233 \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 \u0060leanring-buddy/CompanionPanelView.swift:206\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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e1be1036682c47d2d249dff8ff43d6e91790033f6ace211c79cc352059f186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): leanring-buddy/DesignSystem.swift:349-356 | leanring-buddy/DesignSystem.swift:391-398 \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 \u0060leanring-buddy/DesignSystem.swift:349\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":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"6295368670cb6e94ba6e717e60254e8e25ca69d659d6d7e90cfe4636aadfbf2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 4): leanring-buddy/DesignSystem.swift:352-357 | leanring-buddy/DesignSystem.swift:394-399 | leanring-buddy/DesignSystem.swift:466-472 | leanring-buddy/DesignSystem.swift:520-526 \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 \u0060leanring-buddy/DesignSystem.swift:352\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":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04fc31bc4dd7beb25751d69b006617d57cd11341075ef7ee550b16660a067e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): leanring-buddy/ClaudeAPI.swift:147-153 | leanring-buddy/ClaudeAPI.swift:257-263 | leanring-buddy/OpenAIAPI.swift:105-111 \u2014 before extracting anything, compare \u0060leanring-buddy/ClaudeAPI.swift\u0060 and \u0060leanring-buddy/OpenAIAPI.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/ClaudeAPI.swift:147\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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11a2de1e27cb143672022df9d33ecb54b2a4fec6e2ef31fee25893453777215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): leanring-buddy/ClaudeAPI.swift:215-221 | leanring-buddy/OpenAIAPI.swift:50-56 \u2014 before extracting anything, compare \u0060leanring-buddy/ClaudeAPI.swift\u0060 and \u0060leanring-buddy/OpenAIAPI.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060leanring-buddy/ClaudeAPI.swift:215\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":"leanring-buddy/ClaudeAPI.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a14afda5e630151d61e79efd3a7e876816d3e2f00340016f7391b2a316938d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): leanring-buddy/DesignSystem.swift:354-360 | leanring-buddy/DesignSystem.swift:396-402 | leanring-buddy/DesignSystem.swift:434-440 | leanring-buddy/DesignSystem.swift:469-475 | leanring-buddy/DesignSystem.swift:523-529 \u2014 all 5 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 \u0060leanring-buddy/DesignSystem.swift:354\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":"leanring-buddy/DesignSystem.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd5f19bdc17b950236c7a0087b45d3b09a1342ca314644d2e28158b4b92ffdaf"}},{"ruleId":"D10","level":"error","message":{"text":"Assertions commented out: testExample: The test body contains commented-out assertion calls and no live one \u2014 it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddyUITests/leanring_buddyUITests.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"5119fa5e128b0a93cf366f71dd91b7e483484e522990f741064d7ac200b9b008"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testLaunchPerformance: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddyUITests/leanring_buddyUITests.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"303b99c79b54755b64a792208278a66412ff89323f1c3539d8ca7dba2f7db5e2"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testLaunch: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddyUITests/leanring_buddyUITestsLaunchTests.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf58e0966f7a16c8444c68cb0e1e02bc82d0f17e73308a1a7ebb6e7e8ef90c3"}},{"ruleId":"D10","level":"error","message":{"text":"Test project verifies nothing: leanring-buddyUITests: No conventional assertion call was detected in 3 of 3 tests in \u0060leanring-buddyUITests\u0060 \u2014 the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off \u2014 it is not an approval/verifier harness."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddyUITests/leanring_buddyUITests.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e95758460768daa37e0392292d1f469ad199ffee62ae57bd3d29f41c5d3e9ce"}},{"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 \u0060leanring-buddy.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"leanring-buddy.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41d1f3c4b899cca06d540e315b5fd610a8a47271e392d71cad64c96332a285c2"}},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c115e5635d4309c5457f86f92f713ca82ee3b7897b5a28016b3e9dfc717623f0"},"taxa":[{"id":"CWE-209","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A10:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8698b257839efe132a8e2b91b9ce36760aab7cec383e7ddd810ff04eadfdb5f8"},"properties":{"dependency":{"package":"@fastify/busboy","version":"2.1.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6e66fa4ff6c95011031d0a5c3240352e524e9df630c0f8a54006550a8bc679f3"},"properties":{"dependency":{"package":"sharp","version":"0.33.5","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6e1b1640c036aa67288711d0d77e853f7eaeaaf5cc9f2ee9886cc3ea2d813df5"},"properties":{"dependency":{"package":"undici","version":"5.29.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e7dd14d70b550b18ed064b78c32a135d823373bdc70f2e860250f8c1e41f22f1"},"properties":{"dependency":{"package":"ws","version":"8.18.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"610c5b478c1bb87564e3cc100b2fefccbfea0f0be90b28cda9aa4ce6c93b7fdb"},"properties":{"dependency":{"package":"zod","version":"3.22.3","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"1bae76000bfdd38d0140ae3f596236164edae293317863fe8f843848ee91309d"},"properties":{"dependency":{"package":"github.com/sparkle-project/Sparkle","version":"2.9.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"512fe9841d57797e2096e8ed758604dba54609c1f6a474dbcf372707cc756faa"},"properties":{"dependency":{"package":"esbuild","version":"0.17.19","advisory":"[GHSA redacted]","reachability":{"kind":"not-imported"}}}},{"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":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging call was found in the 23 Swift, JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem\u0027s logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Swift: os.Logger/os_log/NSLog, swift-log, CocoaLumberjack, SwiftyBeaver, XCGLogger) and for a call on a receiver named \u0060log\u0060/\u0060logger\u0060 (or ending in \u0060Logger\u0060/\u0060_logger\u0060) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read \u2014 this is \u0027no logging found by this walk\u0027, not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose."},"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) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060worker/package.json\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"worker/package.json"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ce5472cb7f817c804cce23b47054761092215bf21cb41f1d1fff7ead780a9e1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!companionManager.hasCompletedOnboarding || !companionManager.allPermissionsGranted\u0060 appears character-identically in 2 files \u2014 leanring-buddy/CompanionPanelView.swift, leanring-buddy/leanring_buddyApp.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":"leanring-buddy/CompanionPanelView.swift"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"5775869edc2c94c56f1c54e2a27719de35b145081c7e43ede1db3eccc94b0f67"}},{"ruleId":"X5","level":"note","message":{"text":"Strict null checking is not enabled everywhere the repository type-checks: This repository commits no tsconfig, so whatever type-checks it uses tsc\u0027s own defaults, in which \u0060strict\u0060 and \u0060strictNullChecks\u0060 are OFF: \u0060string\u0060 admits \u0060null\u0060 and \u0060undefined\u0060, and a value that is null is compiled through to the property access that throws. If the build passes \u0060--strict\u0060 on a command line instead, put it in a committed tsconfig \u2014 this check reads configuration, and configuration is all it can read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8870f9ff7b17c2e14c5ba3bc13137b94673aad0b9498438c572dabb049852943"}}],"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-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-209","guid":"da28ecd2-f5c1-7852-ac41-a93b2d668c73","name":"Generation of Error Message Containing Sensitive Information","shortDescription":{"text":"Generation of Error Message Containing Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/209.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-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"},{"id":"A10:2025","guid":"9ca3ab55-ca61-fd5e-b9ab-3dad2efa59d0","name":"Mishandling of Exceptional Conditions","shortDescription":{"text":"Mishandling of Exceptional Conditions"},"helpUri":"https://top10.owasp.org/2025/A10_2025-Mishandling_of_Exceptional_Conditions/"}]}],"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":8,"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."]}]}