{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"DM6","name":"Domain \u2194 infrastructure boundary","shortDescription":{"text":"Domain \u2194 infrastructure boundary"},"helpUri":"https://codehealth.canine.dev/dimensions/DM6"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"train_draft.run_train_draft (cyclomatic 56): train_draft.run_train_draft has cyclomatic complexity 56 (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":"Tools/AdapterStudio/adapter_cli/commands/train_draft.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d83aba6e25034a577a7818fdb110b3960286f4a355b71445a0ed995f721e98"}},{"ruleId":"D1","level":"warning","message":{"text":"train_adapter.run_train_adapter (cyclomatic 54): train_adapter.run_train_adapter has cyclomatic complexity 54 (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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8799b58164a677c018e6c3c8616b34eeb8488c15792f77b429f65332687249ad"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.run_generate (cyclomatic 25): generate.run_generate 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":"Tools/AdapterStudio/adapter_cli/commands/generate.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e392d5593f756fe8f8735500510833341fa1de1b686bc5ead3af636e19cf78d3"}},{"ruleId":"D1","level":"warning","message":{"text":"export.run_export (cyclomatic 23): export.run_export has cyclomatic complexity 23 (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":"Tools/AdapterStudio/adapter_cli/commands/export.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea391c20ad534f17116d10c1ed23fb3297e182e3cca067c5c40f664c7bda4fe"}},{"ruleId":"D1","level":"warning","message":{"text":"FoundationLabExperimentRun.feedbackTranscript (cyclomatic 17): FoundationLabExperimentRun.feedbackTranscript 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":"Foundation Lab/Views/Runs/FoundationLabExperimentRun\u002BFeedbackSession.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b825bf0c3b65e8c909394301696515cd6830352c0d4acfe82859356c1449c6"}},{"ruleId":"D1","level":"warning","message":{"text":"demo.run_demo (cyclomatic 17): demo.run_demo 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":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"3da7333bca59b125d1022c86d03cf024971f7b83ce578468ee1d0a132a7a9267"}},{"ruleId":"D2","level":"warning","message":{"text":"train_adapter.run_train_adapter (cognitive 75): train_adapter.run_train_adapter has cognitive complexity 75 (threshold 15). Drivers by points: if/else 34 (45 pts), error handling 11 (19 pts), boolean chains 9, ternaries 1 (2 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e25bd3a23d2976d0e4b90ec7cfd86819ccd1c260d3cabf254ce946d139822f"}},{"ruleId":"D2","level":"warning","message":{"text":"train_draft.run_train_draft (cognitive 66): train_draft.run_train_draft has cognitive complexity 66 (threshold 15). Drivers by points: if/else 36 (39 pts), error handling 10 (16 pts), boolean chains 9, ternaries 2 (nesting depth added 9). 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":"Tools/AdapterStudio/adapter_cli/commands/train_draft.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"2135bb35b1728d2009969c1e87d5c6c76e97f00a1bd2a59031c0f9adf503a8db"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.run_generate (cognitive 28): generate.run_generate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (22 pts), error handling 6 (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":"Tools/AdapterStudio/adapter_cli/commands/generate.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d36e4c3897f1a31c3fe875d694ed4fd47a081bc45ad145e4b2e5b106d521101"}},{"ruleId":"D2","level":"warning","message":{"text":"init.run_init (cognitive 24): init.run_init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 5 (10 pts), loops 2 (3 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":"Tools/AdapterStudio/adapter_cli/commands/init.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87aba62c5b7818c0e50c30b9fcdf1e836716b8962282354a4d584546449dbb9"}},{"ruleId":"D2","level":"warning","message":{"text":"discovery.find_toolkit (cognitive 24): discovery.find_toolkit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/discovery.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2aecaf9d5ad41db0298958300db896cfb7e5380e3246ee91f9f8a8d6f2f5a6"}},{"ruleId":"D2","level":"warning","message":{"text":"FoundationLabExperimentRun.feedbackTranscript (cognitive 23): FoundationLabExperimentRun.feedbackTranscript has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Runs/FoundationLabExperimentRun\u002BFeedbackSession.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f862825687847e2fbab3682dd561353bd90d6736d075cc37de4d6f0e3a9c9d"}},{"ruleId":"D2","level":"warning","message":{"text":"export.run_export (cognitive 22): export.run_export has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, error handling 7, boolean chains 1, ternaries 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":"Tools/AdapterStudio/adapter_cli/commands/export.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bc3f82abc61c58564ec242973541849f31308c9e6e70ffc272acafd3b8f4ed"}},{"ruleId":"D2","level":"warning","message":{"text":"07_MultilingualErrorHandling.swift.top-level code (cognitive 21): 07_MultilingualErrorHandling.swift.top-level code has cognitive complexity 21 (threshold 15). Drivers by points: error handling 10 (20 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"BookPlaygrounds/13_SupportedLanguagesAndInternationalization/07_MultilingualErrorHandling.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2b58b39e8cd91a502dd261aa28bbacc24c23ea31df24178c5c08b56b9b2ca5"}},{"ruleId":"D2","level":"warning","message":{"text":"ReasoningLevelComparisonViewModel.performComparison (cognitive 20): ReasoningLevelComparisonViewModel.performComparison has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"87eef00359032cab3f5a70684d67168dad9a0a7528eeec04f6c49cab7b47a293"}},{"ruleId":"D2","level":"warning","message":{"text":"ToolCallingModeLabViewModel.performComparison (cognitive 20): ToolCallingModeLabViewModel.performComparison has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"623f43c04700dad3f53223047460639e3f8849e49922d43df4aee918e01e83c7"}},{"ruleId":"D2","level":"warning","message":{"text":"demo.run_demo (cognitive 16): demo.run_demo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, error handling 6. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d39b99b89f4e3e03eab9a742c7aacd0398fe7934036bd1bcf6188b8f1367de"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.run_setup (cognitive 16): setup.run_setup has cognitive complexity 16 (threshold 15). Drivers by points: error handling 6 (8 pts), if/else 7 (8 pts) (nesting depth added 3). 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":"Tools/AdapterStudio/adapter_cli/commands/setup.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"b158f8bccc0cf8d75a5e9acf261ca84c47d570b765a165f5c5a0b656cb24e1a3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ChatViewModel: TooManyMethods \u2014 34 methods, declared across 2 files: ViewModels/ChatViewModel\u002BVoice.swift (18), ViewModels/ChatViewModel.swift (16). The bar is 30 methods; this is 4 over it, 1.13\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"Foundation Lab/ViewModels/ChatViewModel.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd40a472538e386723aff789acc530ac96d373d3b07394628b820f7114ac0565"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift:13-66 | Foundation Lab/Views/Examples/Xcode27/ProviderBridgeWalkthroughView.swift:13-83 | Foundation Lab/Views/Languages/LanguageDetectionView.swift:15-55 | Foundation Lab/Views/Languages/MultilingualResponsesView.swift:21-69 | Foundation Lab/Views/Languages/ProductionLanguageExampleView.swift:22-78 | Foundation Lab/Views/Languages/SessionManagementView.swift:19-66 \u2014 These 6 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 6 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 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec44e30c96a0f5678fc3d264a058e48f3ec68cc9dc7aa3e80708c264ba4e1b26"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Tools/AdapterStudio/adapter_cli/commands/demo.py:12-76 | Tools/AdapterStudio/adapter_cli/commands/export.py:20-125 | Tools/AdapterStudio/adapter_cli/commands/generate.py:12-109 | Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:15-197 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:14-183 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5b822439cd6264b3ab587338be02dbbc711bfcd8030f5b906e2bf2f66559010"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Foundation Lab/ViewModels/ChatViewModel.swift:71-86 | Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift:198-217 | Foundation Lab/ViewModels/SessionStateLabViewModel.swift:47-60 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:41-61 \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":"Foundation Lab/ViewModels/ChatViewModel.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d7a41132bc84c13c4cc22c67c42a857b06bb28732b4b23e650fa64b02fdd812"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): BookPlaygrounds/03_GenerationOptionsAndSamplingControl/01_TemperatureExamples.swift:4-35 | BookPlaygrounds/03_GenerationOptionsAndSamplingControl/04_ParameterCombinations.swift:4-54 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"BookPlaygrounds/03_GenerationOptionsAndSamplingControl/01_TemperatureExamples.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e51a071d97e91dfa9a51103c53c23b24d01a7e3382be5eb9a651a11ae7c0367"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift:44-72 | FoundationLabCore/Sources/FoundationLabCore/Tools/Search1WebSearchTool.swift:39-74 \u2014 These two members are one piece of code written twice and then edited apart: 29 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":"BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"6de430e56723f29c4574a26ad3d49ef9bcbdc9e24833492a71cb19498c8297d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:132-172 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:117-157 \u2014 These two members are one piece of code written twice and then edited apart: 41 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":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e06eb5af433f02d69dd070f7b62201128222d3e3887f9a09debaaa1f066770a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): Foundation Lab/Views/Languages/MultilingualResponsesView.swift:140-177 | Foundation Lab/Views/Languages/SessionManagementView.swift:142-182 \u2014 These two members are one piece of code written twice and then edited apart: 38 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":"Foundation Lab/Views/Languages/MultilingualResponsesView.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"f83e0b064ff92bb30b7d03e215d6864f99dfd04668012012b8a2de83aaa5dfa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift:116-139 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/RunSchemaExampleUseCase.swift:532-555 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bab55d3b29815962bb67480a6160702241e96a2a55e6bdfea8e0c8025224ab9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Foundation Lab/ViewModels/RAGChatViewModel.swift:127-155 | Foundation Lab/ViewModels/RAGChatViewModel.swift:157-189 \u2014 These two members are one piece of code written twice and then edited apart: 29 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":"Foundation Lab/ViewModels/RAGChatViewModel.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"83bae667f3121fbea3ac0daa83e69e1647443a46fb104c929ae2b07a21be2f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Foundation Lab/Views/Library/ExperimentLibraryCatalogView.swift:118-136 | Foundation Lab/Views/Library/ExperimentLibraryCatalogView.swift:138-158 \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":"Foundation Lab/Views/Library/ExperimentLibraryCatalogView.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d66ee631248324560349cbe9b0473d5cd968748d0879136d3d081f587d2502"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Foundation Lab/Views/Examples/GenerationGuidesView.swift:104-115 | Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:403-416 | FoundationLabCore/Sources/FoundationLabCore/Models/FoundationLabToolTrajectoryEvaluation.swift:17-30 \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":"Foundation Lab/Views/Examples/GenerationGuidesView.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"54266688133a827c4cabee2ee394362b15886baa79f449de2a57d7592e44ac03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Foundation Lab/Models/ExperimentLibraryRepository.swift:225-240 | Foundation Lab/Models/ExperimentLibraryRepository.swift:242-260 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Models/ExperimentLibraryRepository.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e14bdd000fe836f8e1bcaf28e9789c5662ef3a10c3e49d3b88c56b29b7f27e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift:29-42 | FoundationLabCore/Sources/FoundationLabCore/Tools/Search1WebSearchTool.swift:21-33 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"95646a5ef2f72ec5d396ba5313fe1f25e84f90e0f74bbcc3c19c026307a92719"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Foundation Lab/Voice/Services/SpeechRecognizer.swift:301-330 | Foundation Lab/Voice/Services/SpeechRecognizer.swift:332-355 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Voice/Services/SpeechRecognizer.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4eb6b2741da1379f2f775215ca2ef58df164e5f12b0dc067fd725582ec33f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift:101-113 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/RunSchemaExampleUseCase.swift:522-530 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1bee50cd7585ed42dc1e2734f0f8d1d202b1c33cc9f5305a520d929a55ec576"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 14\u002B corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsContactsSearcher.swift:12-25 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsMusicCatalogSearcher.swift:15-30 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsWeatherResponder.swift:12-25 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsWebPageSummarizer.swift:12-25 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsWebSearcher.swift:11-24 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsContactsSearcher.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e326afdf4a023411aaeefee176917c29d772b6d18d9d429cb8b6d200be3517c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Foundation Lab/Views/Components/ResultDisplay.swift:73-91 | Foundation Lab/Views/Examples/Components/CodeViewer.swift:68-82 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Components/ResultDisplay.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"0349f22b435fa8a3e3491c44956b4b943feb9efacd2c3dfc42d8cd972fa5dd66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:117-130 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:102-115 \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":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e81977798144f7876edac61a65edf650e33a67c9b2925583796bed865588e24b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift:105-124 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift:126-142 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ed2e2540eb3555324155a0de37ed59eb99ff7b57aa5136973487b4cae9b44e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Capabilities/GenerateBookRecommendationUseCase.swift:19-34 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/GenerateHealthEncouragementUseCase.swift:19-37 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Capabilities/GenerateBookRecommendationUseCase.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7bbd854f320132841a5f7b4d2dfaa31f5977ed3f41f7ba926472b9e966c0ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Foundation Lab/ViewModels/ImageInputViewModel.swift:113-126 | Foundation Lab/ViewModels/SpotlightRAGViewModel.swift:98-114 \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":"Foundation Lab/ViewModels/ImageInputViewModel.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"19bc0e70aeed9d3507bfffaa47dd4970d38352b70082d364337cb397c2b70b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Models/BookRecommendation.swift:58-77 | FoundationLabCore/Sources/FoundationLabCore/Models/StoryOutline.swift:77-96 \u2014 These two members are one piece of code written twice and then edited apart: 20 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":"FoundationLabCore/Sources/FoundationLabCore/Models/BookRecommendation.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c517514b90e32d73af27cfdecf5fc1057cf325703794bae26532673ecf44cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Foundation Lab/Views/Library/LibraryView.swift:168-181 | Foundation Lab/Views/Library/LibraryView.swift:183-196 \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":"Foundation Lab/Views/Library/LibraryView.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ba84f7b32f8e37de52f029945d58df214877c45434d2e6d676d41dd543fdde"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Foundation Lab/Views/Playground/PlaygroundInspectorView.swift:226-238 | Foundation Lab/Views/Playground/PlaygroundInspectorView.swift:240-257 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Playground/PlaygroundInspectorView.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"6685e3669e87914c94271217e48985100045fb22b6577e57585362005b99de4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (8 members, 13\u002B corresponding lines): Foundation Lab/AppIntents/GenerateBookRecommendationIntent.swift:33-46 | Foundation Lab/AppIntents/GenerateWebPageSummaryIntent.swift:19-31 | Foundation Lab/AppIntents/GetWeatherIntent.swift:19-31 | Foundation Lab/AppIntents/QueryCalendarIntent.swift:19-33 | Foundation Lab/AppIntents/QueryHealthDataIntent.swift:19-37 | Foundation Lab/AppIntents/SearchContactsIntent.swift:19-31 | Foundation Lab/AppIntents/SearchMusicCatalogIntent.swift:19-31 | Foundation Lab/AppIntents/SearchWebIntent.swift:19-31 \u2014 These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/AppIntents/GenerateBookRecommendationIntent.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde39d64a24404fc2e08fa4d2eee4fb6b2060b1d842fff828a7b7aaf5d29cbff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Foundation Lab/Views/ModelUnavailableView.swift:68-78 | Foundation Lab/Voice/Services/PermissionManager.swift:291-301 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/ModelUnavailableView.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb7c379f2681dafe7c0f96ec3b08f7eab4f4bc0f4f36532fac1cbbf9ed8a34b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Capabilities/QueryCalendarUseCase.swift:17-24 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/QueryHealthDataUseCase.swift:17-24 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Capabilities/QueryCalendarUseCase.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"45879cace17f3377a6f90cf725e454ced12c8536ee8b936eced2984a4bb857f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Capabilities/SearchContactsUseCase.swift:17-24 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/SearchMusicCatalogUseCase.swift:17-24 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/SearchWebUseCase.swift:17-24 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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":"FoundationLabCore/Sources/FoundationLabCore/Capabilities/SearchContactsUseCase.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"09b41cb511ec56c9f6031efb2d264b412d03bfce0ae9e48b97e661ef623b8960"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Foundation Lab/Views/Languages/SessionManagementView.swift:91-105 | Foundation Lab/Views/Languages/MultilingualResponsesView.swift:98-109 \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":"Foundation Lab/Views/Languages/SessionManagementView.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"be05a226f876580b9c259118aaf82b24436f2f8301402360167fd66e5caf513a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Foundation Lab/Voice/Services/SpeechSynthesizer.swift:155-168 | Foundation Lab/Voice/Services/SpeechSynthesizer.swift:170-181 \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":"Foundation Lab/Voice/Services/SpeechSynthesizer.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"848cf2df4e5198f236f1e55410a335bbe8e814001fba090f9cf15382605dc96d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Requests/GenerateWebPageSummaryRequest.swift:10-22 | FoundationLabCore/Sources/FoundationLabCore/Requests/GetCurrentLocationRequest.swift:9-19 | FoundationLabCore/Sources/FoundationLabCore/Requests/GetWeatherRequest.swift:10-22 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"FoundationLabCore/Sources/FoundationLabCore/Requests/GenerateWebPageSummaryRequest.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf49463b80bf268f288dca98c33c7ecf2ff05ecaece9263e2d509f26cb5b5c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): BookPlaygrounds/02_GettingStartedWithSessions/04_InstructionsExample.swift:4-11 | BookPlaygrounds/02_GettingStartedWithSessions/06_RoleSpecification.swift:4-14 | BookPlaygrounds/02_GettingStartedWithSessions/08_ExamplesInInstructions.swift:4-20 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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":"BookPlaygrounds/02_GettingStartedWithSessions/04_InstructionsExample.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5e1d93639b5d716ab5855ecbed2e542984d206fcb029291d5e2a26127af99a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Foundation Lab/Models/ColorPalette.swift:16-23 | Foundation Lab/Models/ColorSwatch.swift:73-80 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Models/ColorPalette.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"a660734fa265a42bd383519ae574d2e9324d4a2bd735ada2281b1733fbf34999"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): BookPlaygrounds/08_BasicToolUse/01_BasicToolProtocol.swift:27-34 | BookPlaygrounds/08_BasicToolUse/04_WeatherTool.swift:191-196 | BookPlaygrounds/08_BasicToolUse/05_LocationTool.swift:130-135 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"BookPlaygrounds/08_BasicToolUse/01_BasicToolProtocol.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b483650cb6395a723b6271556800bf0c87a6001f3ba03f15a37170f7baf2b7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Foundation Lab/Views/Library/LibraryView.swift:127-137 | Foundation Lab/Views/Runs/RunsView.swift:111-121 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Library/LibraryView.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f48e6cba117169647fc473f2f22a142c0b45f84f78baf40f4b1e0f2734e7da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): FoundationLabCore/Sources/FoundationLabCore/Catalogs/FoundationLabLanguageCatalog.swift:10-20 | FoundationLabCore/Sources/FoundationLabCore/Results/RunConversationResult.swift:10-20 | FoundationLabCore/Sources/FoundationLabCore/Results/RunLanguageSessionDemoResult.swift:11-23 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"FoundationLabCore/Sources/FoundationLabCore/Catalogs/FoundationLabLanguageCatalog.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e55b69e7e8aee516a0f4669f822cf71117721dfdc1d6047e06d5b31de6656c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): BookPlaygrounds/02_GettingStartedWithSessions/02_SingleTurnSession.swift:4-9 | BookPlaygrounds/02_GettingStartedWithSessions/11_BasicPrewarming.swift:4-13 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"BookPlaygrounds/02_GettingStartedWithSessions/02_SingleTurnSession.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"b27bb13a3010016fa96bf7893a379f3e6d7a9e2ca0f3d7e34518346ab11fa202"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Foundation Lab/Health/ViewModels/HealthChatViewModel.swift:221-228 | Foundation Lab/ViewModels/ChatViewModel.swift:333-343 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Health/ViewModels/HealthChatViewModel.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc5720e0c60c0d9fbecf2494b0f4801d3ef3ea613291c76e683ef35b5de652d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:151-172 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:136-157 \u2014 before extracting anything, compare \u0060Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift\u0060 and \u0060Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 \u0060Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:151\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":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"b018f26652a142cba3823a2f926fcdef9063188a4269a02cb705135fd68e1cfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Foundation Lab/Voice/Services/SpeechRecognizer.swift:307-326 | Foundation Lab/Voice/Services/SpeechRecognizer.swift:333-352 \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":"Foundation Lab/Voice/Services/SpeechRecognizer.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"274256316415ab4415021ab5671c5b6d71ba11331dbe516854d14a2b4be1a345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift:49-66 | FoundationLabCore/Sources/FoundationLabCore/Tools/Search1WebSearchTool.swift:44-62 \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":"BookPlaygrounds/08_BasicToolUse/02_SearchTool.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31e80bec4125fb9ef419a25363538d67e4fc70f741703e34fb69f450dba1f99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201317 lines \u00D7 3): BookPlaygrounds/08_BasicToolUse/06_SessionWithSingleTool.swift:22-38 | BookPlaygrounds/08_BasicToolUse/06_SessionWithSingleTool.swift:40-56 | BookPlaygrounds/08_BasicToolUse/06_SessionWithSingleTool.swift:57-64 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060BookPlaygrounds/08_BasicToolUse/06_SessionWithSingleTool.swift:22\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":"BookPlaygrounds/08_BasicToolUse/06_SessionWithSingleTool.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48e0bce93e69f2d02d016c67a5b4ab80024b8f079073154783101807d9b5799"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift:76-92 | Foundation Lab/ViewModels/SessionStateLabViewModel.swift:62-78 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ec24267fc0f14bc173884bba994bb8b92ee948c4f6d56b9a6d914013d07eb03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): FoundationLabCore/Sources/FoundationLabCore/Requests/QueryCalendarRequest.swift:12-28 | FoundationLabCore/Sources/FoundationLabCore/Requests/QueryHealthDataRequest.swift:12-28 \u2014 before extracting anything, compare \u0060FoundationLabCore/Sources/FoundationLabCore/Requests/QueryCalendarRequest.swift\u0060 and \u0060FoundationLabCore/Sources/FoundationLabCore/Requests/QueryHealthDataRequest.swift\u0060 as WHOLE FILES: 88% 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Requests/QueryCalendarRequest.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f3ba3a14cf2f2905653ba19b135d4165f94982343963ef19eec87bf4823ce9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Foundation Lab/AdapterStudio/Views/AdapterStudioResponseComparisonView.swift:14-29 | Foundation Lab/AdapterStudio/Views/AdapterStudioResponseComparisonView.swift:32-47 \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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/AdapterStudio/Views/AdapterStudioResponseComparisonView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b81867c441051a8226fad3394fd0ff021e39b6daa649995f1ed048a57691f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift:106-119 | FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift:127-140 \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 \u0060FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift:106\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. 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":"FoundationLabCore/Sources/FoundationLabCore/Providers/FoundationModelsReminderManager.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1d9dd6c4a833d8f1d9f19ec6feeb3a9f39cfd2009bc337d6f32333eb2ca940"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift:7-19 | Foundation Lab/AdapterStudio/Views/AdapterStudioOutputView.swift:7-19 | Foundation Lab/AdapterStudio/Views/AdapterStudioSettingsView.swift:7-19 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift:7\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":"Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf45cd11ea04cbdba8cd15c92d8b1d353a4525683149db7a5b8c978e64cfdec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Foundation Lab/Health/Tools/HealthDataTool.swift:129-141 | Foundation Lab/Health/Tools/HealthDataTool.swift:175-187 \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 \u0060Foundation Lab/Health/Tools/HealthDataTool.swift:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Health/Tools/HealthDataTool.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6808093afd6a500e6fc375546d800f986ab515c6fe142a840dc954d1cde56f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift:117-128 | FoundationLabCore/Sources/FoundationLabCore/Capabilities/RunSchemaExampleUseCase.swift:532-544 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift:117\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaExecutorExtension.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a1c938e4d9171e8255f892f905c8e784dd3ab547f7bc4b75b85f498b2cadd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Foundation Lab/Health/Views/Chat/HealthChatView.swift:122-133 | Foundation Lab/Views/Playground/PlaygroundTranscriptView.swift:45-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Health/Views/Chat/HealthChatView.swift:122\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":"Foundation Lab/Health/Views/Chat/HealthChatView.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c792a0dcbbcce6e5d89deb682b5bbe00615f39200e5406c6cb58e5f83ac4170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift:198-209 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:41-52 \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 \u0060Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift:198\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6257fa4a8390d6281a54539f7500f908b442da0cd3d1dda344ee43aa758e10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift:100-109 | Foundation Lab/AdapterStudio/Views/AdapterStudioResponseColumn.swift:89-98 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Foundation Lab/AdapterStudio/Views/AdapterStudioResponseColumn.swift:86\u0060 calls \u0060frame\u0060 and \u0060Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift:97\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":"Foundation Lab/AdapterStudio/Views/AdapterStudioEvaluationView.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d425af280e56a761573009974e72bcf35fb453f701c4bc6dcb71302765ea0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Foundation Lab/Views/Languages/MultilingualResponsesView.swift:60-69 | Foundation Lab/Views/Languages/SessionManagementView.swift:57-66 \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 \u0060Foundation Lab/Views/Languages/MultilingualResponsesView.swift:60\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":"Foundation Lab/Views/Languages/MultilingualResponsesView.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa2e26f640b2252a5ed7daf208a4ba08310dd13d710ccbd56353f0ad9864431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): Foundation Lab/ViewModels/ChatViewModel.swift:77-85 | Foundation Lab/ViewModels/DynamicProfileWorkflowViewModel.swift:203-211 | Foundation Lab/ViewModels/SessionStateLabViewModel.swift:51-59 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:46-54 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/ViewModels/ChatViewModel.swift:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/ChatViewModel.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5c75e57864b5da2fec1ab77c67b3d158557b3aa6bfe7371478e49785a9913c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Foundation Lab/Views/Languages/LanguageDetectionView.swift:34-42 | Foundation Lab/Views/Languages/MultilingualResponsesView.swift:57-65 | Foundation Lab/Views/Languages/SessionManagementView.swift:54-62 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Languages/LanguageDetectionView.swift:34\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":"Foundation Lab/Views/Languages/LanguageDetectionView.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f58e2b16bc70a0cdbdfb50f2af5be5294ee45dd7099b6b253eeef7c785850a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift:56-63 | Foundation Lab/Views/Examples/Xcode27/ProviderBridgeWalkthroughView.swift:73-80 | Foundation Lab/Views/Languages/LanguageDetectionView.swift:36-43 | Foundation Lab/Views/Languages/MultilingualResponsesView.swift:59-66 | Foundation Lab/Views/Languages/ProductionLanguageExampleView.swift:63-70 | Foundation Lab/Views/Languages/SessionManagementView.swift:56-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift:56\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":"Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"31cde0a60d6d5aa4c19158901f39c83864e938c993beb95eed71caf1fde2bbf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): BookPlaygrounds/03_GenerationOptionsAndSamplingControl/05_SamplingStrategies.swift:21-28 | BookPlaygrounds/03_GenerationOptionsAndSamplingControl/05_SamplingStrategies.swift:48-55 \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 \u0060BookPlaygrounds/03_GenerationOptionsAndSamplingControl/05_SamplingStrategies.swift:21\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":"BookPlaygrounds/03_GenerationOptionsAndSamplingControl/05_SamplingStrategies.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8130bd0f701f0f76fee7d1d24ada72a049cf7a6e10fceb47ed520c52e018d7cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): BookPlaygrounds/03_GenerationOptionsAndSamplingControl/02_TokenLimitExamples.swift:19-23 | BookPlaygrounds/03_GenerationOptionsAndSamplingControl/02_TokenLimitExamples.swift:25-29 | BookPlaygrounds/03_GenerationOptionsAndSamplingControl/02_TokenLimitExamples.swift:30-32 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"BookPlaygrounds/03_GenerationOptionsAndSamplingControl/02_TokenLimitExamples.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"28489a05336745242b303503a3209e0fbf8d6d2f2b0fb40d5e3b6fcd10c8c8fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:404-408 | FoundationLabCore/Sources/FoundationLabCore/Models/FoundationLabToolTrajectoryEvaluation.swift:18-22 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:404\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":"Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c76f5e89bc0387d3f7ebf9c65fe66530c30dcae3a22a43263d0e51bb3006b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:78-86 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:63-71 \u2014 before extracting anything, compare \u0060Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift\u0060 and \u0060Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa95bd77affe9854ec6d9eaf66e12505fc2967ddeb471afd87f27a3bbd39202c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift:88-98 | Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift:73-83 \u2014 before extracting anything, compare \u0060Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift\u0060 and \u0060Foundation Lab/ViewModels/ToolCallingModeLabViewModel.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/ViewModels/ReasoningLevelComparisonViewModel.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e56862f6a778d3c7eeb3b8b36e6b1680e75eb37d3bc9bbbafc59ba9398ee8c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): FoundationLabCore/Sources/FoundationLabCore/Requests/SearchContactsRequest.swift:10-22 | FoundationLabCore/Sources/FoundationLabCore/Requests/SearchMusicCatalogRequest.swift:10-22 | FoundationLabCore/Sources/FoundationLabCore/Requests/SearchWebRequest.swift:10-22 \u2014 before extracting anything, compare \u0060FoundationLabCore/Sources/FoundationLabCore/Requests/SearchContactsRequest.swift\u0060 and \u0060FoundationLabCore/Sources/FoundationLabCore/Requests/SearchMusicCatalogRequest.swift\u0060 as WHOLE FILES: 85% 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLabCore/Sources/FoundationLabCore/Requests/SearchContactsRequest.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcadec873679186efb247b97e7df7b2aef354104a196f918aa8041c0e4c94640"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Foundation Lab/Views/AdaptiveNavigationView.swift:183-192 | Foundation Lab/Views/Playground/PlaygroundView.swift:185-194 \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":"Foundation Lab/Views/AdaptiveNavigationView.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18dffe7fe3ac81d0459d3df1529dcf3f92f369426fa39aed5e984502ae6e9fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Foundation Lab/Views/AdaptiveNavigationView.swift:211-219 | Foundation Lab/Views/Playground/PlaygroundView.swift:196-204 \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":"Foundation Lab/Views/AdaptiveNavigationView.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"19cbc590f06ff8a1bd94024aafe0028049d6b6882dcc906ac673249dbdff4044"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (86\u201397 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/__main__.py:63-148 | Tools/AdapterStudio/adapter_cli/__main__.py:152-248 \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":"Tools/AdapterStudio/adapter_cli/__main__.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"192d0aff47e39812ac5167cbf3a35b9a5bea8779807d9a455114156392dd5062"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:142-194 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:128-180 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c91c70a2916957ad4ffac655a373cd3fb5fb5baeb16de58cccdbf337214203d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201338 lines \u00D7 3): Tools/AdapterStudio/adapter_cli/__main__.py:22-59 | Tools/AdapterStudio/adapter_cli/__main__.py:67-98 | Tools/AdapterStudio/adapter_cli/__main__.py:156-187 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tools/AdapterStudio/adapter_cli/__main__.py:22\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, \u0060Tools/AdapterStudio/adapter_cli/__main__.py:62\u0060 calls \u0060add_adapter_training_args\u0060 and \u0060Tools/AdapterStudio/adapter_cli/__main__.py:99\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":"Tools/AdapterStudio/adapter_cli/__main__.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f90c328fbfa07ae7dddc2b223c0a4481ed8558bc673225dfec3991a5d5f39508"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/demo.py:35-70 | Tools/AdapterStudio/adapter_cli/commands/generate.py:68-103 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/demo.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/generate.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"f165aeb95a1d6c36952f2c2669aabec61e82fb98e14b1e185c5eb8fb6f1261e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:15-44 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:14-43 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"12361d5d7082d4f6c2151c1986dbfe64fc0ed861c251a0b251705c8101f51010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:80-105 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:56-81 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"c863e690db4184dd82461fcd14e1d9a78f1dc80744dd937c20d94562a3fa41e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): Tools/AdapterStudio/adapter_cli/commands/demo.py:57-73 | Tools/AdapterStudio/adapter_cli/commands/export.py:107-122 | Tools/AdapterStudio/adapter_cli/commands/generate.py:90-106 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/demo.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/generate.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 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 \u0060Tools/AdapterStudio/adapter_cli/commands/demo.py:57\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"54553c804794bc9741067bd1b6316effa1ce5c4aab46b1fe2cb3ef9bb945b6e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:124-140 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:108-124 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py:105\u0060 calls \u0060extend\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:121\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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"f53fc685efab4b5e86ccb74d05ba2d1222f012e331a2f09169b8d2407fbff132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): Tools/AdapterStudio/adapter_cli/commands/demo.py:64-76 | Tools/AdapterStudio/adapter_cli/commands/export.py:113-125 | Tools/AdapterStudio/adapter_cli/commands/generate.py:97-109 | Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:185-197 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:171-183 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/demo.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/generate.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/demo.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd95a88db4323f4cf9f761fffac9e4940dc61cdcd3e861dc9918f398c0f3e60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Tools/AdapterStudio/adapter_cli/commands/train_adapter.py:114-121 | Tools/AdapterStudio/adapter_cli/commands/train_draft.py:97-104 \u2014 before extracting anything, compare \u0060Tools/AdapterStudio/adapter_cli/commands/train_adapter.py\u0060 and \u0060Tools/AdapterStudio/adapter_cli/commands/train_draft.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c6da7a0bc88c338e66c073300aa8dca5efb34eb3c34078837be92a5573c41c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:16-74 | Foundation Lab/Views/Examples/Xcode27/ImageInputLiveView.swift:17-120 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:16-69 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:16-71 | Foundation Lab/Views/Examples/Xcode27/SpotlightRAGLiveView.swift:15-98 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:17-71 \u2014 These 6 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 6 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 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f689ab0cf51364dc5e8f4bcceece54434173e9c47caf493f31fb1191ae861c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Foundation Lab/Views/Examples/Components/ExampleViewBase.swift:57-107 | Foundation Lab/Views/Examples/Xcode27/ImageInputLiveView.swift:17-120 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:16-69 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:17-71 \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":"Foundation Lab/Views/Examples/Components/ExampleViewBase.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b96db7b28682fd61fdef05ef9810aadc65f1b548860288863c836e058aae2d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Foundation Lab/Views/Examples/DynamicSchemas/GenerablePatternView.swift:108-151 | Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift:42-84 | Foundation Lab/Views/Examples/DynamicSchemas/ReferencedSchemaView.swift:40-84 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaView.swift:20-62 \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":"Foundation Lab/Views/Examples/DynamicSchemas/GenerablePatternView.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2829c9a9f3c3bf2b24b158eacbcbec43dbb520b600e9e09dc24f482d4a44731"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:149-177 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:90-115 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:86-114 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:107-132 \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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f942a043d7bfa40cad759bd9a77832714e79ab857cc77dbfac17338bf535d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (62 corresponding lines): Foundation Lab/Views/Examples/Xcode27/AgentFlowInspectorView.swift:13-74 | Foundation Lab/Views/Examples/Xcode27/EvaluationsLabView.swift:13-80 \u2014 These two members are one piece of code written twice and then edited apart: 62 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":"Foundation Lab/Views/Examples/Xcode27/AgentFlowInspectorView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b791b3dab17c58c6db5ed500ce9b248d1b7036f57146898cc5a899b3db6d2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift:40-95 | Foundation Lab/Views/Examples/Xcode27/TranscriptExplorerViewModel.swift:31-78 \u2014 These two members are one piece of code written twice and then edited apart: 48 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":"Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37352d0e9f90e97729408259efade5cc10139e788437aa3cbe704c73b5ed5c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift:11-39 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeResultView.swift:11-39 \u2014 These two members are one piece of code written twice and then edited apart: 29 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":"Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1a42dec7613dedabd298516ee33482641827e5c56c5fe65059ac08cf92bbe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 41\u002B corresponding lines): Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:31-76 | Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:79-119 | Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:171-213 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 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":"Foundation Lab/Views/Examples/Components/ExampleExecutor.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e01360a18eb0f53fc97455de631635f68260807a71d2fa373347d2c9223659"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Foundation Lab/Views/Examples/Xcode27/AgentFlowInspectorView.swift:81-110 | Foundation Lab/Views/Examples/Xcode27/ModelRouterDashboardView.swift:97-118 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/AgentFlowInspectorView.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a35cffaeb1a1759c7a895c7f0a8f7d99a6b9706d0d9373c321fbe7382f468fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift:102-131 | Foundation Lab/Views/Examples/DynamicSchemas/ReferencedSchemaView.swift:102-135 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c5b3ceca2723897f7bbd594f1bc216f3b84b3b7218fce6b26e10e209c5403e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:178-195 | Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:210-230 \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":"Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"2517ce20f0c015236bd01fb3056eccb1a80abe5daa10e38f4748512c8c2756e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:117-132 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:134-149 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0945db08048eee6a2867c9e6b209f806c7d8600120aee56a23b856901ad10da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:128-147 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:92-105 \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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3caecbd6693ec0ac34227372d64c5990107a82bbb05e43a302d40cfcded5cf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift:75-93 | Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift:96-114 \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":"Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"da02e084f8de8bec2ac3a5c5e8b20377ef3e1e7d667df7192eb53120446ccfda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): Foundation Lab/Views/Examples/Xcode27/DataContentLabLiveView.swift:64-84 | Foundation Lab/Views/Examples/Xcode27/ImageInputAvailabilityView.swift:12-26 | Foundation Lab/Views/Examples/Xcode27/LocalInspectionNotice.swift:9-24 | Foundation Lab/Views/Examples/Xcode27/ToolApprovalNotice.swift:9-31 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 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":"Foundation Lab/Views/Examples/Xcode27/DataContentLabLiveView.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"95de943f779551a59ff2f8521b03237f395e0a3a7e49d9bcaffa2f7a19fa4bdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:179-191 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:116-128 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0bae2b63015ac8314a44243a1b6b1b0c74aaac60126d6a03e8bed16c878f99b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:197-208 | Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift:295-306 \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":"Foundation Lab/Views/Examples/Xcode27/SessionTranscriptSnapshot.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cc1a0bc2a18aa9bfae8edbdde136f316650cc08e1ae7d632ced057f153571f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift:29-41 | Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift:44-57 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/DynamicSchemaHelpers.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"6330021643a3b7d06844c57e1eb9daeaa50e4d705bf0f2dd4f9605d8af35084f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift:97-114 | Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:121-136 | Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift:104-120 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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":"Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb3a3394a9c96e2b283b49ad8c520abe235833217c259565bd34b99f4e38313"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:193-207 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:134-153 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:130-147 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:151-166 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a027fc05ac24c2e9500b83a30cb50c0aea51754b026c6a0e122244477bb724"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 40\u002B corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:80-119 | Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaHelpers.swift:12-58 | Foundation Lab/Views/Examples/DynamicSchemas/ReferencedSchemaHelpers.swift:245-285 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 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":"Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"caa5451f149c06a3e4dd37d31d6c1af17757d402fe576dd796127a0cd1631588"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Foundation Lab/Views/Examples/DynamicSchemas/SchemaErrorHandlingView.swift:92-112 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaView.swift:101-118 \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":"Foundation Lab/Views/Examples/DynamicSchemas/SchemaErrorHandlingView.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf6386cc05b0cbfcf8203ec5c2e7b7aacf0b7fc8e2d7f8cebdcba600d32a704"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Foundation Lab/Views/Examples/Xcode27/SessionStateLabView.swift:10-20 | Foundation Lab/Views/Examples/Xcode27/SpotlightRAGExplorerView.swift:11-25 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/SessionStateLabView.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c85ce74f855409847995ca8699487dcbf7101385b25c1dd848fd77ea7b2ba9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Foundation Lab/Views/Examples/Xcode27/DynamicProfileWorkflowTurnView.swift:74-76 | Foundation Lab/Views/Examples/Xcode27/ModelRuntimeView.swift:202-204 | Foundation Lab/Views/Examples/Xcode27/UsagePerformanceTraceView.swift:178-180 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileWorkflowTurnView.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc694f5e7b9b8e8d667d280da194cb09865913f73fe95178c506b3d423ccd56d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Foundation Lab/Views/Examples/Xcode27/EvaluationsLabView.swift:88-96 | Foundation Lab/Views/Examples/Xcode27/SecurityBoundaryRow.swift:14-17 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/EvaluationsLabView.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"652200308f5977abd58ed3ac66a7d4117258e0dd4bab93f62ba2bf14592f98d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift:14-39 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeResultView.swift:14-39 \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 \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift:14\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":"Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7648970f64ae14169d840451a3fad389c46650b9ceb800206d91d06a1863afeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:92-115 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:109-132 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 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 \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:92\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":"Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ef85ac5737839587f941f6ddb8bff47254671a18f9b5b81ed6256eabfca469"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Foundation Lab/Views/Examples/GenerationGuidesView.swift:38-60 | Foundation Lab/Views/Examples/StructuredDataView.swift:38-60 \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 \u0060Foundation Lab/Views/Examples/GenerationGuidesView.swift:38\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":"Foundation Lab/Views/Examples/GenerationGuidesView.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad59c879c302f1248b1ffd4e2fe3c3fdefda3f901caf766b2b4d69fbb9e1a24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:25-45 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:27-47 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f9cd6c0ab34edafa875a0491130b3b8c682b622e86a57bf8bc94b1388cf547"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift:49-68 | Foundation Lab/Views/Examples/Xcode27/TranscriptExplorerViewModel.swift:40-58 \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 \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift:49\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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac002c2d10113aff21af6fd2812f8268610be9c424329627f858ca279125b27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:97-114 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:136-153 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:176-193 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:97\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":"Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a231f1b9cdf6bd07780b61ad13e93eae3fa3b9cefcc57725da61210668e583b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:160-177 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:97-114 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:160\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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"732a7428ed37187ab663e6532ae87a877ded0f35e8561d6e0efec4d8fa4002c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:71-88 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:73-90 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"562b73105545fe4a28953b9e5da3332d08496312e4c1e9485de6b5c7869956ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift:105-121 | Foundation Lab/Views/Examples/DynamicSchemas/ReferencedSchemaView.swift:105-121 \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 \u0060Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift:105\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":"Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ecb9207fd3fd6cee7f433e7f8d4c209027ad14c42281d47e641d513ff020953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:14-30 | Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:66-82 \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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060indent\u0060 to \u0060Int = 0\u0060 in one and \u0060Int\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":"Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"6943e49c34f7be28d66981fc594b35ead20cfed0014f2809b1a6a276dcb492f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:84-99 | Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:125-140 | Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:175-190 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/Components/ExampleExecutor.swift:84\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Components/ExampleExecutor.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"119468929a43c262f9dffef37304596ea1b227d55287f861a4016eadeebcae3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift:23-36 | Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:21-34 | Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift:23-36 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift\u0060 and \u0060Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 \u0060Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift:23\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":"Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf36ed36cfc501252ddf2d64a6683f2102eb8cf40f10ed45902f5e62868a4e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewerView.swift:11-24 | Foundation Lab/Views/Examples/Xcode27/TranscriptExplorerView.swift:12-25 \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 \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewerView.swift:11\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":"Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewerView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1ade33ffa03c038a89c9af7c134b1badb037fbf41f9bb912d85b91bd4ca06f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): Foundation Lab/Views/Examples/Components/ExampleViewBase.swift:71-83 | Foundation Lab/Views/Examples/Xcode27/ImageInputLiveView.swift:58-70 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:28-40 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:30-42 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Components/ExampleViewBase.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fad689f11bfc8577785e7bbab37a932df73d1a09f42d05870565f02159aae74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:60-72 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:57-69 | Foundation Lab/Views/Examples/Xcode27/SpotlightRAGLiveView.swift:81-93 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:60\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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"deef302879456e53354605e4d5a2bf5d5e02add3e286da40a57001a49d081ef8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:50-62 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:52-64 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 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 \u0060Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:50\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":"Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"de2f04a8b29abe11e56f7b0c8a7337cdf649ced22a51627826c22e191aa98dd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:96-107 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:135-146 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:175-186 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:225-236 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:306-317 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift:96\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":"Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaHelpers.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57fa6c341094660329f8fc3ce16a1678e2addc6a4f5b061bec971f6135646cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:61-72 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:51-62 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:58-69 | Foundation Lab/Views/Examples/Xcode27/SpotlightRAGLiveView.swift:82-93 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:53-64 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:61\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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a99a5cf7a7f3bc2f81819b0fcecae42ebe693b3f08a2e9c6b948dd75bd7f0a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Foundation Lab/Views/Examples/DynamicSchemas/FormBuilderSchemaHelpers.swift:255-265 | Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:19-29 | Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:71-81 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/DynamicSchemas/FormBuilderSchemaHelpers.swift:255\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/DynamicSchemas/FormBuilderSchemaHelpers.swift"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"909711341b80dd000ad5a7f81f4823ca20dd9d8119c3a588f3a8a779dc92ec8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:40-50 | Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift:44-54 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift\u0060 and \u0060Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 \u0060Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:40\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":"Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6466a527be9b4084d29751007e14fd26dba3844dbecdcd847882a5f63ea9a92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:85-95 | Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift:120-130 \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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060currentLevel\u0060 to \u0060Int = 0\u0060 in one and \u0060Int\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":"Foundation Lab/Views/Examples/DynamicSchemas/NestedSchemaFormatter.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc55bb02279f684b9c2be0b3617acf19746bc140b0d99656239950ac4c0673b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Foundation Lab/Views/Examples/DynamicSchemas/GenerablePatternView.swift:124-133 | Foundation Lab/Views/Examples/DynamicSchemas/NestedDynamicSchemaView.swift:60-69 | Foundation Lab/Views/Examples/DynamicSchemas/ReferencedSchemaView.swift:58-67 | Foundation Lab/Views/Examples/DynamicSchemas/UnionTypesSchemaView.swift:37-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Foundation Lab/Views/Examples/DynamicSchemas/GenerablePatternView.swift:124\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":"Foundation Lab/Views/Examples/DynamicSchemas/GenerablePatternView.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f63db68033b4de194fbd247c353f2c22bb34b20ca71ade9c04b5259f2e38df4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift:42-51 | Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift:38-47 | Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift:42-51 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/DynamicSchemas/BasicDynamicSchemaView.swift\u0060 and \u0060Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 \u0060Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift:42\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":"Foundation Lab/Views/Examples/DynamicSchemas/ArrayDynamicSchemaView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"856b7d0c137a33ff1ebaeb41cdea617a62abf48e46b67b48bba33b3090472eab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift:57-66 | Foundation Lab/Views/Examples/Xcode27/ProviderBridgeWalkthroughView.swift:74-83 \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 \u0060Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift:57\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":"Foundation Lab/Views/Examples/Xcode27/FMCLIPythonPlaygroundView.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0738934173359e54418be3d66c75defd720a3ba096bd965179200985f2a4e56a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:60-68 | Foundation Lab/Views/Examples/Xcode27/ImageInputLiveView.swift:87-95 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:50-58 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:57-65 | Foundation Lab/Views/Examples/Xcode27/SpotlightRAGLiveView.swift:81-89 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:52-60 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:60\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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b233aebac3fd9663db9d3dd315c2def21fa0b5ef78e02766d4e6e9dde0700f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/DataContentLabLiveView.swift:52-59 | Foundation Lab/Views/Examples/Xcode27/PrivateCloudComputeView.swift:92-99 \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 \u0060Foundation Lab/Views/Examples/Xcode27/DataContentLabLiveView.swift:52\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":"Foundation Lab/Views/Examples/Xcode27/DataContentLabLiveView.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3543d6c3f9cd1dff59fe6eefe5a7a481bcebe27425fb4c8cddd553cdf13d125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:151-158 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:88-95 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:151\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a419f7246b7f2895204e097a45e975a8df693632fe4c29c05a1701e9500748e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ToolApprovalReview.swift:37-44 | Foundation Lab/Views/Examples/Xcode27/ToolApprovalReview.swift:47-54 \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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ToolApprovalReview.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"638a75ebe09abab6ba47dd8cd54fe6abf2a61d84d5d4c0d70f105484efce863f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:149-154 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonLiveView.swift:90-95 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift:86-91 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabLiveView.swift:107-112 \u2014 before extracting anything, compare \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift\u0060 and \u0060Foundation Lab/Views/Examples/Xcode27/SessionStateLabLiveView.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 \u0060Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u0060Spacing.small\u0060 in one and \u0060Spacing.xSmall\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":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderLiveView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"863f3ad0f7f2ec896dec7d16f6f7750ab3603f231b169ab700c260618a5dbc93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/DynamicProfileWorkflowTurnView.swift:68-72 | Foundation Lab/Views/Examples/Xcode27/SessionStateLabTurnView.swift:50-54 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileWorkflowTurnView.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d7eae0183843aaa69bc7c4db4e391027b45307c9e61263e6578226e28fb4aa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaHelpers.swift:11-44 | Foundation Lab/Views/Examples/Xcode27/ImageInputRecipe.swift:37-70 \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":"Foundation Lab/Views/Examples/DynamicSchemas/EnumDynamicSchemaHelpers.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"d76ee07d7e12dda102745de3b363cb18f0b0de1c3dfedd19431a65691f2c4ab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift:107-111 | Foundation Lab/Views/Examples/Xcode27/TranscriptExplorerViewModel.swift:99-103 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ToolCallTrajectoryViewModel.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a0c83655d087663efc30f29b38f2468e8684ea6aeec5e655953396fb768899"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderView.swift:8-14 | Foundation Lab/Views/Examples/Xcode27/ReasoningLevelComparisonView.swift:9-15 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeLabView.swift:9-15 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/DynamicProfileBuilderView.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36d236d5f613a934935edcf542f315031b69edfdb9df183d8db856d5207fced"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Foundation Lab/Views/Examples/DynamicSchemas/GuidedDynamicSchemaView.swift:116-121 | Foundation Lab/Views/Examples/DynamicSchemas/InvoiceProcessingSchemaView.swift:183-188 \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 \u0060Foundation Lab/Views/Examples/DynamicSchemas/GuidedDynamicSchemaView.swift:116\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":"Foundation Lab/Views/Examples/DynamicSchemas/GuidedDynamicSchemaView.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a35e0950b04b5d6016687d745a0f8d361a81e1406e2bdff9639c6e3317535a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift:69-74 | Foundation Lab/Views/Examples/Xcode27/ToolCallingModeResultView.swift:94-99 | Foundation Lab/Views/Examples/Xcode27/UsagePerformanceTraceView.swift:182-187 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/Xcode27/ReasoningComparisonResultView.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2638476c2170d0b2e6b8fa16f7c114035df4638cc92a6e1a9814c3965463144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Tools/ImageInputProbe/image_input_probe.py:629-646 | Tools/ImageInputProbe/image_input_probe.py:655-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 \u0060Tools/ImageInputProbe/image_input_probe.py:629\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":"Tools/ImageInputProbe/image_input_probe.py"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"86daad31c9ee4fb38feace73f88a86fcb9f9a075b1b5e23c41a924f5839853d8"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: FoundationLabCore (FoundationLabCore): FoundationLabCore (FoundationLabCore): abstractness 0.14, instability 0.00, distance 0.86 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2b2e356b15402a19d7077a91a1efd0ee17b6bd1459ea6617e06ebf77922b8662"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SpeechRecognizer (LCOM4 5): SpeechRecognizer\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Voice/Services/SpeechRecognizer.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"432f8c1c614fd2aeda482a4fa8c4b2909efae5abc91e3b8e66af62ebb1978eb7"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: swift-embeddings: Dependency \u0060swift-embeddings\u0060 is resolved in FoundationLab.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e2f580d26d6b6c77f4e97cdd34742ecc37fd6935ab9a511981109c7224dfcaa9"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: vecturakit: Dependency \u0060vecturakit\u0060 is resolved in FoundationLab.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8dca27e6f7044f4a0a630b74fa95a5b27a1053fb9376fcbbeeae032dccb35f0f"}},{"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 \u0060FoundationLab.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"FoundationLab.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e19038e23a6a975c760faf1546094dfe46d99b3fdb876f1edb55a696e597059"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060documentId\u0060 spells \u0060Id\u0060 where 35 names in the project spell it \u0060ID\u0060: 35 of 36 names in project repository spell the token \u0060ID\u0060 (35 of 36; unit: names in project repository containing \u0060ID\u0060). Peers: ModelCompareEngine.runComparison(runID) (Foundation Lab/AdapterStudio/Services/ModelCompareEngine.swift:106); AdapterStudioViewModel.activeStreamID (Foundation Lab/AdapterStudio/ViewModels/AdapterStudioViewModel.swift:24); HealthChatView.scrollID (Foundation Lab/Health/Views/Chat/HealthChatView.swift:14); ChatMessage.entryID (Foundation Lab/Models/DataModels.swift:15); ChatMessage.init(entryID) (Foundation Lab/Models/DataModels.swift:25). Rename to \u0060documentID\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Foundation Lab/Views/Examples/RAGChatView\u002BTypes.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d3a38875140eeb47ad21bfbfd3e3daf57414854f3230acd5aff165521d6d86"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is \u0060(repository root)\u0060 (34494 LoC, 528 module-visible types across 37 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d33bc50604cf579c9233cd27b2110e1ef3571580ec067025d6ce1867416052b7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"369917e1e10990f093de6e43f5bb81087bf0018b3110b7d554800ec424effc77"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c92c381418f9aec9f7d3c94770cc34916bba8d7766f2acba4a5891ea4bca7235"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c4b3032d477edd7cfd02c41b9a81e21d48143d1d3707a2333d533d2136b0b55e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"82858c24f10fb28c0718ab64999b631f15da8aa603e0a38fc26a3c580df94bf5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5b75dd4043818b241a59ede21bfdd7794fc56933178dd99f864176e98a3112a1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6d9625caa854b323ede539c3fe44aedea54af400190018840943eef93006891d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"497010c673ee5a2b006dec17ce3fbdc73c4451e7860648d7e628a76b2ced4701"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/adapter-studio.yml"},"region":{"startLine":4}}}],"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":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.batch_size \u003C 1 or args.batch_size \u003E 128\u0060 appears character-identically in 2 files \u2014 Tools/AdapterStudio/adapter_cli/commands/train_adapter.py, Tools/AdapterStudio/adapter_cli/commands/train_draft.py. 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fe19baa013c467faedd136dd494e5a5a788e810f1112e06992330b408b65ac"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.pack_sequences and args.max_sequence_length is None\u0060 appears character-identically in 2 files \u2014 Tools/AdapterStudio/adapter_cli/commands/train_adapter.py, Tools/AdapterStudio/adapter_cli/commands/train_draft.py. 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f579a989192b7af1358560524335cb09015fc2dde914719210e6a68d3e1221"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.warmup_epochs \u003C 0 or args.warmup_epochs \u003E args.epochs\u0060 appears character-identically in 2 files \u2014 Tools/AdapterStudio/adapter_cli/commands/train_adapter.py, Tools/AdapterStudio/adapter_cli/commands/train_draft.py. 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4fb29888147e7ee7d9d5bbfd4aabd420064abdc3c0fe869f5743c52ea0b3525"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060eval_data and (not eval_data.is_file() or not os.access(eval_data, os.R_OK))\u0060 appears character-identically in 2 files \u2014 Tools/AdapterStudio/adapter_cli/commands/train_adapter.py, Tools/AdapterStudio/adapter_cli/commands/train_draft.py. 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"2888a016109678fd2973fcbe13a49110661951be568bbe04eeea668940167fb3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not train_data.is_file() or not os.access(train_data, os.R_OK)\u0060 appears character-identically in 2 files \u2014 Tools/AdapterStudio/adapter_cli/commands/train_adapter.py, Tools/AdapterStudio/adapter_cli/commands/train_draft.py. 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":"Tools/AdapterStudio/adapter_cli/commands/train_adapter.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"62eee1533d3887e32df7a368b92870f9fa28359a088142aff713b547d9083372"}},{"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":"Foundation Lab/Models/ExperimentLibraryRepository.swift"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6a3b98d81281faf8fafdcd79569ff6551667da56e31efee0dbbbf2c7b103e7"}},{"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":"Foundation Lab/Models/ExperimentPersistenceRepository.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"665cb34a498fad187a00e2167f1074f55c619ea07b211f70261882f9bf59e5f8"}},{"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":"Foundation Lab/Models/ExperimentStore.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fabb23320efb301d8b4135eb0bc5b64f95c5828dc7e0f38fb78eaedf5075315"}},{"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":"Foundation Lab/Models/ExperimentStore.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e47ad8f50be93b8982cd48edfadf8dadb597ab1bd69494d78ba49e95fd2e6b"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":13,"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."]}]}