{"$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":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"AC1","name":"Text alternatives","shortDescription":{"text":"Text alternatives"},"helpUri":"https://codehealth.canine.dev/dimensions/AC1"},{"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":"AC4","name":"Keyboard semantics","shortDescription":{"text":"Keyboard semantics"},"helpUri":"https://codehealth.canine.dev/dimensions/AC4"},{"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":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"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":"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":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"S1","name":"Web-Security Posture","shortDescription":{"text":"Web-Security Posture"},"helpUri":"https://codehealth.canine.dev/dimensions/S1"},{"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":"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":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"Settings.loadFromDisk (cyclomatic 39): Settings.loadFromDisk has cyclomatic complexity 39 (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":"src/AutoSRT/Models/Settings.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"81075c525a7d031bc0877ad2e8e577ea4736cdabe5c6fd42e0aa2849ab9b7030"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenaiService.chat (cyclomatic 25): OpenaiService.chat 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":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"428499f01e2f90339a97638ec4f9c4821e470fac8ea5ec0a5fedc42d6f4792ad"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService.downloadModel (cyclomatic 23): DownloadService.downloadModel has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/DownloadService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b8a5443a26d0396ac4d7c2471bba295843cc5db4eeeb0e59ff5a7cc79ddb42"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenaiService.chatStream (cyclomatic 22): OpenaiService.chatStream has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"f22d68f8d6748c564816f3ba1034cbcfb574e53b629c92d5ca20f450da2a47fa"}},{"ruleId":"D1","level":"warning","message":{"text":"SubtitleItemView.body (cyclomatic 22): SubtitleItemView.body has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"a696f04bd181dbf2a18b29e40b7cce8823f6eae82c3755335c91133b1444c802"}},{"ruleId":"D1","level":"warning","message":{"text":"EditProviderView.body (cyclomatic 21): EditProviderView.body 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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"479ee45596fff2f9a295abd8cc98cba1573e7edd5bfabe11118982942f8f26c1"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoServiceSettingsView.body (cyclomatic 20): VideoServiceSettingsView.body has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"d43b9fcfaa9c76a0fede1ad89fb47a810fe26118874bebe43679bd7f716e4df2"}},{"ruleId":"D1","level":"warning","message":{"text":"AddProviderView.body (cyclomatic 20): AddProviderView.body 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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d34ff775a3b04beae1dc851cc5e8497fea11a5d5364e2cd8f47fecff4e51a2c"}},{"ruleId":"D1","level":"warning","message":{"text":"OllamaService.chatStream (cyclomatic 19): OllamaService.chatStream 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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"b81fe575c031351d26c29dccd8d159acdda500d103026748bf1fbb60d888175f"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMessage.== (cyclomatic 17): ChatMessage.== has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Models/ChatMessage.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"6037a71602ea3f5baa196fde40e8921815c34574c4f193b647c1dbef1d1e220f"}},{"ruleId":"D1","level":"warning","message":{"text":"WordService.detectLanguage (cyclomatic 17): WordService.detectLanguage has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d6a396d483a25994feca683c68164b4b94c25b385f81fdb6b809812420ae50"}},{"ruleId":"D1","level":"warning","message":{"text":"WordService.getSimilarSentences (cyclomatic 17): WordService.getSimilarSentences 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":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a822a8eac3b6e1d62d422ba59ffa6d4989bee613e6b2e17de73fdfc807946e"}},{"ruleId":"D1","level":"warning","message":{"text":"WordService.importSubtitles (cyclomatic 16): WordService.importSubtitles 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":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"239e676858a7768851371b779d6737f51b308a9854d27c30dfef7c558e1cb7bb"}},{"ruleId":"D2","level":"warning","message":{"text":"Settings.loadFromDisk (cognitive 126): Settings.loadFromDisk has cognitive complexity 126 (threshold 15). Drivers by points: if/else 30 (117 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 90). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Models/Settings.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd6148434ba92738404063d00644bb280bbde96b473391a5cd32ccd13049063"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService.downloadModel (cognitive 60): DownloadService.downloadModel has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (43 pts), ternaries 3 (9 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/DownloadService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2aed1a8cb0d67f28a17e6905a0ac6f1468c76f099d77112a589797477cfffe2"}},{"ruleId":"D2","level":"warning","message":{"text":"EditProviderView.body (cognitive 47): EditProviderView.body has cognitive complexity 47 (threshold 15). Drivers by points: if/else 28 (47 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3706e1948e4e8b1b4f6a8a5f1f4199bb19843a2d3f0e51c226f44ba3e6c7063"}},{"ruleId":"D2","level":"warning","message":{"text":"AddProviderView.body (cognitive 45): AddProviderView.body has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27 (45 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca45632157ea497e63b3fb01ba25808da9ac6955372ec79999445f3199852bd"}},{"ruleId":"D2","level":"warning","message":{"text":"OllamaService.chatStream (cognitive 39): OllamaService.chatStream has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (5 pts), boolean chains 4, error handling 1 (nesting depth added 20). 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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a4e1673249c523ef92cdaa8d3b61f20c3edab2cacc3e74eabd8d2c697c9246"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenaiService.chatStream (cognitive 36): OpenaiService.chatStream has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 10, loops 2 (5 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1f5d6213deb4d203de5bd5e78e1cca827c2b7c6898cd39a1d4648145ee06fc"}},{"ruleId":"D2","level":"warning","message":{"text":"WordService.getSimilarSentences (cognitive 35): WordService.getSimilarSentences has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (6 pts), ternaries 3 (5 pts), boolean chains 4 (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":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa35f0464deb798df551fb808156ab0c03f21680adbc04271173ef7a9d085fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenaiService.chat (cognitive 29): OpenaiService.chat has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 12 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"3afe7be83ab252419f65140bfae21b152d741f870e2f88af56c213ac5b0c697c"}},{"ruleId":"D2","level":"warning","message":{"text":"SummaryService.splitIntoChunks (cognitive 28): SummaryService.splitIntoChunks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (5 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":"src/AutoSRT/Services/SummaryService.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d220643c44b98c3c0079504a875f1a85829f59af9605825c1ae2c86e1bba2c07"}},{"ruleId":"D2","level":"warning","message":{"text":"WordService.textToSentences (cognitive 26): WordService.textToSentences has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":815}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92d32815b1b685e28ed24895cd21e9143db41d3948d3539500d25623be3251b"}},{"ruleId":"D2","level":"warning","message":{"text":"TranslationService.translateSubtitles (cognitive 24): TranslationService.translateSubtitles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (6 pts), ternaries 2 (6 pts), loops 2 (3 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":"src/AutoSRT/Services/TranslationService.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"5515dbe8b9f1fecf1f4b7b74575b7f219131dd4f67f45adb0b0423a9518f2aed"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperService.extractAudioNative (cognitive 22): WhisperService.extractAudioNative has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"6187bc1746b910bf87b0ee8a010caf3b2b7779c0567730c70d4361df3c09fe0a"}},{"ruleId":"D2","level":"warning","message":{"text":"OllamaService.listModels (cognitive 21): OllamaService.listModels has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7aee60aa5d11450c2dd39f0ac826b2adf52ee52446d2a35a5fd5beb30524c75"}},{"ruleId":"D2","level":"warning","message":{"text":"OllamaService.pullModel (cognitive 21): OllamaService.pullModel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba56d3877ad154d11e7885fbf0dfa660baad834b5910d52dff7836f4fa35ddf"}},{"ruleId":"D2","level":"warning","message":{"text":"WordService.parseWordDocument (cognitive 21): WordService.parseWordDocument has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4334f99a308626db680eac3d5670c4a80365d30090dd0927dcb5ec7b0a1d9f6"}},{"ruleId":"D2","level":"warning","message":{"text":"SubtitleItemView.body (cognitive 21): SubtitleItemView.body has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9, boolean chains 7, if/else 5. 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":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"51200f0e74a652b15c98da9a26fbfb533cf4b60e24b56341f2c7bbe7d4ff340a"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenaiService.listModels (cognitive 20): OpenaiService.listModels has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc31ef5cd7ed10cd094a655b260958a6fe800fd8a7135a0000a926feff9c4c46"}},{"ruleId":"D2","level":"warning","message":{"text":"WordService.importSubtitles (cognitive 20): WordService.importSubtitles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, 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":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"06aaa60ea6ead95b7ffc117bff942b3241c35f4e2360add30d908fe7ef7f745d"}},{"ruleId":"D2","level":"warning","message":{"text":"SubtitleViewModel.updateCurrentSubtitleIndex (cognitive 20): SubtitleViewModel.updateCurrentSubtitleIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). 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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e7e097ef363dc4d1f270bfecbb17200da2faa256d57026500c9fe66e3af9ba3"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoServiceSettingsView.body (cognitive 20): VideoServiceSettingsView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 5, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"88bd1ca971a024436dae543f17f380a597e7d8aed688b07b1a873d30e8c4afc7"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperService.parseSRT (cognitive 19): WhisperService.parseSRT has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca5908fd21d3d88b882515d785e3e46d84e6327a491d64ada37258bbfa79d1c"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenaiService.generateCompletion (cognitive 18): OpenaiService.generateCompletion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"2563783477ea9cf61e0063e1d65fbddef799fdfe2cef5bae2b0c45992d567f93"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoService.renderSubtitledVideo (cognitive 18): VideoService.renderSubtitledVideo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/VideoService.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"f11b4d8e5b7191f87c97f893f0bc963ff9f9c02d0359b8bf7c4f710c2b79e885"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMServiceFactory.extractJSONs (cognitive 17): LLMServiceFactory.extractJSONs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (nesting depth added 10). 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":"src/AutoSRT/Services/LLMService.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a36323184c36df02afa47a969e1d29374d27da0209052859a0c965ca636c5c7"}},{"ruleId":"D2","level":"warning","message":{"text":"WordService.detectLanguage (cognitive 17): WordService.detectLanguage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1d03172da28b8e1aeffdedbfcfc142855ab57e04491502a22eb3b37d6a3a17"}},{"ruleId":"D2","level":"warning","message":{"text":"KeyboardShortcutModifier.body (cognitive 17): KeyboardShortcutModifier.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1 (nesting depth added 9). 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":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3a20503885cecc9757e4fb458fb63717fd5f3346dacc5fad80be2530a24e51"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMessage.== (cognitive 16): ChatMessage.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Models/ChatMessage.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"038a3ce374d66f13b95c6a71e527b22d2fcb30858f19292659bd7511f59b7b0e"}},{"ruleId":"D2","level":"warning","message":{"text":"OllamaService.generateCompletion (cognitive 16): OllamaService.generateCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c123de054d9ef1a92879856fca64d427771c6fcee209d80c7dc6d6d75f3be5"}},{"ruleId":"D2","level":"warning","message":{"text":"SubtitleViewModel.restoreState (cognitive 16): SubtitleViewModel.restoreState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 2 (4 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"b88c351f7d6a56b0f4d2642234d6b73e8c9abe4473c08fdb3234dfe19671a5ef"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SubtitleViewModel: ClassTooLong \u2014 817 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 417 over it, 2.04\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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42c5f79a717115776dadb0f480e441c30f64aa5b0ac66b23bb10bc00739e945"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/SettingsView.swift: FileTooLong \u2014 938 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 438 over it, 1.88\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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"506ec2f5c4d810d82033f8ef13fe7d8dc08f6fca38e8be5880134905fea0ba6b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: VideoServiceSettingsView.body: MethodTooLong \u2014 body runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"83772eae8594c5ca4418c3d88adfce5da0ddfaae294ba92b88b783ed90604735"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DownloadService.downloadModel: MethodTooLong \u2014 downloadModel runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/DownloadService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df05bd39ca2dbde76a7a377fc290048650ed14570f8ff5c2ccd8110008357df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ViewModels/SubtitleViewModel.swift: FileTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SubtitleViewModel (9-1230). The bar is 500 significant lines; this is 324 over it, 1.65\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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72bfcae85b60aa8f96c3225967ecbaaf3ca5c45bd4d3bc122eeda6fe120e501"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WordService: ClassTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 156 over it, 1.39\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"1104bc31c99b98824f3805b060a5edad0543181b950c83ab1407d3ed1f671530"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SubtitleViewModel: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"a08d6475a06c881886a8fa715dd1e747ae1e1eba4d2ecd1e0c2143834a912fd9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EditProviderView.body: MethodTooLong \u2014 body runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"f45f8c07dd67fa7de40d970e784b8dbb6f3fd5fb16c298970f0de183042a7d64"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AddProviderView.body: MethodTooLong \u2014 body runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"63578edb50313744674c689ad635ca423d7fb25414ee0858922acdb6c27a79fe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SubtitleItemView.body: MethodTooLong \u2014 body runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67453e93b0ebfd68004788da841054b96f2092c52fe62d33682f8f6387750ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/WordService.swift: FileTooLong \u2014 576 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: WordService (28-916). The bar is 500 significant lines; this is 76 over it, 1.15\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":"src/AutoSRT/Services/WordService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81722096da7c89e33eac992b10f98646b323ae1881d1c4d717cb4fa1a96ba706"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: VideoService.renderSubtitledVideo: MethodTooLong \u2014 renderSubtitledVideo runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/VideoService.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ad5912d839d75e4362e72321b9b39a503272f870c1f1d32deaf3786235f425"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SubtitleViewModel.generateSubtitles: MethodTooLong \u2014 generateSubtitles runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"d048e0338f6eeddae55b1a15bc7496bd2dc22472322d9e649af39d7dba3cc957"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SubtitleViewModel.renderVideoWithSubtitles: MethodTooLong \u2014 renderVideoWithSubtitles 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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b596973c07b541c620a81db155ce83024f94c67849b29e5e5cb546756b7731"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WhisperService: ClassTooLong \u2014 415 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 15 over it, 1.04\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":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"2021cb6b03a26c6c4b40e13d944ee659d9731fc30af4d3f1422c6e1be98457ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (107 shared lines): src/AutoSRT/Views/SettingsView.swift:852-1030 | src/AutoSRT/Views/SettingsView.swift:1112-1296 \u2014 These two members are variants of one another: 107 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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd01372b24c63b78abd29160a3d39d27910aef1a7e48f61df54369483984cd0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): src/AutoSRT/Services/OllamaService.swift:71-141 | src/AutoSRT/Services/OllamaService.swift:143-274 | src/AutoSRT/Services/OllamaService.swift:276-375 | src/AutoSRT/Services/OllamaService.swift:418-491 | src/AutoSRT/Services/OllamaService.swift:493-580 | src/AutoSRT/Services/OpenAIService.swift:65-140 | src/AutoSRT/Services/OpenAIService.swift:144-256 | src/AutoSRT/Services/OpenAIService.swift:279-397 | src/AutoSRT/Services/OpenAIService.swift:399-473 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a6b60765672f8919dd21f526919f45048a87f2bb2c63d7e79099efa5a131c9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): src/AutoSRT/Services/OllamaService.swift:51-68 | src/AutoSRT/Services/OpenAIService.swift:40-62 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f6e0ef671aa4b7d7ded48502fef90c549631dfa1a37f092a7d99d8a32c88c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): src/AutoSRT/Services/WhisperService.swift:394-408 | src/AutoSRT/Services/WordService.swift:440-453 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bffef695c3fd35b2ad0aa9de78e5ca06ce3c48076a8a69559abb2ad526ab340"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): src/AutoSRT/ViewModels/SubtitleViewModel.swift:626-632 | src/AutoSRT/ViewModels/SubtitleViewModel.swift:634-640 \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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"635e2e4cad6bf4c11712d5717df85b58d62bcee902e2b249b16f1b9f918fc644"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): src/AutoSRT/Services/DeviceService.swift:10-23 | src/AutoSRT/Services/DeviceService.swift:26-37 | src/AutoSRT/Services/DeviceService.swift:40-51 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/DeviceService.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"c852e8314264be1452613b70a891d98a2345c830c6d453c50d8269df200cac6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): src/AutoSRT/Models/ChatMessage.swift:97-103 | src/AutoSRT/Models/Settings.swift:262-269 \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":"src/AutoSRT/Models/ChatMessage.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f4cea93479dc50f7c41a99fb800475ee402f623cac69126dbbd83ec7fd7c8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): src/AutoSRT/Views/SubtitleEditView.swift:512-523 | src/AutoSRT/Views/SubtitleEditView.swift:525-536 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5534bfa3a4ef8baba93a8051c6cfb3ea7bf4982ccd5e0e8045f62d61f370304"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): src/AutoSRT/Services/OllamaService.swift:34-36 | src/AutoSRT/Services/OpenAIService.swift:23-25 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f8113a3996ab32b46e3df4a267e64a091aba777b60babbe11d51224d2e3ef7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46\u201347 lines \u00D7 4): src/AutoSRT/Views/SettingsView.swift:871-916 | src/AutoSRT/Views/SettingsView.swift:918-964 | src/AutoSRT/Views/SettingsView.swift:1128-1173 | src/AutoSRT/Views/SettingsView.swift:1175-1221 \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 \u0060src/AutoSRT/Views/SettingsView.swift:918\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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"787b081b26f2d5b97770f77b7092787e020ce0f612d85431d3ce75546503ab8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201333 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:213-245 | src/AutoSRT/Services/OpenAIService.swift:193-224 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:213\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2793151f940d86a91807bc4277fac3ce823cd8078655587fd8bc52938d307a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): src/AutoSRT/Views/SettingsView.swift:1054-1086 | src/AutoSRT/Views/SettingsView.swift:1320-1352 \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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e5a4bf3d38365c5999aeca2fdc9813fa228a9162bbe5a2225c75c9a67f27c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 3): src/AutoSRT/Services/OllamaService.swift:197-220 | src/AutoSRT/Services/OllamaService.swift:513-536 | src/AutoSRT/Services/OpenAIService.swift:177-200 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:197\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2971aa762f7a026ede512d2af2a77ac09eb78b5314cc26e4cb9599d3e1c3fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): src/AutoSRT/Views/SettingsView.swift:1032-1052 | src/AutoSRT/Views/SettingsView.swift:1298-1318 \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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"86786b5978a2c7914f025eafb114045bceae0641adbaa920b133d1305a03ea3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): src/AutoSRT/Services/DownloadService.swift:202-221 | src/AutoSRT/Services/DownloadService.swift:239-256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/AutoSRT/Services/DownloadService.swift:200\u0060 calls \u0060removeAll\u0060 and \u0060src/AutoSRT/Services/DownloadService.swift:237\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":"src/AutoSRT/Services/DownloadService.swift"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"5edb0e1627d3197534cabe4f7d81941992528e70e3281b743f295761babfdc13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 2): src/AutoSRT/Services/WhisperService.swift:568-586 | src/AutoSRT/Services/WhisperService.swift:630-645 \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 \u0060src/AutoSRT/Services/WhisperService.swift:568\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/AutoSRT/Services/WhisperService.swift:629\u0060 calls \u0060isSuccess\u0060 and \u0060src/AutoSRT/Services/WhisperService.swift:565\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":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a16d3d8344ee13507dc509e7b146672f29a2319ea6d270d410b25c699df529"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 5): src/AutoSRT/Services/OllamaService.swift:97-113 | src/AutoSRT/Services/OllamaService.swift:431-447 | src/AutoSRT/Services/OpenAIService.swift:90-107 | src/AutoSRT/Services/OpenAIService.swift:327-342 | src/AutoSRT/Services/OpenAIService.swift:414-430 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:97\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8e023eb6f5e472c39427bf5b2d6fc65e2e2ac6f780385c370711e82e4087e32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src/AutoSRT/Views/SettingsView.swift:470-486 | src/AutoSRT/Views/SettingsView.swift:494-510 \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 \u0060src/AutoSRT/Views/SettingsView.swift:470\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3560922468a6745a6d04a96e59fa702f446769be5badd7cc93cc1681d24e89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:168-183 | src/AutoSRT/Services/OllamaService.swift:303-318 \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 \u0060src/AutoSRT/Services/OllamaService.swift:168\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37be9a18261db7502dcf810d131eb63e7d2a83a45bede58b563b410bd89eec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src/AutoSRT/ViewModels/SubtitleViewModel.swift:574-588 | src/AutoSRT/ViewModels/SubtitleViewModel.swift:591-605 \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":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6cac0dc35f10095289104a1fe9de07dac2fec01062db7231a52acb3bf2c4513"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src/AutoSRT/ViewModels/SubtitleViewModel.swift:1200-1214 | src/AutoSRT/Views/SettingsView.swift:680-694 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a47ce89c7efeb5be4c5b787d473f55975d6f0b555160cb7cec5b0b19da61da9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src/AutoSRT/Views/SummaryView.swift:98-112 | src/AutoSRT/Views/SummaryView.swift:125-139 \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 \u0060src/AutoSRT/Views/SummaryView.swift:98\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":"src/AutoSRT/Views/SummaryView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"86a224b0b4c6d45a37dcc6a341caba1de6e17ee003d9cdd9a17e637b67ed4586"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 7): src/AutoSRT/Services/OllamaService.swift:109-122 | src/AutoSRT/Services/OllamaService.swift:345-358 | src/AutoSRT/Services/OllamaService.swift:443-456 | src/AutoSRT/Services/OllamaService.swift:532-545 | src/AutoSRT/Services/OpenAIService.swift:103-116 | src/AutoSRT/Services/OpenAIService.swift:338-351 | src/AutoSRT/Services/OpenAIService.swift:426-439 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:109\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, \u0060src/AutoSRT/Services/OllamaService.swift:342\u0060 calls \u0060finishTasksAndInvalidate\u0060 and \u0060src/AutoSRT/Services/OllamaService.swift:106\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1d8cc1f4f87d73e34b1ea30fc32e45cd31f03da520deb767b529860e7e1e58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/AutoSRT/Views/SettingsView.swift:966-979 | src/AutoSRT/Views/SettingsView.swift:1240-1253 \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 \u0060src/AutoSRT/Views/SettingsView.swift:966\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/AutoSRT/Views/SettingsView.swift:1238\u0060 calls \u0060dismiss\u0060 and \u0060src/AutoSRT/Views/SettingsView.swift:964\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":"src/AutoSRT/Views/SettingsView.swift"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"a811f82193f3398702a497f13e349f4dcf45a97cd3b3a0c0da3ba40d5f88b8ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/AutoSRT/Views/SubtitleEditView.swift:605-618 | src/AutoSRT/Views/SubtitleEditView.swift:659-672 \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 \u0060src/AutoSRT/Views/SubtitleEditView.swift:605\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":"src/AutoSRT/Views/SubtitleEditView.swift"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"89484896a4d0c0a8bdf03ecfd3bdb6cdf81892b05459945c2d8322cccedcb36a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 9): src/AutoSRT/Services/OllamaService.swift:115-125 | src/AutoSRT/Services/OllamaService.swift:222-234 | src/AutoSRT/Services/OllamaService.swift:351-361 | src/AutoSRT/Services/OllamaService.swift:449-461 | src/AutoSRT/Services/OllamaService.swift:538-548 | src/AutoSRT/Services/OpenAIService.swift:109-119 | src/AutoSRT/Services/OpenAIService.swift:202-214 | src/AutoSRT/Services/OpenAIService.swift:344-354 | src/AutoSRT/Services/OpenAIService.swift:432-444 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:115\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c466b4031f65975045a067809a9358fbac90c419af2e2a5d2e7ab126661a34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/AutoSRT/ViewModels/SubtitleViewModel.swift:1217-1229 | src/AutoSRT/Views/SettingsView.swift:696-708 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/ViewModels/SubtitleViewModel.swift"},"region":{"startLine":1217}}}],"partialFingerprints":{"codehealthFindingId/v1":"125da97734397d4220f2fbb0577580437d7b2132a6f7fcc5b11db1f5a28bb7f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:71-82 | src/AutoSRT/Services/OpenAIService.swift:65-76 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:71\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"060e00ad8790aa5ed58843c2320088f96c67ff0a840b199f60986aa3214941fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/AutoSRT/Services/OpenAIService.swift:151-162 | src/AutoSRT/Services/OpenAIService.swift:288-298 \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 \u0060src/AutoSRT/Services/OpenAIService.swift:151\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":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb42221ab1510481be937284b8637da137e8bab454ac0ccd6e9f45641df764a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/AutoSRT/Services/TranslationService.swift:46-57 | src/AutoSRT/Services/TranslationService.swift:129-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/TranslationService.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"efda644294db04c08aac7b0bb24c927c15ca9edf0ac9ff58836d93ce62e36b29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/AutoSRT/Services/TranslationService.swift:60-70 | src/AutoSRT/Services/TranslationService.swift:146-156 \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 \u0060src/AutoSRT/Services/TranslationService.swift:60\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060src/AutoSRT/Services/TranslationService.swift:71\u0060 calls \u0060progressCallback\u0060 and \u0060src/AutoSRT/Services/TranslationService.swift:157\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":"src/AutoSRT/Services/TranslationService.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"63966149fa45293f17b360d339ad8f0672746e0bc059bb06179ea3687c212ac4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/AutoSRT/Services/WhisperService.swift:398-408 | src/AutoSRT/Services/WordService.swift:443-453 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/AutoSRT/Services/WhisperService.swift:398\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed9525dd28126ca1e61b60da0838e71462aa6b8bb07f2396b9fe267f7bb0124"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src/AutoSRT/Services/OllamaService.swift:285-293 | src/AutoSRT/Services/OpenAIService.swift:151-160 | src/AutoSRT/Services/OpenAIService.swift:288-296 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:285\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, \u0060src/AutoSRT/Services/OpenAIService.swift:297\u0060 calls \u0060setValue\u0060 and \u0060src/AutoSRT/Services/OllamaService.swift:295\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"f46b63ffa1b81ddceebcef31d6cb0ac1a3aca41e3cd058eb94aa83f8f0ca4519"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:284-292 | src/AutoSRT/Services/OllamaService.swift:420-427 \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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b5b2278a25120575b50bd93c73111ec6e2b81a2042aca53b6f06876dee3ecd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/AutoSRT/Services/OpenAIService.swift:224-231 | src/AutoSRT/Services/OpenAIService.swift:239-246 \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 \u0060src/AutoSRT/Services/OpenAIService.swift:224\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":"src/AutoSRT/Services/OpenAIService.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"5676cffa31964cdb943788b6618b6a96c3e2d017558b7cbd8d18b129acfcceab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:385-389 | src/AutoSRT/Services/OpenAIService.swift:376-380 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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 \u0060src/AutoSRT/Services/OllamaService.swift:385\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a820e3e1ba50b0697458aae8c47f38ba4066bdc3f5ef13703bc9d0ecb5869b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/AutoSRT/Services/OllamaService.swift:38-48 | src/AutoSRT/Services/OpenAIService.swift:27-37 \u2014 before extracting anything, compare \u0060src/AutoSRT/Services/OllamaService.swift\u0060 and \u0060src/AutoSRT/Services/OpenAIService.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 140 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060timeout\u0060 to \u0060TimeInterval = 0\u0060 in one and \u0060Double = 0.0\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":"src/AutoSRT/Services/OllamaService.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d8a720bdf5eb6b26f6d98542a6a5ed073f403f64a9e18c3eb9a778080cc08b8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 4): AppDelegate\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT/App/AppDelegate.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"176c004b40b2f556a16d33c60725547fc43abc13d03117e85781c8802f203644"}},{"ruleId":"D13","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace25e68ec8aaa9cf25cbd6b97c8923f77e086b582af311a219e78cb191e2048"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"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 \u0060src/AutoSRT.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/AutoSRT.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bba86e7976a50ef4d074aeb2851f23dc0ccf13c583b21ca22ba9a08ad517aeba"}},{"ruleId":"D28","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":"7e51016f6e4e70dffa628e0e1e8c31db92c0f7951bc0723315d42225e13ee0ba"},"properties":{"commitSha":"fbf113042e227d6eb43a278482e52ec46e8b9799"}},{"ruleId":"D28","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":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"AC1","level":"warning","message":{"text":"\u003Cvideo\u003E without a captions track: Video with no captions \u003Ctrack\u003E offers no captions. Add a \u003Ctrack kind=\u0022captions\u0022\u003E pointing at a WebVTT file for this video (or confirm captions are provided another way)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9ec7a3df3d1a95eef9e465d145324e72880c7aa82427163e0a0e70d11a58a5d"}},{"ruleId":"AC1","level":"warning","message":{"text":"\u003Cvideo\u003E without a captions track: Video with no captions \u003Ctrack\u003E offers no captions. Add a \u003Ctrack kind=\u0022captions\u0022\u003E pointing at a WebVTT file for this video (or confirm captions are provided another way)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc0cfc0f526ba4718b8a1410c8f9cfc3127659707b6538233e1346e931e7151f"}},{"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":"ai-transcription-tool.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc969be96f99b91fb09705bfbf2f204d15e92b3474ec61a29d2dd8ee0593588"}},{"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":"automatic-subtitle-generator.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"c34f74cd1848dfe18775385553e16b18a2375189079175af789b979ecb912b66"}},{"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":"blog.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab26829f02acc7d8098cdd01423a04edb340062fd822e2cc2aaddd1bee5ec843"}},{"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":"how-to-add-subtitles-automatically.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5cd9abafd0e72173d0e4fa2b88018f4bae793cee8a2a80ce98dd66d65a989f"}},{"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":"index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"732c4587b5831e9d9da4b05f6bb12d9a8a817ddcc0ff07809f91bca0b3a52697"}},{"ruleId":"AC3","level":"warning","message":{"text":"Heading level jumps from h1 to h3: Skipping heading levels breaks the document outline assistive tech relies on. Don\u0027t jump levels \u2014 increase by at most one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e38c24c725712d743c6f94327cd4370e64c00789cef0cd528ae121abfcdc44b"}},{"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":"index_zh.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"769f1aeacf979ae27010744d8bf8e5c5a87903b047f2f54011e52905bed57dbc"}},{"ruleId":"AC3","level":"warning","message":{"text":"Heading level jumps from h1 to h3: Skipping heading levels breaks the document outline assistive tech relies on. Don\u0027t jump levels \u2014 increase by at most one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbbbeffa9495befac945bbac0bce822e8b8718df8d3913c023dfe565a7b27b51"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":861}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bce5723cde77e80d33241bff8e76fc1b869a9dd2620ead99e7f896c23c1577"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b1c3d820d9e9e32560ed3a5cf60eaf2ec10e70ebd03a3a2f15e68208c8f57a"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2e219a28af18ac9184f7b67752948b3b282a8f0b3b5f31a96f24b0de655cfe"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3abfa689e57c741e73e98e00c84aa8e32613f757bc11f399089a1d95a3b8d8"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"35bd55264dba72d89a5e52990e698e1a8156cc9df0fde350a2c85825f043d233"}},{"ruleId":"AC4","level":"warning","message":{"text":"Anchor without href: An \u003Ca\u003E with no href, role or tabindex isn\u0027t focusable or keyboard-activatable. Give it a real href, or use a \u003Cbutton\u003E for an action."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"d102acd618537fb60f3f6e0785b6217a608b282ccc7647d724af003bbecb32c7"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.cta-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ai-transcription-tool.html"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17192cbd68af5b5bc50301b1f906fa733e7fdfecee3528b6f0ff4e997047def"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.cta-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"automatic-subtitle-generator.html"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2169cff67569d699cfb714462863ed9f03cd001a40f4b1b1c125241763ec363"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.blog-card\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"blog.html"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"906c5f0aba4d43fc3164f4f17ed3754c3c8e27019bbf360e6a29cddd92fa618f"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.step-number\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"how-to-add-subtitles-automatically.html"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a8690678bf8181e22410e100c391c0b2ce5952e24f8b5aa6dad88dccd264ac7"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.cta-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"how-to-add-subtitles-automatically.html"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8f07126519a4541d00a180d8398c36e80baa683223658dc13a4605ba49cb58b"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.santa-sleigh\u0060 moves (\u0060animation: flyAcross 10s linear infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6f14669143271a616754ffc9c72d4b616315e9f82edb566760e7266f949164"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060header::before\u0060 moves (\u0060animation: snow 10s linear infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dfe9a62f22ae75a058921aba0f3bcdc5ba589f0633d6e9a99ff0a24cf52f697"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.feature-card\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3710e5b8512332193d870384cd86af851199ad91320c4e6a6fa3132d83b7163"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.screenshot-item\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35f1cae531b1ac3418f737b587015a70c6ba05b14d96baeb082cd37909e094c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.donation-method\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe64801e2b8a6507dcd94e4fff3b766a95cd6ed18e7fb3b3ccf56e40babfeb3c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.blog-card\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"c974f5b77f8d2cb0dde2da1e984933b26fb4e0e1f0fde2f5f834b9a68bae9425"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.github-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c73f1b091d193988c15639f26edf4051b6d81b493c23ab7ae837549612c9d84b"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.language-button, .github-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"680ea6139e112e7ad86a8c6bde117175c448dd70da16d2a21604fdcdd1c5677b"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.hot-news-badge\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af3f15e0ebf915bd49716a185ee22ced8f729de439e891ad04767529bfd0580"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.cta-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"858a4087464a69f10091313ceb4a8aa9f272d54262b06e1a811e9ead29ef03ef"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair (3.3:1): The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f96a148cb3233d0f51d1cd5c7f1a534b12ad92b22c5e4c1ed1f2bc196200dbc"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair (2.8:1): The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index.html"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a9671e73edd48b810fa0c831f8c19a967f8a72ddf3691a2b6686ba3ebaa59c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060header::before\u0060 moves (\u0060animation: snow 10s linear infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"991487662e4e6d698a8fbfd3d5618aa6c7164fb8a2f5918173e8b3272e11171b"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.feature-card\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7162753b1bae566e09e201c19c61c0ab76c27dec0413d88f3434b07de9a9d07"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.screenshot-item\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c969e38b6ccc937f3ca34d2c2830f05b9f1d4558ac47fe7efb850d7cb981d2"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.donation-method\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fbc885714f3a905ca9555d73b2189424c46422ab5284a57db0353036c41398"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.blog-card\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d0f5d31a0f300cc9528a196562a0a1b3469da21fdf490490239356f8d60f0d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.screenshot-item\u0060 moves (\u0060transition: transform 0.3s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fad01ef6a47c92821b509bab20cfb8a0b2b266fddfd082f1d8294a951911320"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.github-button\u0060 sets color: white on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"848ed7e77cc06d5f0c0277a884adff9dc248d63bc2c3c17656c3ce8c77cf7c60"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.hot-news-badge\u0060 sets color: white on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb957e12f1090379d14584111b09f2df6556588d6570b5997d3e609e6ce2177"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.language-button, .github-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b7d83248ba4440c2b9065a854c5873601b49b83bbc48d70f7f3c366b6cb468"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.cta-button\u0060 sets color: #ffffff on background-color: #4a9eff \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b2f826a38503d1fbac452d39a4468a9cd3436f5750985d2c3065fea4b84e9d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair (3.3:1): The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"461bc2095b77c0e769bda9b77364487dc0f75d797eb2c69c8a9a2951fb0455e1"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair (2.8:1): The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"index_zh.html"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd341d9f5b2d9841477864ae1d3ac94548f732eff65d5db9e7eae55c901f5262"}},{"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":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"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":"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":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"S1","level":"warning","message":{"text":"Third-party script without Subresource Integrity: \u0060https://www.googletagmanager.com/gtag/js?id=G-7QWWZQR1EH\u0060 is executed by this page with no Subresource Integrity. Whoever can answer that request \u2014 the CDN, anyone who compromises it, anyone on the network path \u2014 runs arbitrary script in this page\u0027s origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time \u2014 the executed bytes can change with nobody touching this repository. 8 such include(s) across the repository\u0027s markup."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ai-transcription-tool.html"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"567ba9e5c42da29e60020aa97ddf2b41a405f656a04f6fed401e0f239a10def4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060language == .SimplifiedChinese || language == .TraditionalChinese\u0060 appears character-identically in 2 files \u2014 src/AutoSRT/Services/WhisperService.swift, src/AutoSRT/Services/WordService.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":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"92322be790e9c64c4ef5e6b2090c2fd7bee84e5c8ca1cb97966ddb38c7c39908"}},{"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":"src/AutoSRT/Services/WhisperService.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"b666901cfae7c220a994daae98dc9420300a134e278a1209d10c7a751038b925"}}],"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-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-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":"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/"}]}],"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":3,"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."]}]}