{"$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":"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"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":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"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":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"PhotoView.body (cyclomatic 28): PhotoView.body has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9703bab11c3707cb4d5afd21452fbf7b4d25867dba2be4c9842a4f4a1e200e17"}},{"ruleId":"D1","level":"warning","message":{"text":"PhotoViewForMac.body (cyclomatic 24): PhotoViewForMac.body has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"719d6ebddd64582d77410118eba95df86bf0d7ad8c0e6cc3e13e8febdc7ee1f0"}},{"ruleId":"D2","level":"warning","message":{"text":"PhotoView.body (cognitive 55): PhotoView.body has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (47 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c03b68cb2bebcb5f1ca5d75d4aa64ac57e4ba68ce5cc88086fc561f74823a1"}},{"ruleId":"D2","level":"warning","message":{"text":"PhotoViewForMac.body (cognitive 52): PhotoViewForMac.body has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49a07540eff40c86ddd8812b411976f197c1ce3e1a8f934d37348bbdf61991a"}},{"ruleId":"D2","level":"warning","message":{"text":"PhotoSearcher.batchBuildIndex (cognitive 32): PhotoSearcher.batchBuildIndex has cognitive complexity 32 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 5 (11 pts), error handling 2 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/ViewModel/PhotoSearcher.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a5dca273b3daa636d0fca555bcf035297fff80b56b0cf7d64f4cdc594495b58"}},{"ruleId":"D2","level":"warning","message":{"text":"PhotoSearcher.search (cognitive 21): PhotoSearcher.search has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/ViewModel/PhotoSearcher.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09963dc21e78a6e2dd3436c4a04136cfe2ac5050924c64cebc5d2d24cebe4ec"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PhotoView.body: MethodTooLong \u2014 body runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8d06721902759d8eebfce5c10a90f89d99a10051af5baa84ebe4649c83dd49"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PhotoViewForMac.body: MethodTooLong \u2014 body runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77\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":"Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac7da45c3bd4da512e454ffd479c25794529f2c750afaab1bf236949a3128b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (131 shared lines): Queryable/Queryable/View/PhotoResult/PhotoView.swift:31-313 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:34-313 \u2014 These two members are variants of one another: 131 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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eaa31bbb1208d28589cdef34d56d1f8cd73a575ffed0b733ba6564513e9267d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:77-101 | Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift:76-100 | Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:53-77 | Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift:53-77 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"098376e55e9de331114defa7e17c6012b59d9044c9657955ca2e3856857c8d34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (66 corresponding lines): Queryable/Queryable/View/SearchResultsView.swift:20-91 | Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift:16-81 \u2014 These two members are one piece of code written twice and then edited apart: 66 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":"Queryable/Queryable/View/SearchResultsView.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d551f0f949716acdaf641d9c3d6f2ab140ed3a74a5894be3a3be42a2af6de3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Queryable/Queryable/Model/GPUSimilaritySearch.swift:60-115 | Queryable/Queryable/Model/GPUSimilaritySearch.swift:118-157 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/Model/GPUSimilaritySearch.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d421158e43f160f534f0dca1e4e664c7e75bbc1df10d85f78f7d8461cd1f92"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Queryable/Queryable/PhotoHelper/PhotoCollection.swift:133-151 | Queryable/Queryable/PhotoHelper/PhotoCollection.swift:153-172 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/PhotoHelper/PhotoCollection.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ce7aeca75d745d6537b55f3541cb9e546b2035c2778567a03c804ebb114925"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 19\u002B corresponding lines): Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:40-75 | Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift:40-74 | Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:33-51 | Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift:33-51 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"891ab9a42d8a4595b1db8051618c495834c3bfa496ac2ca97918ea148a17c2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Queryable/Queryable/PhotoHelper/PhotoAsset.swift:40-51 | Queryable/Queryable/PhotoHelper/PhotoAsset.swift:53-64 \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":"Queryable/Queryable/PhotoHelper/PhotoAsset.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc68ec05e9d765b31b20f518271496bb51492e98a04bc2ac43046238a626f608"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Queryable/Queryable/PhotoHelper/CachedImageManager.swift:39-45 | Queryable/Queryable/PhotoHelper/CachedImageManager.swift:47-53 \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":"Queryable/Queryable/PhotoHelper/CachedImageManager.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe3cca39dcb74ee19daa0e8c84906f9b07b40d9e541b03d9c522bce16515179"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 3\u002B corresponding lines): Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:25-27 | Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift:25-27 | Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:25-27 | Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift:25-27 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"2547f91ad83a37b06bd8b362450ff652a89c0937476b5ce76b3bcc704f4917a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:279-313 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:279-313 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:279\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, \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:276\u0060 calls \u0060Label\u0060, \u0060fixedSize\u0060 and \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:277\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"38aab7f2d17b1eb0e76947ef33cd5f5d77983445560a80586efc87bb530205e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:197-230 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:206-239 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:197\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"89130695152d4d5ee6e07c50d59e9eb7416dfd0b1c2497bfefda0bc613779de1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:315-345 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:315-345 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"0900a59e82b0f77f5c489ed45928ea07b5fd9097ed9d4db8c1d9744d4812bf8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201326 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:111-136 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:140-161 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:111\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"42531ae52f49122e0c396b042a18fddc7f39d7048ecfd7db4a04cb808cecbb59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 4): Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:82-101 | Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift:81-100 | Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:58-77 | Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift:58-77 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift\u0060 and \u0060Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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 \u0060Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:82\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060imageSize\u0060 to \u0060imageSize) //            .frame(width: Self.itemSize.width\u0060 in one and \u0060imageSize) .frame(width: Self.itemSize.width\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:55\u0060 calls \u0060frame\u0060, \u0060clipped\u0060 and \u0060Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift:78\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":"Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4ea6eff8e3b428ab8b2754068de5450e38a1d0534626d07c4f08f62662098e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Queryable/Queryable/View/SearchResultsView.swift:27-43 | Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift:23-39 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/SearchResultsView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift\u0060 as WHOLE FILES: 86% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/SearchResultsView.swift:27\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":"Queryable/Queryable/View/SearchResultsView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"72173144a78f3cc799ad4cf93fa27c6006395a77b27e4ff975958130474c75ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:138-152 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:163-177 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:138\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:153\u0060 calls \u0060font\u0060, \u0060custom\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:178\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"5284418722d8726813a1ab6eaedc46a78c4c0f5f5bf97f9e838bcd82d64404e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Queryable/Queryable/View/SearchResultsView.swift:48-62 | Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift:42-56 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/SearchResultsView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift\u0060 as WHOLE FILES: 86% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/SearchResultsView.swift:48\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":"Queryable/Queryable/View/SearchResultsView.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb19765b7bab94113f50f5509cd40195774789c50cff26b329c8b47f4de5931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:37-51 | Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift:37-51 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift\u0060 as WHOLE FILES: 96% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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 \u0060Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift:37\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd14421ad3da4eaa5fee2bb966e7e6a69fa1f4c25ee188578e79310f2915f366"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:267-279 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:265-277 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:267\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a76dc5f5d1c9a44ef48f0f999c35dbb1c2811cd65db07cedaddfac55c84d657"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Queryable/Queryable/View/PhotoResult/PhotoView.swift:183-194 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:192-203 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:183\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"04419ad0a07492ebe1d89d6c19c267a38ed72cb4a058116cf407032d1e1e494e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 4): Queryable/Queryable/View/PhotoResult/PhotoView.swift:267-274 | Queryable/Queryable/View/PhotoResult/PhotoView.swift:297-306 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:265-272 | Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:297-306 \u2014 before extracting anything, compare \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift\u0060 and \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:267\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift:262\u0060 calls \u0060Label\u0060, \u0060fixedSize\u0060 and \u0060Queryable/Queryable/View/PhotoResult/PhotoView.swift:265\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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"86eabf9e92739db0d6915b0da5e62e3e9c94197034d7ec8ae7b106d2f33899cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Queryable/Queryable/ViewModel/PhotoSearcher.swift:439-446 | Queryable/Queryable/ViewModel/PhotoSearcher.swift:483-490 \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 \u0060Queryable/Queryable/ViewModel/PhotoSearcher.swift:439\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":"Queryable/Queryable/ViewModel/PhotoSearcher.swift"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"276272d45a176c9b1a32e74c02009159c22f64a613b015c82e9affedb76aafbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Queryable/Queryable/ViewModel/PhotoSearcher.swift:423-429 | Queryable/Queryable/ViewModel/PhotoSearcher.swift:469-474 \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 \u0060Queryable/Queryable/ViewModel/PhotoSearcher.swift:423\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":"Queryable/Queryable/ViewModel/PhotoSearcher.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab0bd6b3f946cf06cb0e23065268348c732465cbc18c5df3319bd6684938623d"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 4 significant file(s) lose their only recent owner: Queryable/Queryable/Model/EmbeddingStore.swift, Queryable/Queryable/Model/GPUSimilaritySearch.swift, Queryable/Queryable/CLIP/ImgEncoder.swift, Queryable/Queryable/View/BuildIndexView.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c1bab63dc53f131adddc8bb805ed0d6a6ff756da5e8d735c5f664319d9970b89"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: add a function that let user add top result for a keyword. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde7823f916bb7b58246da5911e2403998cd614b8bfe7439f00a0591756e6ad2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Todo: Add a way to show banner to user about no mail app found or configured \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ConfigPageViews/EmailHelper.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"39118802d0a7d34489b4bb3472cd92f9031d47c33299c08f3323defcc48ec6c8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: move the pipeline creation to background task because it\u0027s heavy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/Model/PhotoSearchModel.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"def832f39a3185e1f3f1f74a501ac363e438ec478af4bf3f312661734c632830"}},{"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 \u0060Queryable/Queryable.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a88c67a79fdf97650f7fdb4d5110db4e24e59e83fc0fd94ed8b94e2e8e1d144"}},{"ruleId":"D34","level":"note","message":{"text":"Concentrated knowledge decay: 21 of 21 significant files have no living knowledge, while the repository is still being changed at a low rate (1 commit(s) in the last 90 days) \u2014 so this is one repo-wide knowledge-decay state, not 21 separate risks. Counted over 21 of the 29 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"008bd8d3156a7f5206da709f59f1f87af76671c6b9becea72c8c9cffbcbd4f8e"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/ViewModel/PhotoSearcher.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9d84db31945d31c385d4075018c6510a8f3fbb81164952fac0943df1f39634"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56abb5c920791a18f22c9dc928e1c8a5e3663ea9cfa6e6430254830878dad513"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/PhotoViewForMac.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ba2bb42df039471a188e60010f73466758b13b70f41c2b1dc5dac3a2a8e8c0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/Model/EmbeddingStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"965826f46f2a0e2927616f48e36817dab2e2de0dffba8308c1d3f621089b3386"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/Model/GPUSimilaritySearch.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ecc161458f73336ec5f51c2c1a60ec5f2edf9ae6c23e9cbf8ef3f37c9e2dc41"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/SearchResultsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b00d72788cc480339fb2957a58ff0852a68d192a72488b6ec412fec3bd6b763c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/PhotoHelper/PhotoCollection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcfe97de36b4696e96af4601cc7f7268fb0f32cb71a2d632e86cb4e7860e856"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/CLIP/ImgEncoder.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"350175eb7cdef4baed5f29f588616141793589806460e1494dd512d475d10a5d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ConfigPageViews/ConfigView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a0bb77c7b892f2bd69f734eaef62eb1fe2d9cd48066f4ead4105ec9c82f6d51"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/BuildIndexView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd484a830e9062751dfc4c9ac0c768e9b1e2f2b041d362cf5330f5ef0754184"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/PhotoHelper/DataModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44beea3e6dd2044c4f256d5593c331844497b24532efc0681b857b98639c8bbd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/PhotoCollectionView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c28b14593c542c0c7c199f88832dba1456f1aeb27ec34626bc5555137a56776"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/PhotoResult/SimilarPhotoCollectionView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6bb5694fd8d1b634c79f14e3a1f34c2118143fdeb3a745d5ee741020fdec539"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/CLIP/TextEncoder.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"08650203a0265deb03eb1023759aa197e46516cf88817830316a791fff47b7b2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72204d8ed6ba146c36522a585d9d4d66784871a9ef4578257b71d4573bc89d0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/PhotoHelper/CachedImageManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4354dbc033c0de41bbb63aab9aecbaaeedc443ecd563443cce770d925f1cefbb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/SimilarPhotoCollectionViewForMac.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"621a9ca49fa1df77d89f48c8f8918b37275530f38e9b467cdf477c38ecbd00e3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/PhotoCollectionViewForMac.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e21d5359351d8ebf3ea0b7a917d74eb56633e5a6f8aafa96afe49935cf09958"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/ViewForMac/SearchResultViewForMac.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0db5bbc7494f639ec26d956da8a9b0ea1d8b22bfb186d3cf4e5307b583f225"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/View/SearchBarView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce69c725a79ec8c9d8c645688dac4501058ff9a16ca379cde0985be37506cf86"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/PhotoHelper/PhotoAsset.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a4af642a9513e70a1bddbdf8950821071d6d7d97b9c902f5874263d2bca30d0"}},{"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":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!HAS_NETWORK_PERMISSION \u0026\u0026 self.isLowerQuality\u0060 appears character-identically in 2 files \u2014 Queryable/Queryable/View/PhotoResult/PhotoView.swift, Queryable/Queryable/View/ViewForMac/PhotoViewForMac.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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"b064a5753d7b92367bf9b1b1e1f74fedb576714dbe2c8aad9eb403a5f6f0bc5a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060HAS_NETWORK_PERMISSION \u0026\u0026 self.isLowerQuality\u0060 appears character-identically in 2 files \u2014 Queryable/Queryable/View/PhotoResult/PhotoView.swift, Queryable/Queryable/View/ViewForMac/PhotoViewForMac.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":"Queryable/Queryable/View/PhotoResult/PhotoView.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"17305e5c61e3fa659f9873e69c8ce53b484379d8438bf3b932ded352711353b5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadTombstones\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Queryable/Queryable/Model/EmbeddingStore.swift"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6c7ae129dbe4e159589811234d24bcfeef09e5519d39133ca31235669907c7"}}],"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":0,"secretScannerRunsExcluded":0}}}]}