{"$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":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"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":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"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":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"ES2","name":"Immutable events","shortDescription":{"text":"Immutable events"},"helpUri":"https://codehealth.canine.dev/dimensions/ES2"},{"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":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"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":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"ShellState::apply_with_context (cyclomatic 38): ShellState::apply_with_context has cyclomatic complexity 38 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/input.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e490ae00ac2bc24a673b61565b4827a5eaa126c7d0981fab43df14269ab1d69"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::console::run_inner (cyclomatic 34): unicity_aos_bootstrap::console::run_inner has cyclomatic complexity 34 (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":"crates/unicity-aos-bootstrap/src/console/mod.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"35723523a9e08272492067e845260f39baec4c93a5d3bece8987850c4ba68063"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::mcp::serve (cyclomatic 33): unicity_aos_bootstrap::mcp::serve has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c508f9721dcf5223a660e42b48befc6cdd8c9c4ef722a9e3d372f44d7c1666"}},{"ruleId":"D1","level":"warning","message":{"text":"App::key (cyclomatic 32): App::key has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/mod.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"c797b6fc0831eee7a99e0fff04e7192478b3bd009553ddb89849811162b21868"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusCommandReader.readBlocking (cyclomatic 30): StatusCommandReader.readBlocking has cyclomatic complexity 30 (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":"apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe22b09fce79f1d043653e6c0996e42db8c73147e01a419e5fc99a1f70ecac4"}},{"ruleId":"D1","level":"warning","message":{"text":"NeutralFallback::token (cyclomatic 29): NeutralFallback::token has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f79b574980090d4613ca14f3b514bbfed10e5e8bea379ccebea292ac2d60215"}},{"ruleId":"D1","level":"warning","message":{"text":"Patch::validate (cyclomatic 28): Patch::validate has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-model/src/store.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4fb83c63a6c35bc6ddd01c2086c61170d5bf22c883c108758d657ea4bbdf9d"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::console::view::draw (cyclomatic 28): unicity_aos_bootstrap::console::view::draw has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/view.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e16a03ba1ebcbb39408fe25a21f474d950f9e9939270b0528bba3deafbcd98e"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::handle_product_command (cyclomatic 28): unicity_aos_bootstrap::handle_product_command has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e44f453aaa610cdfc0972ddb9c69e637ace8c56fc1375d8b81ab60766c5ad042"}},{"ruleId":"D1","level":"warning","message":{"text":"LaunchArguments.parse (cyclomatic 28): LaunchArguments.parse has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/Identity.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a079138a4bcefeca6a3f467bde0954d4ab5cc3dd2e6a1a68d2ca678ac77367"}},{"ruleId":"D1","level":"warning","message":{"text":"capsule_surface_catalog::theme::validate_token (cyclomatic 26): capsule_surface_catalog::theme::validate_token has cyclomatic complexity 26 (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":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e6a877a4141bb9593648af729ead0f9c1b80c4ac9aafff56c0c5e198f5f92f"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeRuntimeSocket.open (cyclomatic 25): NativeRuntimeSocket.open has cyclomatic complexity 25 (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":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSocket.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0d5c14be2e2505a3dc061065bd354366d0c79036c12365ca56efd927b5f574c"}},{"ruleId":"D1","level":"warning","message":{"text":"PresentationCodec.parseRequest (cyclomatic 25): PresentationCodec.parseRequest 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":"apps/aos-tray/Sources/AOSTrayCore/Protocol.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df0eb9ee5498b9eed088f74cca4710b35f5263785c4c810c1841df8dbb40029"}},{"ruleId":"D1","level":"warning","message":{"text":"ThemePack::validate (cyclomatic 24): ThemePack::validate has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6af00bcbac3c9ada410d5314fc05c28ea603c109e3f14b8f5b0a70b9964afac"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::handle_distro_apply (cyclomatic 24): unicity_aos_bootstrap::handle_distro_apply has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"cddd53d2b42fb790962af2dd79146a302c6e215b2c67bffcd77e5ba49c80d0c1"}},{"ruleId":"D1","level":"warning","message":{"text":"SocketEndpoint.validateBindPath (cyclomatic 24): SocketEndpoint.validateBindPath has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/SocketEndpoint.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2e05023b728fd7460374b0bfd878598cdfbdef38216067bc4a297832b2f995"}},{"ruleId":"D1","level":"warning","message":{"text":"PendingApprovals::upstream (cyclomatic 23): PendingApprovals::upstream has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/pending.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"10da64d69312fff743820443639c18e7ddf1379e0ea21b0de7cea7ac817206ed"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::migration::archive_inactive_activation_state (cyclomatic 22): unicity_aos_bootstrap::migration::archive_inactive_activation_state has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"7adc12d1d42a7f4c0ace43338ed54a743f7bbd89edc4566a8aec17320001a0be"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeInputRequest.validate (cyclomatic 22): NativeInputRequest.validate has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeInput.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e75c7a2e5acaf0fc345c093eaf72a7fb97f72d2d14e1ef324eb0d420a74be8"}},{"ruleId":"D1","level":"warning","message":{"text":"Options::parse (cyclomatic 21): Options::parse has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/main.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c0eb5134d67069b4ccf0dd8c2b8f2ae25cfe8eb1a5dde88ad04372625affd7"}},{"ruleId":"D1","level":"warning","message":{"text":"PendingApprovals::downstream (cyclomatic 21): PendingApprovals::downstream has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/pending.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"9325c102570d225ea887eaff49a153f751209bda47be7071be3c2a433433870e"}},{"ruleId":"D1","level":"warning","message":{"text":"PrivateRuntimeFile.read (cyclomatic 20): PrivateRuntimeFile.read has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeConfiguration.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df982ab497093f5f41d6fd8391612965938f0ec2ab03da6055e75044530cd33"}},{"ruleId":"D1","level":"warning","message":{"text":"PrincipalDiscoveryReader.readBlocking (cyclomatic 20): PrincipalDiscoveryReader.readBlocking has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab4b3d87ac8f5a83b00e7134a5737ad3ae5116a3f724a896d3aa55c4fd254cab"}},{"ruleId":"D1","level":"warning","message":{"text":"Patch::validate (cyclomatic 19): Patch::validate has cyclomatic complexity 19 (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. This is NOT this file\u0027s highest cyclomatic complexity: PatchError::fmt (cyclomatic 20) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a834339e3cd8fd54d55e50850a1d0783b1a518499856a9ebdcf80a1b54e5b4"}},{"ruleId":"D1","level":"warning","message":{"text":"unicity_aos_bootstrap::console::native::connect (cyclomatic 19): unicity_aos_bootstrap::console::native::connect has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/native.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4087280bdccefaf61fe96e86ba41663778518c555a17f54a6ec4db2529f7493"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeRuntimeSetup.runBlocking (cyclomatic 19): NativeRuntimeSetup.runBlocking has cyclomatic complexity 19 (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":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"41edd4b4fe1d6a63c32a20d7859a4fcbcdea5fc6ed52064043ca2cb673bfb55d"}},{"ruleId":"D1","level":"warning","message":{"text":"ThemeTokens::resolve (cyclomatic 18): ThemeTokens::resolve has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/theme.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70cc8ad6c7201988df4372a792509b987d32a7cc65824e5a9271011517c82f0"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAIProvider::handle_event (cyclomatic 17): OpenAIProvider::handle_event 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":"capsules/capsule-openai/src/lib.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fec64ec812b6a8ca8c5acf589fca984c3157532175c91ce67dec5cd37cbd286"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAICompatProvider::process_chunk (cyclomatic 17): OpenAICompatProvider::process_chunk 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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da7490368de991384923c714b7cc03bc736e695ffa41c3823302233dab53e83"}},{"ruleId":"D1","level":"warning","message":{"text":"RecipeService::open (cyclomatic 17): RecipeService::open 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":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2388a2626bda44b92b837cc3ce38758c51b74926ef82504ca959788f67d3d25"}},{"ruleId":"D1","level":"warning","message":{"text":"aos_mcp_broker::broker::handle_mcp_call (cyclomatic 17): aos_mcp_broker::broker::handle_mcp_call 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":"crates/aos-mcp-broker/src/broker.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cda12f03b6486e545c469ff1cfd5a3aecf1e9685bb5ed96ac8b8a7d3e41216e"}},{"ruleId":"D1","level":"warning","message":{"text":"aos_mcp_broker::execute::dispatch_with_approval (cyclomatic 17): aos_mcp_broker::execute::dispatch_with_approval has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/execute.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa925a29537dd9fa4274ffee77810707a2f9676ee06721561e478acc727eea3a"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeRuntimeSocket.authenticate (cyclomatic 17): NativeRuntimeSocket.authenticate has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeAuthentication.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"e31e501b90d1b37bdae963ae30a3d6b68be51e68341e11be526f5e0cfcb2a865"}},{"ruleId":"D1","level":"warning","message":{"text":"ShellState::apply_atlas_key (cyclomatic 16): ShellState::apply_atlas_key has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/input.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25f9867ce2f04505f957704a9293ebf499f2c2e74882164f66ace86cb1a01b6"}},{"ruleId":"D1","level":"warning","message":{"text":"aos_forge::checks::check_tool_bus (cyclomatic 16): aos_forge::checks::check_tool_bus has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-forge/src/checks.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e412e80b639157be4437ef7e6e92e9fe008bb0f811ded11a88c9de26b313a0"}},{"ruleId":"D1","level":"warning","message":{"text":"aos_hook_adapter_oracle::collect_additional_context (cyclomatic 16): aos_hook_adapter_oracle::collect_additional_context has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: aos_hook_adapter_oracle::claude_mapping (cyclomatic 27) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-hook-adapter-oracle/src/lib.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"24fd4ebc32affe221cfc2b291e456dc8a1c0c4a1966230f500b2346ff8386b11"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAIProvider::execute_request (cyclomatic 16): OpenAIProvider::execute_request has cyclomatic complexity 16 (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":"capsules/capsule-openai/src/lib.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5844d94681f4794945bcc120a2d8a3a4f6e2b736155bfd73666df7943657efc"}},{"ruleId":"D1","level":"warning","message":{"text":"ReactLoop::handle_llm_stream (cyclomatic 16): ReactLoop::handle_llm_stream has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":1002}}}],"partialFingerprints":{"codehealthFindingId/v1":"1007237c167977fd7747c3d369db4cb2881804e4f07700c4ac4e4df6d1404041"}},{"ruleId":"D1","level":"warning","message":{"text":"UnixPresentationServer.readFrame (cyclomatic 16): UnixPresentationServer.readFrame has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. 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":"apps/aos-tray/Sources/AOSTrayCore/SocketListener.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"c045f89fd9bdbc2130142777972f912eb48cf95b656c4843138abf576ed10fd1"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::console::run_inner (cognitive 76): unicity_aos_bootstrap::console::run_inner has cognitive complexity 76 (threshold 15). Drivers by points: if/else 17 (51 pts), match/switch 5 (16 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/mod.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b20cac85d5aca073db2c0a62dc2dd2801a938e2215052b811690ec789646ed"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::console::view::draw (cognitive 62): unicity_aos_bootstrap::console::view::draw has cognitive complexity 62 (threshold 15). Drivers by points: if/else 34 (52 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 22). 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":"crates/unicity-aos-bootstrap/src/console/view.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf569060f303d95258c4ea6ed5c4a6f1369572e2fd677248e2136b6eacd6353"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::mcp::serve (cognitive 57): unicity_aos_bootstrap::mcp::serve has cognitive complexity 57 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 8 (24 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 34). 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":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a33a341f81951196ae677d9d4b5d3b7d01dde98f8a7a8d2765c7a8ac57172f"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusCommandReader.readBlocking (cognitive 41): StatusCommandReader.readBlocking has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 7, ternaries 1 (2 pts), loops 1 (nesting depth added 11). 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":"apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5f266964dd44b9ad50c40bee58b087d82e7256e5ecdfd596ecb1134f64b861"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::handle_distro_apply (cognitive 40): unicity_aos_bootstrap::handle_distro_apply has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), match/switch 6 (8 pts), boolean chains 2 (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":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4dd3e5f6397c6476ef375366f00cafc836b442302ec1acadb7aaf1fc8d85283"}},{"ruleId":"D2","level":"warning","message":{"text":"LaunchArguments.parse (cognitive 40): LaunchArguments.parse has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 10, match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/Identity.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"9324ae6055323c7c607948230453928ba306b3832fd46df277a14b7b55991869"}},{"ruleId":"D2","level":"warning","message":{"text":"RecipeService::open (cognitive 38): RecipeService::open has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 2 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e9d87f5c896714459ec0cf9f7e9b81a144c85a0728c5779582c3ccc655819a"}},{"ruleId":"D2","level":"warning","message":{"text":"PendingApprovals::downstream (cognitive 37): PendingApprovals::downstream has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/pending.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"8618a3dce160848f1592d223b5834320a161fb9ae821861c475e324d13951508"}},{"ruleId":"D2","level":"warning","message":{"text":"UnixPresentationServer.readFrame (cognitive 37): UnixPresentationServer.readFrame has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 1 (nesting depth added 22). Of this number, 36 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. 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":"apps/aos-tray/Sources/AOSTrayCore/SocketListener.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d8b05a3493af83adfed3dd50a6df9a315d65e9930e0803342ec44495ebd58a"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_forge::checks::check_tool_bus (cognitive 35): aos_forge::checks::check_tool_bus has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-forge/src/checks.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca7551c7e25be986178394b2275b3bba972454e78db9b79659cfe5ce7289077"}},{"ruleId":"D2","level":"warning","message":{"text":"SocketEndpoint.validateBindPath (cognitive 35): SocketEndpoint.validateBindPath has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 5, loops 1 (nesting depth added 11). 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":"apps/aos-tray/Sources/AOSTrayCore/SocketEndpoint.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"353284e2aa04f3d24cea237608ec03717b3e9a4723aeb4f9aa984ba7421cf76b"}},{"ruleId":"D2","level":"warning","message":{"text":"CliProxy::run (cognitive 34): CliProxy::run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 5 (9 pts), match/switch 3 (9 pts) (nesting depth added 21). 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":"capsules/capsule-cli/src/lib.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a6d19e0f929937a3f0cf0f252a18563c88b6ad4a0080a1c5cf502f11782b7d"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeRuntimeSocket.open (cognitive 34): NativeRuntimeSocket.open has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 11, error handling 1, 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":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSocket.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"873c9ba83ca7ae36a9a0c2cd41359469e8df74ce0eb113c8cea18c38a0c769e8"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_hook_adapter_oracle::collect_additional_context (cognitive 32): aos_hook_adapter_oracle::collect_additional_context has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-hook-adapter-oracle/src/lib.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"8189e0291f059a087460920a6358033383179149d187e2e36c5fe66e53661e98"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAICompatProvider::process_chunk (cognitive 32): OpenAICompatProvider::process_chunk has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb5b253307e82f5c362f37f78f793f0822413a56cca29d27cfd0b7ce2274e23"}},{"ruleId":"D2","level":"warning","message":{"text":"ThemePack::validate (cognitive 32): ThemePack::validate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6 (9 pts), boolean chains 6 (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":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"6586e281e8eec8bd0d1943b2596e1538b06fd76017217c9c718d52bbeb0baebb"}},{"ruleId":"D2","level":"warning","message":{"text":"capsule_surface_catalog::theme::validate_token (cognitive 32): capsule_surface_catalog::theme::validate_token has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, match/switch 1 (nesting depth added 11). 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":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"fefe274df8183258600f3bd8aa58e6393c3c53f04c3209787341713e7af1b3c3"}},{"ruleId":"D2","level":"warning","message":{"text":"PendingApprovals::upstream (cognitive 32): PendingApprovals::upstream has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 4, match/switch 1 (nesting depth added 13). 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":"crates/unicity-aos-bootstrap/src/mcp/pending.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1d716ac4009f14900e8bb93ffbbfafd33ed974e395cfa150ad4e580e5f1e6e3"}},{"ruleId":"D2","level":"warning","message":{"text":"LayoutPolicy::resolve (cognitive 31): LayoutPolicy::resolve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 13). 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":"apps/adaptive-shell/src/layout.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ff056d51c57bea9bbfe1c9146c6e065c16e8448b8bd206fdda7075cfe38662"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::migration::archive_inactive_activation_state (cognitive 31): unicity_aos_bootstrap::migration::archive_inactive_activation_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (6 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"56018b3a09ad3f9556d481e21ad4e9a38e12d14293de189f5271d148cf8ce96e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtlasLayoutPolicy::resolve (cognitive 30): AtlasLayoutPolicy::resolve has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (25 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). 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":"apps/adaptive-shell/src/atlas.rs"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3a1fa799d615a78f548e697e3587a3c6af2513bcadf9f4b5e1bb404daf6b44"}},{"ruleId":"D2","level":"warning","message":{"text":"Patch::validate (cognitive 29): Patch::validate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 8, match/switch 1 (2 pts), 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":"capsules/capsule-surface-model/src/store.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef3e2c63217789de29589503185a9d60f83e008976ba676f53c8ee41fd39b7e4"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_hook_bridge::collect_responses (cognitive 28): aos_hook_bridge::collect_responses has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-hook-bridge/src/lib.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5c7ac350aec018f9d341ff30bc3430c3cd63a4f50ff69c504e31914cfaac2f"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::approval::handle_mcp_ingress_respond (cognitive 28): aos_mcp_broker::approval::handle_mcp_ingress_respond has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"56c5c50ef0ddc99b19757f05b9b30cc1ee8df6882719e867a0f10ceba7a4f9a1"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::updates::oracle::check (cognitive 27): unicity_aos_bootstrap::updates::oracle::check has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (6 pts), boolean chains 1, loops 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":"crates/unicity-aos-bootstrap/src/updates/oracle.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f83354bfacd4a134dec2fca2c2faafb2924468daa74f63eeca8554bf4708ee7"}},{"ruleId":"D2","level":"warning","message":{"text":"PresentationCodec.parseRequest (cognitive 27): PresentationCodec.parseRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 8, loops 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/Protocol.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"986a9dc5f9737dccd8bf036f1b921eb5668452af8580330093cf4de9942fc47d"}},{"ruleId":"D2","level":"warning","message":{"text":"ShellState::apply_with_context (cognitive 26): ShellState::apply_with_context has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/input.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f217b03169687d58e048bf48176acea97fe19a4853fd1db0acf372f721f4c4"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::native_setup::canonical_setup_home (cognitive 26): unicity_aos_bootstrap::native_setup::canonical_setup_home has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). 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":"crates/unicity-aos-bootstrap/src/native_setup/mod.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f035680af7e7594e0eadc43bf9b2d1ec6c137a0d5ed792f6ffb5d4353d0adc"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivateRuntimeFile.read (cognitive 26): PrivateRuntimeFile.read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, loops 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeConfiguration.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aac13dcd905e6ffcbf4014eb148a4b555c8d678e3c1ca63b73d05dabb37ca91"}},{"ruleId":"D2","level":"warning","message":{"text":"PrincipalDiscoveryReader.readBlocking (cognitive 26): PrincipalDiscoveryReader.readBlocking has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"d306374931391c82ee97a7063fb5f7a031729bbbaa218ece0513d6a52e2b6388"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_prompt_builder::fire_before_prompt_build (cognitive 25): aos_prompt_builder::fire_before_prompt_build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-prompt-builder/src/lib.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"90592ba1f09737d21e128ba530a43df6117740c1080d87804a96085267c22f7a"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::broker::handle_mcp_call (cognitive 25): aos_mcp_broker::broker::handle_mcp_call has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 4 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/broker.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b61b2fb93d831c5ccd0d6a6075c64b4ea3b99446ba01e4e671d188a99db336"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::console::native::connect (cognitive 25): unicity_aos_bootstrap::console::native::connect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, match/switch 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/native.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e9c01b6458b516bcb30bcfc58863837eb4ef1a57a87653f912ee0033dff83f"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeInputRequest.validate (cognitive 25): NativeInputRequest.validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 11, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeInput.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c9fb5ccec1e912bef62e304479fb29a0d355e26f7c9fe7854025dd551653ec"}},{"ruleId":"D2","level":"warning","message":{"text":"ShellState::apply_atlas_key (cognitive 23): ShellState::apply_atlas_key has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/input.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1359932de64c016f306311f7987d21edf41f2a7a7ad4691e8ed7886d11b73dcb"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_prompt_builder::collect_tool_schemas (cognitive 23): aos_prompt_builder::collect_tool_schemas has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (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":"capsules/capsule-prompt-builder/src/lib.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"29f361789cbc8aaa179230a3d8b8f53b08b0d9fd35d0952a8fbd60422a92262d"}},{"ruleId":"D2","level":"warning","message":{"text":"App::key (cognitive 23): App::key has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/mod.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"54778d5fddd7e502beef341be5b504c829555359e7b3947a3a8c1fac143a1b70"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_registry::dispatch_cli_run_messages (cognitive 22): aos_registry::dispatch_cli_run_messages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). 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":"capsules/capsule-registry/src/lib.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"03003b9666a867544cf5a748d1f3c2f27406b5e28c6901a01d67864e2e8c14d7"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_session::do_search (cognitive 22): aos_session::do_search has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-session/src/lib.rs"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a93d632fb9df9547ceca6318fa127f1b7d6bad1c224916262c8994722848540"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::execute::dispatch_with_approval (cognitive 22): aos_mcp_broker::execute::dispatch_with_approval has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 7 (9 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/execute.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b945c16342fb19297068f30eb4cd2150194c5083d0e916f5524d2d0e09b4a2"}},{"ruleId":"D2","level":"warning","message":{"text":"CapsuleLibraryView.body (cognitive 22): CapsuleLibraryView.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTray/CapsuleLibraryView.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b2efb4729128e0d189c35ea537467f509c283b616df28ed0fd4595a009c9e7"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeRuntimeSetup.runBlocking (cognitive 21): NativeRuntimeSetup.runBlocking has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, loops 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd3fd593dd0347189d91f5797a23e0fba057b5d6192fd3520d2473e0c687018"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeRuntimeSocket.authenticate (cognitive 21): NativeRuntimeSocket.authenticate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (10 pts), error handling 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeAuthentication.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85fdb41f2cb1e87783572bbdb60e6cc2e26b4dc49ad5eeb1ff5090c9a88e3d9"}},{"ruleId":"D2","level":"warning","message":{"text":"Patch::validate (cognitive 20): Patch::validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8ea3f3386ff7470fbc60e4f8dbf980d25a65938c631b10accdb329f3485a8a"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_hook_adapter_oracle::collect_binding_response (cognitive 20): aos_hook_adapter_oracle::collect_binding_response has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-hook-adapter-oracle/src/lib.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"155ca5f1310d273b56053a8e04caf909e30d36ec5e48414ebecd2e10bc537635"}},{"ruleId":"D2","level":"warning","message":{"text":"NeutralFallback::token (cognitive 20): NeutralFallback::token has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"64998d9d225b0d81f18417fed873ddcbfdd67d4177ee83e6d9526a531f010bf3"}},{"ruleId":"D2","level":"warning","message":{"text":"RequiredReplies::parse (cognitive 19): RequiredReplies::parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-hook-adapter-oracle/src/decision.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"f717168bdaef24ea1c119f66e26abcf601810542c45478b8f88dd993def9a28b"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIProvider::execute_request (cognitive 19): OpenAIProvider::execute_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, loops 1 (2 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":"capsules/capsule-openai/src/lib.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c13ce17c241a2c42fc1633a7697dee42788c1d6fb3035d2b7a0bdcc1af278d7"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAICompatProvider::parse_sse_stream_live (cognitive 19): OpenAICompatProvider::parse_sse_stream_live has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (6 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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc614836197aaff3c5cec9f5ba70b917e3a2498bab3e026a84dce4887383ac4"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemTools::system_status (cognitive 19): SystemTools::system_status has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (8 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":"capsules/capsule-system/src/lib.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bda89a98c9867f2862177e9910ffe024708745b12151c7f6717333a1bf8216e"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::mcp::intercept_downstream (cognitive 19): unicity_aos_bootstrap::mcp::intercept_downstream has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e7b4e49c022d017c171c19c7e2131789c0fc242c9b07c48613acca6191374c"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::version::parse_release (cognitive 19): unicity_aos_bootstrap::version::parse_release has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/version.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"7adebc5266c1029dbb06a3e0095f6d4466590ae78043394ba9046a3ab55d929f"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeRuntimeInputConnection.receive (cognitive 19): NativeRuntimeInputConnection.receive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeInputConnection.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"b154d2909aabe5e2e12dfa4f19dbe6ad6eba88f80e065a9034ac86a5ed2cb22c"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIProvider::handle_event (cognitive 18): OpenAIProvider::handle_event has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-openai/src/lib.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4f6a37c873d80df09644928dac0d665ab266c9232f969e1522d1222ea06114e"}},{"ruleId":"D2","level":"warning","message":{"text":"Registry::run (cognitive 18): Registry::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-registry/src/lib.rs"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79c5efb4c26ecf5806caa4507c3e47754d7f11ae89f3f333917ce06cfe0a7d1"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::leading_runtime_root_index (cognitive 18): unicity_aos_bootstrap::leading_runtime_root_index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9410319f2bba89d9fc3d5463f0c709f9d76001d9a0ee48bd4a9a92839fc9acb"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::updates::capsules::check (cognitive 18): unicity_aos_bootstrap::updates::capsules::check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 4. 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":"crates/unicity-aos-bootstrap/src/updates/capsules.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2b2263adbcbcc237aa2c0a397e8d26fe4d72c67f157500e0db0e197087e8a8"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeRuntimeSetup.realHome (cognitive 18): NativeRuntimeSetup.realHome has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f45606af5d79389347178b488801c1184e0c8f7a4a79cd4eeda8e98cf113052"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIProvider::parse_sse_stream (cognitive 17): OpenAIProvider::parse_sse_stream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 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":"capsules/capsule-openai/src/lib.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44937b0177a200fa849fbcbfea832c427f2bc19c8547f19a2297298f6b7fbec"}},{"ruleId":"D2","level":"warning","message":{"text":"capsule_surface_model::store::merge_disjoint_fields (cognitive 17): capsule_surface_model::store::merge_disjoint_fields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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":"capsules/capsule-surface-model/src/store.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c63e4c62dac82d6ed77151c31ebdb4581e01e768f1f61045f73a8cb27f9e876"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::handle_runtime_stop (cognitive 17): unicity_aos_bootstrap::handle_runtime_stop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0033532f4677b15586ba70fd878bb34953ce00bc587f62d11cdae7ecb368aff"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::mcp::prepare_client_message (cognitive 17): unicity_aos_bootstrap::mcp::prepare_client_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"0043e5e792594cd344821b60efc6be89976d12a6558a9d9faa9ff6600b3d17c4"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::updates::run (cognitive 17): unicity_aos_bootstrap::updates::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (3 pts), match/switch 2 (nesting depth added 6). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/updates/mod.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"4231f463a5cba6afd7ff4e23f56935dfc514018ae71dc8e9ca3a0990c163774b"}},{"ruleId":"D2","level":"warning","message":{"text":"OverviewView.body (cognitive 17): OverviewView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"apps/aos-tray/Sources/AOSTray/OverviewView.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fbc3dbfd0ce48473e98132393eafa0dff6e1b9744dbef87b7094ceea7f1083"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAICompatProvider::execute_request (cognitive 16): OpenAICompatProvider::execute_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7cc57d7131b6b961f69af284a64addaf8e46c91ba41f97a33d0250b7c41b1ff"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_shell::check_single_command_catastrophic (cognitive 16): aos_shell::check_single_command_catastrophic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-shell/src/lib.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b2fcadae1a8b47ca11dcd5dbf188981e2d15f099c32cc17bac92d24063e6ed"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::approval::handle_mcp_grant_respond (cognitive 16): aos_mcp_broker::approval::handle_mcp_grant_respond has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d93fa2fbd2d7d71cfa1093c8e8dfc429b721195b91b08b31be0645fd16d6093"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::approval::result::resolve_with_decision (cognitive 16): aos_mcp_broker::approval::result::resolve_with_decision has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval/result.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa132e6ab1e6654ba4195279b8292eb00206502e84ef571a6c069b71f910ce3"}},{"ruleId":"D2","level":"warning","message":{"text":"aos_mcp_broker::policy::validate (cognitive 16): aos_mcp_broker::policy::validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/policy.rs"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"012f3ccf0cb8e3cdb0bb2b9ff8a0556c478e23f82071ecc45a7b3125f2ed1c66"}},{"ruleId":"D2","level":"warning","message":{"text":"Request::send (cognitive 16): Request::send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (5 pts) (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/model.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c2022e9d1975c5675ff8c337c99c2e68692f94d1bc2cfd3a907a5cd8058949"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::distro_trust::write_private_atomic (cognitive 16): unicity_aos_bootstrap::distro_trust::write_private_atomic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"54856cae1da728a699b5bd4ee943461604676cd877341074e19e7c24675e13c0"}},{"ruleId":"D2","level":"warning","message":{"text":"unicity_aos_bootstrap::handle_product_command (cognitive 16): unicity_aos_bootstrap::handle_product_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36a08d2fc21239db491cc4c07905b752688030c6cda8388fcbdd2cd98752ebd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: aos_mcp_broker::broker::handle_mcp_call: FunctionTooLong \u2014 aos_mcp_broker::broker::handle_mcp_call runs 251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 151 over it, 2.51\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/broker.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"978213dee03074011c1f1e3234a6716def43a0ad9ae7c0a9dbc5d85c48ba660a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: unicity_aos_bootstrap::mcp::serve: FunctionTooLong \u2014 unicity_aos_bootstrap::mcp::serve runs 241 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 141 over it, 2.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e27b4434d32db9f2aab3dd3c41933d43bac461068079f35863e1b85953c601"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: unicity_aos_bootstrap::console::view::draw: FunctionTooLong \u2014 unicity_aos_bootstrap::console::view::draw runs 231 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 131 over it, 2.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/view.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f01f13607a1a563f147ffbc29eefc2569392a5ccc5010fb3f097531e381e7a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 987 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 65% of them inside a single declaration: ReactLoop (2 blocks, 529-2079). The bar is 500 significant lines; this is 487 over it, 1.97\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f28054b4c9f6e52b274eaec1510a98fd7b48f81b86e75184dabb2a8b47be4b95"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/main.rs: FileTooLong \u2014 934 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 434 over it, 1.87\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c8636a49766e3ddf58fc467b340e6adeb21f0c289cb89716a27284a60f67906"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/theme.rs: FileTooLong \u2014 870 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 370 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"500014d94e375537655d8c82b2f021a3481b3fcacdde2d35ca28207fc4eb2604"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/migration.rs: FileTooLong \u2014 858 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 43 free functions. The bar is 500 significant lines; this is 358 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e27cd4b1d9270c6b3a092631de3cc1c1e3f8b8d746229377fcdb19d5b8a463"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ReactLoop: ClassTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 25 methods, 2 blocks, lines 529-2079. The bar is 400 significant lines; this is 244 over it, 1.61\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c7d01bbdc7718957ff6e3e0d98188cffeefae7ad9f4e640bfe2b8b9b5016d0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 755 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 255 over it, 1.51\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-session/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e262d6805f1a7260d30d7b0226c5da4a0c5214a8dd13a3524c1f1bd57b86158c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: capsule_surface_catalog::theme::palette: FunctionTooLong \u2014 capsule_surface_catalog::theme::palette runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab30fe6ce5fc0478dd2c2fe333507f0df038f9fc5e99d56d346c6239cfeda70"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/mod.rs: FileTooLong \u2014 719 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 219 over it, 1.44\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cbac3f08c943e34e9d0ee8886c2b1156481b3984ec0efc9caca305d1b9aee3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AosHome: TooManyMethods \u2014 41 methods, declared across 2 files: src/lib.rs (40), runtime_command/mod.rs (1). The bar is 30 methods; this is 11 over it, 1.37\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":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfaa3c09febfd825fdb581f422cfcf1c4c4d0017858e0cbfefe577b7fdc0c534"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ThemeTokens.resolve: MethodTooLong \u2014 resolve runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/theme.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"45057dd8837582340ea8fcc70c3b602733f4649407e724850648d11ee3b3759c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/service.rs: FileTooLong \u2014 597 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 73% of them inside a single declaration: RecipeService (2 blocks, 104-648). The bar is 500 significant lines; this is 97 over it, 1.19\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"740fe3c79e19c605b33491eaa5d8c543894231598ad1a81cc97342f76775fe2a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LayoutPolicy.resolve: MethodTooLong \u2014 resolve runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/layout.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"423831f02680c451a9bad23d4bfbf80d724708051e46aef985406e58ad7caca3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/components.rs: FileTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 75 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-model/src/components.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d6e291bbe2dedba96abfab2fcdfa6f3322e5b4ddbb7b2220cf462aed974b42"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/components.rs: FileTooLong \u2014 574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 74 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3639b600a889938d56769843e8258034e0d96aeb254f08c1de803f32249e0d3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/store.rs: FileTooLong \u2014 574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 74 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-model/src/store.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa1628bb05122a7a68703cb7f0781eef1fb1df375251c4721eb902019e3abe9e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/activity.rs: FileTooLong \u2014 568 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 68 over it, 1.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30b548c5a733fcbc7dbc54aa6d97b21d58f7182daa3de97a8f0568e63e411ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 62 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-rhai/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9546b34b948162ca6825927a2f0f4031ec0f1fdfb95e4c1550e83a98a3b18a3b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Store: ClassTooLong \u2014 446 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 29 methods, 2 blocks, lines 79-699. The bar is 400 significant lines; this is 46 over it, 1.12\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-users/src/store.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd076621af353b087bf9a26c7036a696d923f28cf3fc82907c14f9b27f966503"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: RecipeService: ClassTooLong \u2014 438 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 13 methods, 2 blocks, lines 104-648. The bar is 400 significant lines; this is 38 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ffaa4dc80d12aff81c492fb5219848d6a6266e718808867d9f3a57bd4765dc0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: native_setup/mod.rs: FileTooLong \u2014 546 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 46 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/native_setup/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7953ebae43969017d0b24f8202b096a5671a1644f961aae1fbd0f6817df97c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: unicity_aos_bootstrap::console::run_inner: FunctionTooLong \u2014 unicity_aos_bootstrap::console::run_inner runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/console/mod.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7027a8f49c9f9dd15c859501b2eecde69248de18f9a325681e05e0eab2c31b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 541 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 41 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eb2600dd442efb9b3ca450e31ffc3b17846de3d2c64f82e96a3dff7ebd5c585"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: unicity_aos_bootstrap::distro_trust::verify_release_directory: FunctionTooLong \u2014 unicity_aos_bootstrap::distro_trust::verify_release_directory runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dca6638ba8c568dbb4fb91a5e9dc946488fbbe01f52ab15c9b5866bb669f533"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (51 shared lines): capsules/capsule-workspace-recipes/src/service.rs:260-321 | capsules/capsule-workspace-recipes/src/service.rs:328-408 \u2014 These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"561e893cdd33b5021eb012b95eb427cae790731260228127e585aba594e1253c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/unicity-aos-bootstrap/src/distro_trust.rs:266-336 | crates/unicity-aos-bootstrap/src/migration.rs:331-414 | crates/unicity-aos-bootstrap/src/migration.rs:426-452 | crates/unicity-aos-bootstrap/src/migration.rs:778-806 \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":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07b4dec8f067a1ae7dbcb5f5fe2b2773a40def863d4f54bb2fd639b92b7f14e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/unicity-aos-bootstrap/src/status/mounted_volume.rs:42-82 | crates/unicity-aos-bootstrap/src/updates/mod.rs:152-167 | crates/unicity-aos-bootstrap/src/updates/oracle.rs:28-86 | crates/unicity-aos-bootstrap/src/updates/process.rs:21-98 \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":"crates/unicity-aos-bootstrap/src/status/mounted_volume.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"48445de42600d5edb983493a90430053ffd1540d8e485b6c24bc751c816fdc61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (61 corresponding lines): apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift:79-139 | apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift:15-90 \u2014 These two members are one piece of code written twice and then edited apart: 61 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":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"958d83f9d4e14a76404ab56a8760b8dea2c1ba302a0e77e6caee3fcd2a7d410b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:269-328 | apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:156-219 \u2014 These two members are one piece of code written twice and then edited apart: 60 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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdaf6c4421e596c5ce8b13715b8b3cad533cc2ee85419070b4b8365d106f2c16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (65 corresponding lines): capsules/capsule-openai-compat/src/lib.rs:542-606 | capsules/capsule-openai/src/lib.rs:464-530 \u2014 These two members are one piece of code written twice and then edited apart: 65 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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"e03f6b2b18ab969be75b3ca3c047573af8446aaa9a7be97e99484a0bc8733c9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): apps/aos-tray/Sources/AOSTray/LibraryPrincipalForm.swift:24-58 | apps/aos-tray/Sources/AOSTray/NativeRuntimeSetupForm.swift:70-104 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"apps/aos-tray/Sources/AOSTray/LibraryPrincipalForm.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fb33e828b0ba8a652d6cdde5fed953943563039f99c4b795f46ead5f1d07e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): capsules/capsule-shell/src/lib.rs:509-553 | capsules/capsule-shell/src/lib.rs:558-594 \u2014 These two members are one piece of code written twice and then edited apart: 37 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":"capsules/capsule-shell/src/lib.rs"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"58138243003bb1d61188543739541ef9efa11797b2296f7618532f5a73feb866"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): capsules/capsule-users/src/responses.rs:36-56 | capsules/capsule-users/src/responses.rs:60-74 \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":"capsules/capsule-users/src/responses.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"940a1d7cce5997e070ef60e2f6c3911d9ac8244cb65f62f04ce5748ca5478097"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 27\u002B corresponding lines): capsules/capsule-users/src/lib.rs:112-143 | capsules/capsule-users/src/lib.rs:317-343 | capsules/capsule-users/src/lib.rs:391-420 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"5898ec1f338b3b18dd9bf786583efb0d684548eec5d3ab1d3db583f3d20bed29"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/unicity-aos-bootstrap/src/main.rs:257-287 | crates/unicity-aos-bootstrap/src/main.rs:290-317 \u2014 These two members are one piece of code written twice and then edited apart: 28 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":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ca7a7e6b85ce016aa3211bfaefcce8519c4434c9fc7095cfb5f2db5549e686"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): apps/adaptive-shell/src/components.rs:867-886 | capsules/capsule-surface-model/src/components.rs:725-742 \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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1600070223e84c1a10cacd40e69d14877c260bac5b4d4b5665546a8df4a04d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): capsules/capsule-session/src/lib.rs:1088-1115 | capsules/capsule-session/src/lib.rs:1210-1236 \u2014 These two members are one piece of code written twice and then edited apart: 27 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":"capsules/capsule-session/src/lib.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98596827fa0cda7f509c3393537b9b93520fab259ea9b0c6648b370a3bda3f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): capsules/capsule-users/src/store.rs:336-361 | capsules/capsule-users/src/store.rs:531-554 \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":"capsules/capsule-users/src/store.rs"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bcef02ccab4eaf330d7b339e9a950f56f249bcf88febc07a9a52afc3fc1b32d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): apps/adaptive-shell/src/components.rs:556-584 | capsules/capsule-surface-model/src/components.rs:450-475 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"1af2b0074fd489374f65ec2aa18ab333ecd64283fa61bf80d00fcfc2d782edf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): capsules/capsule-openai-compat/src/lib.rs:187-210 | capsules/capsule-openai/src/lib.rs:155-176 \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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4083418249343770d18826d4d424aeb20c5473eb834525781db3e0ad243b73e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): apps/adaptive-shell/src/activity.rs:101-121 | apps/adaptive-shell/src/activity.rs:455-472 \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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc62e2b8220edcae2eb59bfa1d8552214664fee575e0bba161a89e72399f279"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): capsules/capsule-surface-model/src/activity.rs:37-55 | capsules/capsule-surface-model/src/activity.rs:97-115 \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":"capsules/capsule-surface-model/src/activity.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94ba2a9485f4b8eb99e1a8062f7691b94ee5463337be428b2a1588991e02775"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 18\u002B corresponding lines): capsules/capsule-users/src/lib.rs:146-170 | capsules/capsule-users/src/lib.rs:211-231 | capsules/capsule-users/src/lib.rs:234-254 | capsules/capsule-users/src/lib.rs:257-274 | capsules/capsule-users/src/lib.rs:277-294 | capsules/capsule-users/src/lib.rs:297-314 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 18 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"361f05df87a4e701e59f16044f39ff61fddf6add18e5f3c487193fe45522b93f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): capsules/capsule-session/src/lib.rs:539-562 | capsules/capsule-session/src/lib.rs:574-602 \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":"capsules/capsule-session/src/lib.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71f134fb774400fb9d6123b19b49922a5cf3b95f0868ca65de8e6d71a4921f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): capsules/capsule-users/src/lib.rs:173-191 | capsules/capsule-users/src/lib.rs:346-366 | capsules/capsule-users/src/lib.rs:369-388 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"d719323dd458e5b8f3a5d98561f658a47df4011a43ef18916d32661f71ab10c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): capsules/capsule-openai-compat/src/lib.rs:53-74 | capsules/capsule-openai/src/lib.rs:53-74 \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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c23695d79e4a7ce9b294d3c20008f6cbac1e87edb5f34711654a39b491d741"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/unicity-aos-bootstrap/src/distro_trust.rs:503-518 | crates/unicity-aos-bootstrap/src/distro_trust.rs:520-535 \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":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8caa7fc83b082a869f5df7c6820f33b7c6597e14173f67dbc9d83c7692c1d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/unicity-aos-bootstrap/src/migration.rs:945-961 | crates/unicity-aos-bootstrap/src/migration.rs:967-982 \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":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc577c9e4dc58632703ba4a7761a7e94f0db07b4143f7c77e4bf6a7483ba7a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/aos-mcp-broker/src/execute.rs:450-475 | crates/aos-mcp-broker/src/execute.rs:563-591 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/execute.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f67c4a8caa8352d85edc6d3b8e76e84832bcd9ca93f36c9fc860ea2a398190"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): capsules/capsule-session/src/lib.rs:1123-1140 | capsules/capsule-session/src/lib.rs:1183-1200 \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":"capsules/capsule-session/src/lib.rs"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f7cd46423df9a5590601797ad49f0aa245df6cf86ece9f0380aec9b611de7dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/unicity-aos-bootstrap/src/cli/principals.rs:31-49 | crates/unicity-aos-bootstrap/src/cli/status.rs:36-54 | crates/unicity-aos-bootstrap/src/main.rs:899-915 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 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":"crates/unicity-aos-bootstrap/src/cli/principals.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2bf96cd849a9d41df41ce65e006275147e46da34589d7acef98ede512caf2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): apps/adaptive-shell/src/components.rs:382-394 | capsules/capsule-surface-model/src/components.rs:306-318 \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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f180ed2be5e82fc4f87b02d62b75c7d521759de6efaf0b10b58841cfaa0752d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): apps/adaptive-shell/src/activity.rs:230-244 | capsules/capsule-surface-model/src/recipe.rs:200-217 \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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f226148e8398ad9e910267e589b4fdd5267019ce7c379486941aa818363047"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): capsules/capsule-surface-model/src/activity.rs:22-30 | capsules/capsule-surface-model/src/activity.rs:74-82 \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":"capsules/capsule-surface-model/src/activity.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"34a6ea136af816c92e10b9e3e27d78513b31470fa6023f2b898b17c3743ffc07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:330-342 | apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:344-355 \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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b35e7c6c6d9e3ac0e03060155bbbeb2e0a920dbc69b8fc52c5b2bfe59987877"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): capsules/capsule-surface-catalog/src/theme.rs:329-341 | capsules/capsule-surface-catalog/src/theme.rs:377-387 \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":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"2199464834f84f072f66fedac21632489880f9ce4a3a2fa3ce97cc70960abce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): capsules/capsule-identity/src/lib.rs:339-352 | capsules/capsule-identity/src/lib.rs:354-367 \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":"capsules/capsule-identity/src/lib.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"7370a443b1d25323e845bf23d7b23675c046d658b15cd81cf2561b9d9c53a710"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/aos-mcp-broker/src/cache.rs:235-249 | crates/aos-mcp-broker/src/execute.rs:419-434 | crates/aos-mcp-broker/src/grant_decision.rs:241-255 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/cache.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec112b440a211ad5d5dd6728191eb32f5bf9cf9cbe0bc89e3736c1535f96754"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): crates/aos-mcp-broker/src/approval.rs:1102-1113 | crates/aos-mcp-broker/src/broker.rs:827-838 | crates/aos-mcp-broker/src/hook_gate.rs:158-169 \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":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef7189a30ad0d22222042bbf4f90826fc80c988f773c0d08e088af10d3d0153"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): capsules/capsule-react/src/lib.rs:193-203 | capsules/capsule-react/src/lib.rs:227-237 \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":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"842698f618f81fde9ff4a6dd485eec5e14947a6876c0f1f3997405bf317d6d49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): capsules/capsule-workspace-recipes/src/backend.rs:122-133 | capsules/capsule-workspace-recipes/src/backend.rs:153-163 \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":"capsules/capsule-workspace-recipes/src/backend.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1c73962cddf80abbe044cfe2008ea7bf531a1e6a4f9fd0ebda7717b3acb5e4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/unicity-aos-bootstrap/src/command_center.rs:3-12 | crates/unicity-aos-bootstrap/src/main.rs:561-567 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/command_center.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa280cb18bb71990a56cf8d7c34a91b1d67144caeb8f982e8e80cbadfd6ae92"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:163-177 | apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:141-154 \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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"6767eebc7a6a222a856acfbcb9c8637035feba906791087874dbee3be4494c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/aos-mcp-broker/src/approval.rs:760-772 | crates/aos-mcp-broker/src/approval.rs:978-990 | crates/aos-mcp-broker/src/approval.rs:994-1007 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"0772d37a4463509538080ff6a1008d77e547cdca55d890c078e1805ae9d1a5d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): capsules/capsule-surface-model/src/recipe.rs:114-126 | apps/adaptive-shell/src/activity.rs:186-197 \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":"capsules/capsule-surface-model/src/recipe.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"26cede6e6edd7aa9bc06294ac4480277a2973993fa25bc289dc6ebc18cdcd184"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/unicity-aos-bootstrap/src/lib.rs:662-668 | crates/unicity-aos-bootstrap/src/native_setup/mod.rs:674-680 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30245b0b1aeed7b53eb27eb5c022d170b01a366c9828aebbecd4aaf89e378a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): capsules/capsule-react/src/lib.rs:95-100 | capsules/capsule-session/src/lib.rs:117-122 \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":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"943bae8854b9bebadd4fcb506184a4505439db3c91c4439d67995bd300095259"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): apps/adaptive-shell/src/activity.rs:58-64 | apps/adaptive-shell/src/atlas.rs:26-32 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ea3876983015d7ba791d34a5a1a572adf1b11e28ca0e0d99a6796f8734f8c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): capsules/capsule-cli/src/lib.rs:85-90 | crates/unicity-aos-bootstrap/src/hook.rs:328-334 \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":"capsules/capsule-cli/src/lib.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d79225da1d91fc8bd73c6755e7b806484bde1ec2bf411e9ae67b20d4d660444"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 4\u002B corresponding lines): apps/adaptive-shell/src/activity.rs:82-85 | apps/adaptive-shell/src/atlas.rs:50-53 | apps/adaptive-shell/src/components.rs:591-594 | capsules/capsule-surface-model/src/error.rs:14-17 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"086409ae8e2e8b42ac4cac8affc81a46ed0dea9dc55710c65d507ab258b78f1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): apps/adaptive-shell/src/components.rs:523-526 | capsules/capsule-surface-model/src/components.rs:422-425 \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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a66fda8b8f248c1410d6668787caf1b0ee19b44608596050c4dc625595c5d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): capsules/capsule-openai-compat/src/lib.rs:609-616 | capsules/capsule-openai/src/lib.rs:533-540 \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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43c8a72c2842680cacc4371e2d587b72a83e2769520e24ebd89a9407ebcb5f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (78 lines \u00D7 2): apps/adaptive-shell/src/components.rs:623-700 | capsules/capsule-surface-model/src/components.rs:501-578 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"e961b5f2d97708f8ddbfdc58745cce923e30b7e6aa4191083a8fdc649ec7d555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (58 lines \u00D7 2): apps/adaptive-shell/src/components.rs:225-282 | capsules/capsule-surface-model/src/components.rs:149-206 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f30dec66d938b1c80e33630359417d72a5aa4fae43f0dcb33e5ca8a1f756f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): apps/adaptive-shell/src/components.rs:747-787 | capsules/capsule-surface-model/src/components.rs:616-656 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ada2d28a353ebae02d0e02fad2770f91d62c1e8403b96757c162e21e157abe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): capsules/capsule-workspace-recipes/src/service.rs:278-305 | capsules/capsule-workspace-recipes/src/service.rs:365-392 \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 \u0060capsules/capsule-workspace-recipes/src/service.rs:278\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":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ca2f916eb617e9e6d45e9ad9409c0e04fe51a80f8344c6662e0ffdbbc3f651b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): capsules/capsule-rhai/src/lib.rs:389-410 | capsules/capsule-rhai/src/lib.rs:415-436 \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 \u0060capsules/capsule-rhai/src/lib.rs:389\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":"capsules/capsule-rhai/src/lib.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e21e62009b991a78c3153527fdf83aab110b4b6ce8e535cf65aeb159917f9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:191-210 | capsules/capsule-openai/src/lib.rs:158-176 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:191\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d36b9a28ffa61b30e0a446fee39e2ec70ff7b835f43349aa7e2e3f850cd7360"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 2): capsules/capsule-react/src/lib.rs:848-866 | capsules/capsule-react/src/lib.rs:941-956 \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 \u0060capsules/capsule-react/src/lib.rs:848\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":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"584e5a52dc75dfdd7bcf6e724a80cb111260cf49410b7c45ed3e5f0ec47a92a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): capsules/capsule-shell/src/lib.rs:421-439 | capsules/capsule-shell/src/lib.rs:470-486 \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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060RunShellArgs\u0060 in one and \u0060SpawnBackgroundArgs\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":"capsules/capsule-shell/src/lib.rs"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6583eefba131cc501eeed33840846707369658db8870db35f901e3d7b9e7b2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/unicity-aos-bootstrap/src/main.rs:258-276 | crates/unicity-aos-bootstrap/src/main.rs:291-309 \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":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa9add8f2385229957d11c20bb89867bc45d5d4d32b6900a1e13f669741f2e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:384-401 | capsules/capsule-openai/src/lib.rs:326-342 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:384\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f426ec7d0d7504fcf2e3f4f7c7d94d1b3179a12cff7f6cda4b0276881843cd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): capsules/capsule-rhai/src/lib.rs:372-387 | capsules/capsule-rhai/src/lib.rs:398-413 | capsules/capsule-rhai/src/lib.rs:424-439 \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 \u0060capsules/capsule-rhai/src/lib.rs:372\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":"capsules/capsule-rhai/src/lib.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6698ba5db8c050af70a7f77866adb36b3bb126d7bc1636ad651618a13af794"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): apps/adaptive-shell/src/activity.rs:531-546 | capsules/capsule-surface-model/src/store.rs:91-106 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/activity.rs\u0060 and \u0060capsules/capsule-surface-model/src/store.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"a06dbc76971cad6c1688e26523f696201a88e634026f47ccac9a9c7a09fb0894"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 8): capsules/capsule-surface-catalog/src/theme.rs:901-915 | capsules/capsule-surface-catalog/src/theme.rs:921-935 | capsules/capsule-surface-catalog/src/theme.rs:941-955 | capsules/capsule-surface-catalog/src/theme.rs:960-974 | capsules/capsule-surface-catalog/src/theme.rs:980-994 | capsules/capsule-surface-catalog/src/theme.rs:1000-1014 | capsules/capsule-surface-catalog/src/theme.rs:1020-1034 | capsules/capsule-surface-catalog/src/theme.rs:1039-1053 \u2014 all 8 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c2e7c52ac27f273812adbbe8feb888ccad72f01986873d7c69a04a97c6988d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): capsules/capsule-workspace-recipes/src/service.rs:307-321 | capsules/capsule-workspace-recipes/src/service.rs:394-408 \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 \u0060capsules/capsule-workspace-recipes/src/service.rs:307\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":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"6560b6b0650cc97730981240d779e0d693cfcc2ab23f0c8d817138b4256cee13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): apps/adaptive-shell/src/components.rs:801-838 | capsules/capsule-surface-model/src/components.rs:670-707 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"543dde7f383c085c4ba7a921fd2a37dd8fd01b15f6a6208d772e0be205bfd592"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:543-554 | capsules/capsule-openai/src/lib.rs:465-478 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:543\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"f31be2f29b67dfe173552fc44626c32fb15ed8349ea95e36a5570a56ed3f29c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:218-230 | capsules/capsule-openai/src/lib.rs:184-196 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e280cdb65fa42e870e013d6157c0bb39d6dd9438ca683a2b7b62ea320c1f115"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/adaptive-shell/src/activity.rs:682-693 | capsules/capsule-surface-model/src/store.rs:338-349 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/activity.rs\u0060 and \u0060capsules/capsule-surface-model/src/store.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"05fe1c2f39d881c221b2034b980f16fd79e21846c5c2b32154480b68c78edf66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/adaptive-shell/src/theme.rs:166-177 | apps/adaptive-shell/src/theme.rs:190-201 \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 \u0060apps/adaptive-shell/src/theme.rs:166\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":"apps/adaptive-shell/src/theme.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d541d56568f9a59de4677b976635ea9993a4391e761e037dbe2b15dd23878d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/unicity-aos-bootstrap/src/mcp/interaction.rs:345-356 | crates/unicity-aos-bootstrap/src/mcp/interaction.rs:429-440 \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":"crates/unicity-aos-bootstrap/src/mcp/interaction.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60bff4f3535fd4fe8e795049402c9cfa449c406d11b92471a34513af607ab7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): capsules/capsule-users/src/lib.rs:198-208 | capsules/capsule-users/src/lib.rs:221-231 \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 \u0060capsules/capsule-users/src/lib.rs:198\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":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab784b3efabbe04f6d84542273454780c6e7083143c4f73d253d95c33f6de5a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): capsules/capsule-users/src/store.rs:384-394 | capsules/capsule-users/src/store.rs:443-452 \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":"capsules/capsule-users/src/store.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"7689308d781914b1c556e8ed2dfb19e3eef77ce59da8004f4def8141984e428b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): capsules/capsule-users/src/store.rs:479-491 | capsules/capsule-users/src/store.rs:670-682 \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 \u0060capsules/capsule-users/src/store.rs:479\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":"capsules/capsule-users/src/store.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"56600969f401def7e19ab00063714f63f2bb395be4116ac7c5c293fecfcb9c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/unicity-aos-bootstrap/src/cli/principals.rs:61-71 | crates/unicity-aos-bootstrap/src/cli/status.rs:72-82 \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 \u0060crates/unicity-aos-bootstrap/src/cli/principals.rs:61\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":"crates/unicity-aos-bootstrap/src/cli/principals.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74ac7077bc5a28f900d279407ee752a8b44dd5523cdb27029a68a2b7207c55b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/unicity-aos-bootstrap/src/lib.rs:759-769 | crates/unicity-aos-bootstrap/src/migration.rs:456-466 \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 \u0060crates/unicity-aos-bootstrap/src/lib.rs:759\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":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"db324c4e98144f2155ef8e075d3b52feb4f389a91f1cc099eb1b0a4195907107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): capsules/capsule-users/src/lib.rs:334-343 | capsules/capsule-users/src/lib.rs:446-455 | capsules/capsule-users/src/lib.rs:494-502 \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 \u0060capsules/capsule-users/src/lib.rs:334\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":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e63f6be8b15f0447f62946538082fe919d2b23290f2a539b09463d278c1150"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/adaptive-shell/src/activity.rs:870-879 | capsules/capsule-surface-model/src/store.rs:714-723 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/activity.rs\u0060 and \u0060capsules/capsule-surface-model/src/store.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9a548981ced880ca8288d34efd0fa3ae689a778c24f8a5ee2031b69a371501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/adaptive-shell/src/theme.rs:315-324 | capsules/capsule-surface-catalog/src/theme.rs:1208-1217 \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. 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":"apps/adaptive-shell/src/theme.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dec4253ca25b912044c686b08a4877319cca28df2647be0adac41649d111dea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:359-367 | capsules/capsule-openai/src/lib.rs:300-309 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:359\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e7ee31dd538c1d8adca475a8045160e8e05b504018d7a0f13eece8b426ac132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): capsules/capsule-registry/src/selection.rs:137-146 | capsules/capsule-registry/src/selection.rs:155-164 \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 \u0060capsules/capsule-registry/src/selection.rs:137\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":"capsules/capsule-registry/src/selection.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a37cd569f0bd1ae4b9f6a4d258a07d5802ae1f468d6300e16ef389b2a8bf22f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): capsules/capsule-workspace-recipes/src/service.rs:335-344 | capsules/capsule-workspace-recipes/src/service.rs:437-446 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060capsules/capsule-workspace-recipes/src/service.rs:332\u0060 calls \u0060authorize\u0060, \u0060scan_for_forbidden_content\u0060, \u0060validate\u0060 and \u0060capsules/capsule-workspace-recipes/src/service.rs:436\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":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a7a3ada5edd3df055ed35493c4b0b86a2f9602ccdef2dcd84ab77da0f272b88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/unicity-aos-bootstrap/src/cli/principals.rs:36-45 | crates/unicity-aos-bootstrap/src/cli/status.rs:41-50 \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 \u0060crates/unicity-aos-bootstrap/src/cli/principals.rs:36\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":"crates/unicity-aos-bootstrap/src/cli/principals.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"17dba2ecbc4338d5143fa38711a458db11346e10ad3818a61e73aff33a3c8ebe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/unicity-aos-bootstrap/src/mcp/mod.rs:571-582 | crates/unicity-aos-bootstrap/src/mcp/mod.rs:591-600 \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 \u0060crates/unicity-aos-bootstrap/src/mcp/mod.rs:571\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":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b92f7cd76fc8387808750efb0662acf630bb9b00fbbd8c5d65f19c38786149f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): capsules/capsule-mcp/src/host_hooks.rs:348-356 | crates/unicity-aos-bootstrap/src/hook.rs:294-302 \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. 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":"capsules/capsule-mcp/src/host_hooks.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaea846535290f839bdd62ee36710c07de203508c5eeced2cd53c6c32c58056e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): capsules/capsule-react/src/lib.rs:1011-1019 | capsules/capsule-react/src/lib.rs:1119-1127 \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 \u0060capsules/capsule-react/src/lib.rs:1011\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":"capsules/capsule-react/src/lib.rs"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7dc4b63116d7433bc25e803547619ed9001291fa1a62ff73cd1592e1d4e157f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/aos-mcp-broker/src/approval.rs:893-901 | crates/aos-mcp-broker/src/approval.rs:907-915 \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 \u0060crates/aos-mcp-broker/src/approval.rs:893\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf0279444af526fa80f7b7c6df655bb0fbf1537af0a216a88aad2fe52e4f826"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/aos-mcp-broker/src/execute.rs:246-254 | crates/aos-mcp-broker/src/execute.rs:275-283 \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":"crates/aos-mcp-broker/src/execute.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae35e0abd57daeb0924b6889ab0f72e996eb60421cf66d55df6b99274e2b9747"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-surface-catalog/src/theme.rs:728-735 | capsules/capsule-surface-catalog/src/theme.rs:752-759 \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 \u0060capsules/capsule-surface-catalog/src/theme.rs:728\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":"capsules/capsule-surface-catalog/src/theme.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90712552477a6978c80b7c6e62adc5cb19e26f040afa999d5467fbdc44df211"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-surface-model/src/activity.rs:23-30 | capsules/capsule-surface-model/src/activity.rs:75-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-surface-model/src/activity.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb85df2e0a1da3a1bbbcfdf3dd2ac8128bc42364c376f107d8743ecc7c8ea16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): capsules/capsule-users/src/responses.rs:37-46 | capsules/capsule-users/src/responses.rs:61-69 \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 \u0060capsules/capsule-users/src/responses.rs:37\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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060capsules/capsule-users/src/responses.rs:46\u0060 calls \u0060insert\u0060, \u0060into\u0060, \u0060String\u0060 and \u0060capsules/capsule-users/src/responses.rs:69\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":"capsules/capsule-users/src/responses.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"915cf98dc8704c07974f2c987fc177e4315fb9e545701833e68e360d100ac901"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-workspace-recipes/src/service.rs:265-272 | capsules/capsule-workspace-recipes/src/service.rs:333-340 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060capsules/capsule-workspace-recipes/src/service.rs:332\u0060 calls \u0060authorize\u0060 and \u0060capsules/capsule-workspace-recipes/src/service.rs:264\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":"capsules/capsule-workspace-recipes/src/service.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"527a56f5b304350ca51c8e81eceaed836d0a9e5b39400835e9bca1428f67cac3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/unicity-aos-bootstrap/src/mcp/mod.rs:498-505 | crates/unicity-aos-bootstrap/src/mcp/mod.rs:513-520 \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":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"deee21551eb625bd32f2b572ba7fbc5f16c940f0b0c637203c526c59eebc4751"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): capsules/capsule-context-engine/src/lib.rs:537-543 | capsules/capsule-prompt-builder/src/lib.rs:372-378 \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 \u0060capsules/capsule-context-engine/src/lib.rs:537\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":"capsules/capsule-context-engine/src/lib.rs"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae7b40a529227d0d0f3c69f0a1f3fa4ce6d32978ec913ac7f639053a54f19e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/unicity-aos-bootstrap/src/distro_trust.rs:504-510 | crates/unicity-aos-bootstrap/src/distro_trust.rs:521-527 \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":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a987c3a2d7c6a76b8d08037981917977f903f276b616e06647b91c26b3769d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/unicity-aos-bootstrap/src/updates/mod.rs:157-163 | crates/unicity-aos-bootstrap/src/updates/process.rs:88-94 \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 \u0060crates/unicity-aos-bootstrap/src/updates/mod.rs:157\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":"crates/unicity-aos-bootstrap/src/updates/mod.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d366cc329858ab3dc229d8eb0cf326ba591f938abe12922f602c6abf9931af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/unicity-aos-bootstrap/src/migration.rs:345-350 | crates/unicity-aos-bootstrap/src/migration.rs:386-391 \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 \u0060crates/unicity-aos-bootstrap/src/migration.rs:345\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":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f071b48325ed93494728eb3ef83e35d71af2a0c44cf838e9e98f6bb124e082f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/unicity-aos-bootstrap/src/distro_trust.rs:268-272 | crates/unicity-aos-bootstrap/src/migration.rs:336-340 | crates/unicity-aos-bootstrap/src/migration.rs:428-432 | crates/unicity-aos-bootstrap/src/migration.rs:780-784 \u2014 there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c7f8d7a1daa4e07cb428f32e7eb945dda6fecd211ea0368c87d97ea45488c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-users/src/store.rs:239-246 | capsules/capsule-users/src/store.rs:456-463 \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":"capsules/capsule-users/src/store.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc57c6e5114193bdb83df6c0b95e3b6fc30acd8fbdb19ee194546a2d27d33c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/unicity-aos-bootstrap/src/legacy_private_permissions.rs:29-33 | crates/unicity-aos-bootstrap/src/migration.rs:823-827 \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":"crates/unicity-aos-bootstrap/src/legacy_private_permissions.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b23389a8264d6b309cc9ea2e48d7041233eb7279faaf6d9b417a5ab36609ea3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/adaptive-shell/src/components.rs:333-338 | capsules/capsule-surface-model/src/components.rs:255-260 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"e91f66ef8e7d30e929f4cfb2388c6df504e0921013cff79f94824c5719a3f238"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/adaptive-shell/src/components.rs:720-729 | capsules/capsule-surface-model/src/components.rs:591-600 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"90b648d74bce8b32a4e44982cc69aaa2f8bf659c42dad9a725114982c1dee727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/adaptive-shell/src/components.rs:732-738 | capsules/capsule-surface-model/src/components.rs:602-608 \u2014 before extracting anything, compare \u0060apps/adaptive-shell/src/components.rs\u0060 and \u0060capsules/capsule-surface-model/src/components.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/adaptive-shell/src/components.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"11996cbb84f48073aab0db81b8127bb7bb9dcfde70423449e7bd43f00cf6d8bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): capsules/capsule-context-engine/src/lib.rs:182-187 | capsules/capsule-prompt-builder/src/lib.rs:87-92 \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":"capsules/capsule-context-engine/src/lib.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef5e677c33c3ea1583f5eef7917ed22273f3f1d1a339922981d22a27cedf8916"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): capsules/capsule-forge/src/lib.rs:205-210 | capsules/capsule-system/src/lib.rs:98-103 \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":"capsules/capsule-forge/src/lib.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd48a0f9ccf71814fe675287749b38824e749e2f65c961114ee7009451548a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): capsules/capsule-hook-adapter-oracle/src/lib.rs:223-229 | capsules/capsule-mcp/src/host_hooks.rs:369-375 \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":"capsules/capsule-hook-adapter-oracle/src/lib.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f6ae1ed0c0f57bc48231c3d26ed3067106ee8fadfca04c12892187ba59ee9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): capsules/capsule-hook-adapter-oracle/src/lib.rs:231-236 | capsules/capsule-mcp/src/host_hooks.rs:377-382 \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":"capsules/capsule-hook-adapter-oracle/src/lib.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6ec33c6e40d97bc386c19e48a7f8c75ae97ca6d6bec1e7c0271c63f043e994"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): capsules/capsule-meta-harness/src/lib.rs:35-40 | capsules/capsule-surface-model/src/canonical.rs:190-195 \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":"capsules/capsule-meta-harness/src/lib.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cf1ea49bc0911b92c46dc2c8db311ecc6115edba8d26f9f8d58c48b9164f9b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:171-178 | capsules/capsule-openai/src/lib.rs:121-128 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35f52ec7fd4df05be375edc044e62ec1aadeef0e8a78c24b255beac959cf7cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/aos-mcp-broker/src/cache.rs:253-258 | crates/aos-mcp-broker/src/discovery.rs:559-564 \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":"crates/aos-mcp-broker/src/cache.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"68374ec3c5059e2da82abd813b60e92a522244e87735459db75e9984530ebb86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/aos-mcp-broker/src/discovery.rs:482-488 | crates/aos-mcp-broker/src/execute.rs:706-712 \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":"crates/aos-mcp-broker/src/discovery.rs"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6cb2ff2d78f011566472450fc2e07897ef5034ee0e459c8a5bcf5b5e580843"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-surface-model/src/surface.rs:9-16 | capsules/capsule-workspace-recipes/src/policy.rs:115-122 \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":"capsules/capsule-surface-model/src/surface.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"46137d0ba5fb9bc87f872ca9354e114e3e9853d789e29ab4f1e50aa2d78b4bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/aos-mcp-broker/src/broker.rs:145-157 | crates/aos-mcp-broker/src/broker.rs:205-215 \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 \u0060crates/aos-mcp-broker/src/broker.rs:145\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":"crates/aos-mcp-broker/src/broker.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbee156c2dd23b2cd62840a6c715470530b0a14eee37abef6bc5bc068233cd13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:55-66 | capsules/capsule-openai/src/lib.rs:55-66 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:55\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9368fce96c4f17c2ae533b05f54f1466b506daca9f9bfea700b4952d8c537e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/unicity-aos-bootstrap/src/mcp/mod.rs:481-489 | crates/unicity-aos-bootstrap/src/mcp/mod.rs:571-581 | crates/unicity-aos-bootstrap/src/mcp/mod.rs:591-599 \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 \u0060crates/unicity-aos-bootstrap/src/mcp/mod.rs:481\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":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ce0ea3c330f2b53ab5a45fbc47e105627e9cf5781d6d2c297d495c60a63fb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/aos-mcp-broker/src/cache.rs:142-150 | crates/aos-mcp-broker/src/cache.rs:192-199 \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 \u0060crates/aos-mcp-broker/src/cache.rs:142\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":"crates/aos-mcp-broker/src/cache.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a8672704ff5c641c82b0e0d0513418035e2c30d41dc65a323bdcc004c372c7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/aos-mcp-broker/src/approval.rs:491-499 | crates/aos-mcp-broker/src/approval.rs:844-852 \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 \u0060crates/aos-mcp-broker/src/approval.rs:491\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":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"b36df33b0d2162c5a8a4839b091e79f1a97885f861d35336a987f5a467522e6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/unicity-aos-bootstrap/src/cli/native_setup.rs:34-42 | crates/unicity-aos-bootstrap/src/main.rs:901-909 \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 \u0060crates/unicity-aos-bootstrap/src/cli/native_setup.rs:34\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":"crates/unicity-aos-bootstrap/src/cli/native_setup.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc907ae41cb15624cfd96e6acacafa8dce1a7e634e9ac37bd5289082927621a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/unicity-aos-bootstrap/src/migration.rs:156-164 | crates/unicity-aos-bootstrap/src/migration.rs:693-701 \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 \u0060crates/unicity-aos-bootstrap/src/migration.rs:156\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":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f8eeba29d785e484bd878165c5ea45c6356e06744d7b3d4ef9e963ac35aee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/unicity-aos-bootstrap/src/migration.rs:620-627 | crates/unicity-aos-bootstrap/src/migration.rs:661-668 \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 \u0060crates/unicity-aos-bootstrap/src/migration.rs:620\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":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e4787ccb20e539e82c73172b62691daf915eb87b88f6b36679d9159b351417"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-users/src/lib.rs:325-332 | capsules/capsule-users/src/lib.rs:437-444 \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 \u0060capsules/capsule-users/src/lib.rs:325\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":"capsules/capsule-users/src/lib.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"322acd76b9f9c6606c0e09c5be83f8ea9750c1578c161f9b466f58be6562d70b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): capsules/capsule-openai-compat/src/lib.rs:579-586 | capsules/capsule-openai/src/lib.rs:505-512 \u2014 before extracting anything, compare \u0060capsules/capsule-openai-compat/src/lib.rs\u0060 and \u0060capsules/capsule-openai/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060capsules/capsule-openai-compat/src/lib.rs:579\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":"capsules/capsule-openai-compat/src/lib.rs"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd11ea12e26f586965ae2df4a7ba70eb42184d2a98c7c4ab4edd8057399af322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/unicity-aos-bootstrap/src/migration.rs:347-354 | crates/unicity-aos-bootstrap/src/migration.rs:388-395 | crates/unicity-aos-bootstrap/src/migration.rs:708-715 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"f176d6cdc12ccc4cb2a1bf80c30f7cb3121042c2c50e1816240dd27c470b4dff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): capsules/capsule-registry/src/lib.rs:545-549 | capsules/capsule-registry/src/lib.rs:674-681 \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 \u0060capsules/capsule-registry/src/lib.rs:545\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 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":"capsules/capsule-registry/src/lib.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a54a9eede8362d0fbb61fb1b626b79f716069011a6bf280d9689cf171b82a0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): capsules/capsule-system/src/lib.rs:160-166 | capsules/capsule-system/src/lib.rs:206-212 \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 \u0060capsules/capsule-system/src/lib.rs:160\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":"capsules/capsule-system/src/lib.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ae81883fc9eb566e0f334e851e4a4f78c0cbdf8e9665176bad2ee0714a97ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/unicity-aos-bootstrap/src/updates/oracle.rs:44-50 | crates/unicity-aos-bootstrap/src/updates/process.rs:90-96 \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 \u0060crates/unicity-aos-bootstrap/src/updates/oracle.rs:44\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":"crates/unicity-aos-bootstrap/src/updates/oracle.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"709824f8156b28ba4d810f4e0e59e9f504a899856f03fec4d372d8f5d856e938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/unicity-aos-bootstrap/src/status/mounted_volume.rs:59-63 | crates/unicity-aos-bootstrap/src/updates/process.rs:89-94 \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 \u0060crates/unicity-aos-bootstrap/src/status/mounted_volume.rs:59\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":"crates/unicity-aos-bootstrap/src/status/mounted_volume.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d748364bab06e1f9e14bc33c6a9e123621bfead5e988aca77f666c790a3d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): apps/aos-tray/Sources/AOSTray/LibraryPrincipalForm.swift:24-45 | apps/aos-tray/Sources/AOSTray/NativeRuntimeSetupForm.swift:70-91 \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 \u0060apps/aos-tray/Sources/AOSTray/LibraryPrincipalForm.swift:24\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":"apps/aos-tray/Sources/AOSTray/LibraryPrincipalForm.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"76995b5a3182b4cdd9b479ce4356e64ec407206cbabdf6664c44b536da515b8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift:96-112 | apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift:45-62 \u2014 before extracting anything, compare \u0060apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift\u0060 and \u0060apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 \u0060apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.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. 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":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"4056c384a2cbed51bcfb59d1a271e83ed9f2c933313f69cdf3f4cdf82715acc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift:80-95 | apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift:18-33 \u2014 before extracting anything, compare \u0060apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift\u0060 and \u0060apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 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":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"518e1bd673e18f8c76b3ba6f6ce63f7f0b5d0f5483d12be46046a113990ae9fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:301-315 | apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:187-201 \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 \u0060apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:301\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 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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"054fb2000c01a14bf01d845b1597b06628f02dbb41865880664008cf573139e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:288-297 | apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:175-184 \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 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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d789da11248bd5100deef3a913855902375d12f18a1e026251b226757bcd103"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift:118-126 | apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift:68-77 \u2014 before extracting anything, compare \u0060apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift\u0060 and \u0060apps/aos-tray/Sources/AOSTrayCore/StatusCommandReader.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 \u0060apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift:118\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":"apps/aos-tray/Sources/AOSTrayCore/PrincipalDiscovery.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a7c6c7b28667bb700d63d713dc842cfbb5ab641148a7d63011dcdac2c93d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:244-251 | apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift:265-272 \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. 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":"apps/aos-tray/Sources/AOSTrayCore/NativeRuntimeSetup.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd6f1aed9c742c23e4a6f378e6eabc228046d177c696813a3603ee7060d22c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): apps/aos-tray/Sources/AOSTray/NativeInputDialog.swift:30-34 | apps/aos-tray/Sources/AOSTray/PermissionDialog.swift:30-34 \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 \u0060apps/aos-tray/Sources/AOSTray/NativeInputDialog.swift:30\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":"apps/aos-tray/Sources/AOSTray/NativeInputDialog.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"00acb499048b14dd6d7ce89294980c4f801bbce7f776521884170a6f833f8e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift:369-374 | apps/aos-tray/Sources/AOSTrayCore/MountedVolume.swift:35-40 \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":"apps/aos-tray/Sources/AOSTrayCore/CommandCenterVolume.swift"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9ad1a1e8d9de695955c0c967020dafdef202412634c5d8d477ca44a1fbcb61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): scripts/musl_release_metadata.py:152-183 | scripts/release_metadata.py:138-157 \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":"scripts/musl_release_metadata.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f0903fe0fbe4c46041678bfa7e25c819c0f0e4bcb2cf8a388fe32cc41b6f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): scripts/capsule_release.py:184-196 | scripts/validate-runtime-archive.py:18-29 \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":"scripts/capsule_release.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0813276fd9d52620cc979d7034ce11f8cc3ecf61fdf568e5ff279bef3c704a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): scripts/check_glibc.py:53-64 | scripts/check_static_elf.py:78-88 \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":"scripts/check_glibc.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"877a6457293a21931ff2c7231bc96c65297ab16ec4239e154840e4abd188bf28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/adaptive-shell/src/fixtures.rs:822-832 | apps/adaptive-shell/src/fixtures.rs:1119-1129 \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":"apps/adaptive-shell/src/fixtures.rs"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a812ffced158316a2d2d1dbc16f94822d0aa46df04d0360d28496a96dc2328"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): apps/adaptive-shell/src/fixtures.rs:1108-1112 | apps/adaptive-shell/src/fixtures.rs:1317-1321 \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":"apps/adaptive-shell/src/fixtures.rs"},"region":{"startLine":1108}}}],"partialFingerprints":{"codehealthFindingId/v1":"730b1627e9185fc87c2cc9cecad51deaba667c4f99dd6d36adec17a56234163e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/capsule_release.py:185-194 | scripts/validate-runtime-archive.py:18-27 \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":"scripts/capsule_release.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"a829217914d308a31e4d1fcc53515281ee0a52b6a111067d2dd1267250276e01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): scripts/check_glibc.py:35-43 | scripts/check_static_elf.py:53-61 \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 \u0060scripts/check_glibc.py:35\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":"scripts/check_glibc.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"313b653b697a327f2d03e52abc1cc0f9773a78c2e6d5f194472c7a5aff3710cf"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: aos-mcp-broker: aos-mcp-broker: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dcbd28694099780eced9a3f39c3f1c49517f173d926fbc303a1d0c08f2386d44"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AOSTrayCore: AOSTrayCore: abstractness 0.02, instability 0.00, distance 0.98 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"93ae4ffe4673df38e196df4457e0d97d443e4c7a49367f2e8cebd2c0ee82c029"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: capsule-surface-model: capsule-surface-model: abstractness 0.06, instability 0.00, distance 0.94 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"040983b3a7524abce1e7a7f001c4e341d05b62ebea08b5e30426887fb7b8c382"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/unicity-aos-bootstrap/src/main.rs: crates/unicity-aos-bootstrap/src/main.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in unicity_aos_bootstrap::handle_product_command at line 334. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/unicity-aos-bootstrap/src/main.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/main.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a9c3e3b8301af8d25face001f112407126f18a056b91d6c297f690570164a3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/unicity-aos-bootstrap/src/mcp/mod.rs: crates/unicity-aos-bootstrap/src/mcp/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in unicity_aos_bootstrap::mcp::serve at line 335. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/unicity-aos-bootstrap/src/mcp/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/mcp/mod.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8696ac5a6c65f267dbc3a33b1ebfc2a741e2df3067a35c20963a699e6c8c616"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/aos-mcp-broker/src/broker.rs: crates/aos-mcp-broker/src/broker.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in aos_mcp_broker::broker::handle_mcp_call at line 203. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/aos-mcp-broker/src/broker.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/broker.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdca25baa63d0b17bc0ec412c7441c6c52e1cddfe539c7fef79f8d9ec5777e75"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/aos-mcp-broker/src/execute.rs: crates/aos-mcp-broker/src/execute.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in aos_mcp_broker::execute::dispatch_with_approval at line 142. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/aos-mcp-broker/src/execute.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/execute.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"62bd03306586cab2270206f38139cae4b9d116baf9865c4736285a466b2b5650"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/unicity-aos-bootstrap/src/lib.rs: crates/unicity-aos-bootstrap/src/lib.rs changed 13 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 9 (its worst body is AosHome::ensure_unicity_ce_manifest at line 194), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: preserve trusted distro upgrades with the Astrid RC6 pin (#246)\u201D; \u201Cfix(runtime): select a consistent product daemon workspace (#224)\u201D; \u201Cfix(init): grant the default fleet during first runtime init (#200)\u201D; \u201Cfix(runtime): bound default musl compiler parallelism (#195)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/unicity-aos-bootstrap/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b8a147964f5330ab0cdb95d9415a84e1937efd85a79c92d77d028edb410593"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/aos-mcp-broker/src/approval.rs: crates/aos-mcp-broker/src/approval.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is aos_mcp_broker::approval::handle_mcp_ingress_respond at line 640), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(mcp): surface nested provider delivery failures (#241)\u201D; \u201Cfix(mcp): bind results to discovered providers (#174)\u201D; \u201Cfix(approval): bind grants to pending requests (#171)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-23 17:47:42 \u002B04:00\u0027 --until=\u00272026-10-21 17:47:42 \u002B04:00\u0027 --full-history --no-merges -- crates/aos-mcp-broker/src/approval.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/aos-mcp-broker/src/approval.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45a9761d36db70a043d9f0a97170be186c383effa1d0e66b6d7f3b18437b4e6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Move to a new capsule which handles env details. Time would be good too. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-identity/src/lib.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"e859069c39dce97ca8aa5848c74f8459d5b4d116fd57383eb44a3a451bed14ab"}},{"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 \u0060crates/unicity-aos-bootstrap/Cargo.toml\u0060 makes this repository a deployable product (line 41)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/Cargo.toml"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c6abee76155982c7a8fa0784d9ea8cc43c85ee3c7d4785489e9bf7653d7fdf"}},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"63778fa624412affc09bbae17ed4e235deee47c1e8fbbd49594e08c2f223c987"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-552","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fcd648caef92f5bb19c3f445fc060106205a8ec6d1e0518ae1c73883f13fbebe"},"properties":{"dependency":{"package":"pin-utils","version":"0.1.0","advisory":"RUSTSEC-2026-0441","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"578e520c98d9f5c2b22870824dd6c0e38aef4608aa7be28c5ec463ad41542d8e"},"properties":{"dependency":{"package":"smartstring","version":"1.0.1","advisory":"RUSTSEC-2026-0249","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"aa274d8b19a9ed7204f36033bfa3c695008006dc67782f774065d330dff545ab"},"properties":{"dependency":{"package":"tokio","version":"1.52.3","advisory":"RUSTSEC-2026-0386","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"46f49615124997a47ae03424c2b2e05e8f53b2ec644cd091de0dc203d46f11ac"},"properties":{"dependency":{"package":"pin-utils","version":"0.1.0","advisory":"RUSTSEC-2026-0441","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9cf74773a6e34d2f2cd5f4cc024a1a57cb07e5917cf84c703df779cadb57013"},"properties":{"dependency":{"package":"rustix","version":"1.1.5","advisory":"RUSTSEC-2026-0486","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0897771ffd4e3ceb3419dde32bb5bb1ffcf0f4b413f8009f7ee61b96577e12ed"},"properties":{"dependency":{"package":"smartstring","version":"1.0.1","advisory":"RUSTSEC-2026-0249","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c64e30c28e3c0e2ac4c865fc1656b78d3404e0bf0484e55f9176b7c5f283f360"},"properties":{"dependency":{"package":"tokio","version":"1.52.3","advisory":"RUSTSEC-2026-0386","reachability":{"kind":"unknown"}}}},{"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":"563bdf0917f0ecbab433109d371351f664bd9c961c7399331bc0feb0a48b2a0e"},"taxa":[{"id":"CICD-SEC-5","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":"D44","level":"warning","message":{"text":"End-of-life runtime: Rust 1.95: rust-toolchain.toml declares Rust 1.95 as this project\u0027s toolchain file, and Rust 1.95, superseded by 1.96 on 2026-05-28 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-05-28 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"rust-toolchain.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde701f9c40b0b8cb202babf3f8d8da48dda44162595030f1b0a8f7d57710684"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 16/19 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060apps/adaptive-shell\u0060, \u0060apps/aos-tray\u0060, \u0060crates/unicity-aos-bootstrap\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060run\u0060 is async and calls .waitUntilExit() \u2014 a blocking call inside async code stalls the cooperative pool\u0027s thread \u2014 one per core \u2014 and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/aos-tray/Sources/AOSTrayCore/UpdateInventory.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca32c5fe8874f4f94ecfa26ac65c8c69e5b50243b2587edffc031bfd33643e9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not member.is_file() or member.is_symlink()\u0060 appears character-identically in 2 files \u2014 scripts/package_macos_command_center.py, scripts/package_macos_filesystem.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":"scripts/package_macos_command_center.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f871a27c6a76a2544838bde2074c6ee98d1ee4e743050782c4de6857dd205789"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.is_file() and not path.is_symlink()\u0060 appears character-identically in 4 files \u2014 scripts/channel_transaction.py, scripts/musl_release_metadata.py, scripts/nightly_version.py, scripts/release_metadata.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":"scripts/channel_transaction.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1af7ec60caba91627c762d53d1cc90a3d4da38f14567ac9fccf4e404e017149"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.is_symlink() or not stat.S_ISREG(path.lstat().st_mode)\u0060 appears character-identically in 2 files \u2014 scripts/capsule_release.py, scripts/release_publication.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":"scripts/capsule_release.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"109d0293a4bcc60aba3d89eabd74a5d503077038fb5663975185a8a141d8f052"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060type(generation) is int and 0 \u003C generation \u003C= MAX_GENERATION\u0060 appears character-identically in 3 files \u2014 scripts/channel_publication.py, scripts/channel_transaction.py, scripts/release_metadata.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":"scripts/channel_publication.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"498d8186a4c828c40334f1bfc3d0bad37a35974d7fc6014da2d33d2eda90d73f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060type(item[\u0022size\u0022]) is int and item[\u0022size\u0022] \u003E 0\u0060 appears character-identically in 2 files \u2014 scripts/musl_release_metadata.py, scripts/release_metadata.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":"scripts/musl_release_metadata.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa17ef8d241a94e8d79ccbdf9a630521b1b54496843853da2348302dc57177f4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060type(root[\u0022schema-version\u0022]) is int and root[\u0022schema-version\u0022] == 1\u0060 appears character-identically in 2 files \u2014 scripts/musl_release_metadata.py, scripts/release_metadata.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":"scripts/musl_release_metadata.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"30fb0ce10b75b1f4a20485456fae0e56b28ce6cd621560a27d91d75e95cff026"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!metadata.is_file() || metadata.file_type().is_symlink()\u0060 appears character-identically in 2 files \u2014 crates/unicity-aos-bootstrap/src/updates/mod.rs, crates/unicity-aos-bootstrap/src/updates/oracle.rs. 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":"crates/unicity-aos-bootstrap/src/updates/mod.rs"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d4f5963d4fc3de4be73843267e4f403444bb6896d93211ddfe7264397c7b31"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!value.is_empty() \u0026\u0026 value.len() \u003C= maximum\u0060 appears character-identically in 2 files \u2014 apps/adaptive-shell/src/activity.rs, capsules/capsule-surface-model/src/recipe.rs. 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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd033276f496911bcfefb4693f6a692f9272c5ee402f6f2e15831d8e968b9ad"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.file_type().is_symlink() || !metadata.is_dir()\u0060 appears character-identically in 7 files \u2014 crates/unicity-aos-bootstrap/src/command_center.rs, crates/unicity-aos-bootstrap/src/distro_trust.rs, crates/unicity-aos-bootstrap/src/legacy_private_permissions.rs, crates/unicity-aos-bootstrap/src/lib.rs. 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":"crates/unicity-aos-bootstrap/src/command_center.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d0aa755a154943922b664bfef15e2f0aaaa0eb4f8842cb91d09bc84e28e617"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.file_type().is_symlink() || !metadata.is_file()\u0060 appears character-identically in 3 files \u2014 crates/unicity-aos-bootstrap/src/distro_trust.rs, crates/unicity-aos-bootstrap/src/lib.rs, crates/unicity-aos-bootstrap/src/migration.rs. 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":"crates/unicity-aos-bootstrap/src/distro_trust.rs"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2ff666f4bec1e2e2427509c7154d021f3f6121230ddda3383b2a581230bd0d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.is_file() \u0026\u0026 !metadata.file_type().is_symlink()\u0060 appears character-identically in 2 files \u2014 crates/unicity-aos-bootstrap/src/lib.rs, crates/unicity-aos-bootstrap/src/main.rs. 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":"crates/unicity-aos-bootstrap/src/lib.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd80942e9faa887ca0c4ad0b82bf3c910b5f069ee1e8531917121baae291c41"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path_metadata.file_type().is_symlink() || !path_metadata.is_file()\u0060 appears character-identically in 2 files \u2014 crates/unicity-aos-bootstrap/src/migration.rs, crates/unicity-aos-bootstrap/src/native_setup/mod.rs. 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":"crates/unicity-aos-bootstrap/src/migration.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d4db91bb85edfb60cd7a8bf99cab0e7458abb8cddd397cd19443944049f0fc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060recipe.revision != patch.base_revision || recipe.digest != patch.base_digest\u0060 appears character-identically in 2 files \u2014 apps/adaptive-shell/src/activity.rs, capsules/capsule-surface-model/src/store.rs. 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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0922c5ef8325708ff092a27aa7dcd41be7a9b4f8391c5d881202b25fb084cc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.operations.is_empty() || self.operations.len() \u003E MAX_PATCH_OPS\u0060 appears character-identically in 2 files \u2014 apps/adaptive-shell/src/activity.rs, capsules/capsule-surface-model/src/store.rs. 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":"apps/adaptive-shell/src/activity.rs"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbbbcf0d91203374c769a372c5a13a0eeeab0ac01cdfd2aa53a050627dfdeb82"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060stamp_message_providers\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-registry/src/lib.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e5ee06b9fe2cd26628c6443adefc6b32598d492064dd7ec1b4a33ca7b6780b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_interfaces\u0060 turns every \u0060Err\u0060 into \u0060Ok(\u0022WIT directory not found. Run \u0060aos init\u0060 to set up the standard interfaces.\u0022.into())\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-system/src/lib.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"2403d9d35d8b50e33bef400362dd4f596dcc84d56cc6d59b8bf4d1133d085cc7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060current_unix_millis\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"capsules/capsule-users/src/time.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"0757180a41390dc643a732459e8c0772697a41455d19c1282b82f4975a3cbc54"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060text.contains(\u0022unrecognized subcommand\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060text.contains(\u0022unrecognized subcommand\u0022)\u0060 also satisfies \u0060text.contains(\u0022unrecognized\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/unicity-aos-bootstrap/src/native_setup/mod.rs"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"0255b8c83637fe8a09d08a7d4bb9975bd893ffccd84112b2f9d44a3ccdf6b9ec"}}],"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-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-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-552","guid":"3492436b-eca2-9c54-9ba3-5dade427c903","name":"Files or Directories Accessible to External Parties","shortDescription":{"text":"Files or Directories Accessible to External Parties"},"helpUri":"https://cwe.mitre.org/data/definitions/552.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"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":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"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-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"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":11,"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."]}]}