{"$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":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D23","name":"Boundary Type-Coupling","shortDescription":{"text":"Boundary Type-Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D23"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"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":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02: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":"AC2","name":"Forms \u0026 labels","shortDescription":{"text":"Forms \u0026 labels"},"helpUri":"https://codehealth.canine.dev/dimensions/AC2"},{"id":"AC3","name":"Page structure","shortDescription":{"text":"Page structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AC3"},{"id":"AC4","name":"Keyboard semantics","shortDescription":{"text":"Keyboard semantics"},"helpUri":"https://codehealth.canine.dev/dimensions/AC4"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX2","name":"Stateful singletons","shortDescription":{"text":"Stateful singletons"},"helpUri":"https://codehealth.canine.dev/dimensions/AX2"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"AXS1","name":"Runtime exposed surface","shortDescription":{"text":"Runtime exposed surface"},"helpUri":"https://codehealth.canine.dev/dimensions/AXS1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF1","name":"Benchmark discipline","shortDescription":{"text":"Benchmark discipline"},"helpUri":"https://codehealth.canine.dev/dimensions/PF1"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"S1","name":"Web-Security Posture","shortDescription":{"text":"Web-Security Posture"},"helpUri":"https://codehealth.canine.dev/dimensions/S1"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X2","name":"Cancellation propagation","shortDescription":{"text":"Cancellation propagation"},"helpUri":"https://codehealth.canine.dev/dimensions/X2"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"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":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"cli.newServeCmd (cyclomatic 145): cli.newServeCmd has cyclomatic complexity 145 (threshold 15). Most of this is not in the body itself: 6 of the 145 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 137, 131). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"40026791eb5ccb6b92984c4f70391c9cca356ba4b6e3b3bde2ce435600bd642e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newHookCmd (cyclomatic 126): cli.newHookCmd has cyclomatic complexity 126 (threshold 15). Most of this is not in the body itself: 1 of the 126 points is its own statement and the rest belongs to one function literal inside it that branches (line 403). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"61484bcae65740ed3617ce34dfc56259988e06561087439ba5a41bd1f2cb7afe"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newUpgradeCmdWithDeps (cyclomatic 109): cli.newUpgradeCmdWithDeps has cyclomatic complexity 109 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 79 belong to one function literal 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f9fe21fb614a73c7d4256253448c8063eaa5085f462e9f27b0098ca3f45e0c"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.visitPipedDownloadExecutionAliases (cyclomatic 86): engine.visitPipedDownloadExecutionAliases has cyclomatic complexity 86 (threshold 15). Most of this is not in the body itself: 3 of the 86 points are its own statements and the rest belongs to one function literal inside it that branches (line 315). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/pipe_download_exec.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab1f3aa1d48d532b7eb38de32d969c1c3d0519794bf7ada163fb600c779f83e"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleToolCall (cyclomatic 66): Server.handleToolCall has cyclomatic complexity 66 (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":"internal/proxy/eval_handlers.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3501534200a05f85862897f33fdb580eff4362e892255715368006f183b2956e"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.pathChangeTargets (cyclomatic 64): engine.pathChangeTargets has cyclomatic complexity 64 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 26 belong to 2 function literals inside it that branch. 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":"internal/engine/matcher.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0111cd6341cbf2b85c18838828351b56f9a6c3625201e2756389e179ce0d434"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.matchConditionForAction (cyclomatic 62): engine.matchConditionForAction has cyclomatic complexity 62 (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":"internal/engine/matcher.go"},"region":{"startLine":2669}}}],"partialFingerprints":{"codehealthFindingId/v1":"780fe2c46c0264d6287114c72ce308396aa20f4178ad48bbf3ab0d7360bb3f93"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newSetupOpenClawCmd (cyclomatic 61): cli.newSetupOpenClawCmd has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to one function literal inside it that branches (line 615). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a3bc9cc6e367b214e0a8080e4fc7d1e600aa651333ccf6796357f4a88e66e4"}},{"ruleId":"D1","level":"warning","message":{"text":"Model.Update (cyclomatic 61): Model.Update has cyclomatic complexity 61 (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":"internal/watch/watch.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e32502d1f6c7b977283436d64923129d44691b41ccd79afd39a495ce1d3adbf"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.visitCanonicalCommandAliases (cyclomatic 60): engine.visitCanonicalCommandAliases has cyclomatic complexity 60 (threshold 15). Of this number, 53 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. 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":"internal/engine/matcher.go"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"170d18255f3c1fe3ccc90ac62ef3487bd42b7101ba83d82a3f2b5e5f3dd66eb8"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newInitCmd (cyclomatic 59): cli.newInitCmd has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to one function literal inside it that branches (line 94). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/init.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a05d07f5b9c05956062a1ac5b9921c8402fb5c2854c3db78949f54e71ae1ab"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleBulkResolve (cyclomatic 59): Server.handleBulkResolve has cyclomatic complexity 59 (threshold 15). Of this number, 49 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"569a30b62a9d96081076401dddf3fb80b0b4cdae61dc4634657300e6f77e85c5"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.isExtremelyDangerous (cyclomatic 58): engine.isExtremelyDangerous has cyclomatic complexity 58 (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":"internal/engine/suggestions.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac0d320e587ef9f1782ad3c45e97eb44cd266a3318503fb6b934ff953e1d3933"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runDoctor (cyclomatic 57): cli.runDoctor has cyclomatic complexity 57 (threshold 15). Of this number, 46 points are the body\u0027s own statements and 11 belong to one function literal 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"0860c41f377946760596b130aa065776a124efe8ffeba1f0e6ed4c8d5cf794cd"}},{"ruleId":"D1","level":"warning","message":{"text":"Manifest.Validate (cyclomatic 57): Manifest.Validate has cyclomatic complexity 57 (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":"internal/assurance/manifest.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"efbec15791bdb4ba930e84d11832d439997224fea2d2261834460c8ac1026684"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.recoverChainStateByLinks (cyclomatic 52): audit.recoverChainStateByLinks has cyclomatic complexity 52 (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":"internal/audit/recovery_links.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9679ee3b6867cb7ca812f521586ad0e845909f60e1066caabb86e11eba78aca"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.invocationDownloads (cyclomatic 51): engine.invocationDownloads has cyclomatic complexity 51 (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":"internal/engine/download_exec.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef7d52ca2b4f6cc2429d36b5418472a295297de813ec09d811dd85a1fc4e7fb"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.visitDownloadExecutionAliases (cyclomatic 50): engine.visitDownloadExecutionAliases has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 3 of the 50 points are its own statements and the rest belongs to one function literal inside it that branches (line 473). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/download_exec.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc49c09df9f97081a152e0099d4de62a942700623da0ce7acb4a507a8b4513b"}},{"ruleId":"D1","level":"warning","message":{"text":"Proxy.handleToolsCall (cyclomatic 48): Proxy.handleToolsCall has cyclomatic complexity 48 (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":"internal/mcp/proxy.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"b362b9ceecab781a0300154d5d315dd48c4be020c5c9952427c900d95044c4d3"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runAllowBlock (cyclomatic 46): cli.runAllowBlock has cyclomatic complexity 46 (threshold 15). Of this number, 42 points are the body\u0027s own statements and 4 belong to one function literal 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":"cmd/rampart/cli/allow.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc417728aebc6e402a7fe27c3a25d452e6b6ca157433727aa2a052cdcc8fae0"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.literalShellWords (cyclomatic 46): engine.literalShellWords has cyclomatic complexity 46 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/engine/download_exec.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2f80e4b51b01f5000f9bbb2462c10de96ca7d242f304d687210b761b2b7105c"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runInteractiveSetup (cyclomatic 45): cli.runInteractiveSetup has cyclomatic complexity 45 (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":"cmd/rampart/cli/setup_interactive.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b7439343e777078e583aa36e3fda376490133577958aaaaa879c66344cdf34"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.EvaluateWith (cyclomatic 45): Engine.EvaluateWith has cyclomatic complexity 45 (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":"internal/engine/engine.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38f9de6a2291a61bbb678ae8dede8bb2cadd2219446c51f01cd3fad742c40e7"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.visitProductionCommandAliases (cyclomatic 44): engine.visitProductionCommandAliases has cyclomatic complexity 44 (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":"internal/engine/production_commands.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c429f50c7aac21fa8e06e4d634561b3ed936825aafa3fb4f2ca2c5a65a826c6"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXEnvUtilityMode (cyclomatic 44): engine.stripPOSIXEnvUtilityMode has cyclomatic complexity 44 (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":"internal/engine/shellparse.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38119db161da064803f68c5394ef9e573077c24001891011517da0c860c380a"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.appendHistRow (cyclomatic 44): index.html.appendHistRow has cyclomatic complexity 44 (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":"internal/dashboard/static/index.html"},"region":{"startLine":1434}}}],"partialFingerprints":{"codehealthFindingId/v1":"28781192c201f017b077d3a7b3d431f92c8dbd0ff442c431b0abcb24d83b4609"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseClineInput (cyclomatic 42): cli.parseClineInput has cyclomatic complexity 42 (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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"d969e3ebe3161b326632f00001a11fb1f66f1a052b8aaa4d64084dc4ad9b7161"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.executedFileOperand (cyclomatic 40): engine.executedFileOperand has cyclomatic complexity 40 (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":"internal/engine/download_exec.go"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eac95dcddfb8bf2f3a4d855c3c367b715852fa784b9ce75f5a06c343961247e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.upgradeStandardPoliciesForVersion (cyclomatic 39): cli.upgradeStandardPoliciesForVersion has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"912ab4ead421e4c15d3156a7d32aba1cc06bf19e58c97b0bcf49a344bb08507f"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newWrapCmd (cyclomatic 39): cli.newWrapCmd has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 6 of the 39 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 93, 87). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/wrap.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd9422ecbefd61785bfed8f98abe3f2190528a1d18133cecd7dddb283516f20"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.ExplainConditionForAction (cyclomatic 39): engine.ExplainConditionForAction has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/matcher.go"},"region":{"startLine":2289}}}],"partialFingerprints":{"codehealthFindingId/v1":"a505769ad9296d75567e914d3b8810837a04f041a9ae94334d508d30bd3121af"}},{"ruleId":"D1","level":"warning","message":{"text":"checkWithRampart (cyclomatic 39): checkWithRampart has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"0784c97ad77fc1459b791c815c1a0a0511fa5e316005e6ff3d84d1e461ad7e5f"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.normalizeClineParams (cyclomatic 37): cli.normalizeClineParams has cyclomatic complexity 37 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 3 belong to one function literal 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1446}}}],"partialFingerprints":{"codehealthFindingId/v1":"437cc5c06977c83667499ac89747585d2923787845a07022acedf5d5a9054e94"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newSetupClaudeCodeCmd (cyclomatic 36): cli.newSetupClaudeCodeCmd has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to one function literal inside it that branches (line 290). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c8c7b25066f5cdd46eef39636570d8689a39747956d877ab63ff13cef99242"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.installAntigravityPluginWithRename (cyclomatic 36): cli.installAntigravityPluginWithRename has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 12 belong to 2 function literals inside it that branch. 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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e41902e3ccc8e09db076d93611d90dd7285726bf7c1fabc95c9a1daf8bc8e2"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.printBenchSummary (cyclomatic 35): cli.printBenchSummary has cyclomatic complexity 35 (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":"cmd/rampart/cli/bench.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"79624593a5d867c7dc5060dcaa8473e32f08229af650a6a23c550766994ce15e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newPolicyExplainCmd (cyclomatic 35): cli.newPolicyExplainCmd has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to one function literal inside it that branches (line 101). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb280caa49df070cc1e634842884d1e8888bcc384e59926e2ef3bfe339e79fd1"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes._effective_terminal_cwd (cyclomatic 35): hermes._effective_terminal_cwd has cyclomatic complexity 35 (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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"227404356d32e022b499dd4cc10285d1a31341f99f66e9ad30fa02dc05700649"}},{"ruleId":"D1","level":"warning","message":{"text":"register::evaluateToolCall (cyclomatic 35): register::evaluateToolCall has cyclomatic complexity 35 (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":"internal/plugin/openclaw/index.js"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"726bce073ea00fcd709875dc8b78c6ca03f40e78770699cb6028b4ac6c49ecf9"}},{"ruleId":"D1","level":"warning","message":{"text":"Proxy.handleChildLine (cyclomatic 34): Proxy.handleChildLine 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":"internal/mcp/proxy.go"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"43849ab7734ebe5dca21597c808e0fb3621dc3e1add515da7952c10135d7bd87"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleResolveApproval (cyclomatic 33): Server.handleResolveApproval has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"044c734ba4dd90b64076bf21aaead0148605a8b3a31593f739a93ca38bd5f773"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.setOpenClawExecAskAt (cyclomatic 32): cli.setOpenClawExecAskAt has cyclomatic complexity 32 (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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1260}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed93ae11cb6df09c54ef3553cb83bbb7a8d0ff91b577776bb43647ab6ce9159e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.removeOpenClawNativePluginWithHostAt (cyclomatic 32): cli.removeOpenClawNativePluginWithHostAt has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function literal 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1814}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa949c2565a2728af21e596f047093e3c04629d0f1844dd2d147ad227bd035d"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.splitHereDocuments (cyclomatic 32): engine.splitHereDocuments has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/engine/download_exec.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"9673fabf48ae35cb814c95cd277fcef6a385bec9f46a01b6971e6830207b1ef4"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.compactRecord (cyclomatic 31): audit.compactRecord has cyclomatic complexity 31 (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":"internal/audit/record.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f28f2be28e72570edec5e54216a885d447071132edaf7767d9e4b4ef0915d1c"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes.extractWithRename (cyclomatic 31): hermes.extractWithRename has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. 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":"internal/plugin/hermes/embed.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dfec3b8ce29b4b8355d40806bf69f74129ebde28324c0c18f0b9d695cf6817b"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handlePreflight (cyclomatic 31): Server.handlePreflight has cyclomatic complexity 31 (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":"internal/proxy/eval_handlers.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"432de5779ce31a98775dfb8191a4a7d33e1328dcfe2246a2c14feafbdee28dc8"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.removeOpenClaw (cyclomatic 30): cli.removeOpenClaw 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed801bc022d0a4499eaa150657b539a5a16a542d7cef3608d4da0b13da41704b"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.inPlaceEditTargets (cyclomatic 30): engine.inPlaceEditTargets 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":"internal/engine/matcher.go"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"29935d821316b176137b706f9d99f9456f0a52f77513fcb42f3ef98fbc53297e"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.splitCompoundCommandForOS (cyclomatic 30): engine.splitCompoundCommandForOS 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":"internal/engine/shellparse.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"b715e2fa97749f3717310ec71ff19fb645d418c661ba142618a24926fb3ec44d"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXTimeout (cyclomatic 30): engine.stripPOSIXTimeout 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":"internal/engine/shellparse.go"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce62078b36dcef4035862424fedf7ae9bbfade5b843acad03a8faa5f358fcc69"}},{"ruleId":"D1","level":"warning","message":{"text":"report.GenerateExport (cyclomatic 30): report.GenerateExport 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":"internal/report/export.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86de1d45c3c07ff2d90a58a0578c680b409ffb936e2a8b2104b6b57e4efe530"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.AutoApproveRunBeforePublishForRunScopeSnapshot (cyclomatic 29): Store.AutoApproveRunBeforePublishForRunScopeSnapshot has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/approval/store.go"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa441029be8e38cb458e98ea0ec1ca8c3b79673c9b66043b3520efe1d72142ab"}},{"ruleId":"D1","level":"warning","message":{"text":"JSONLSink.validateSharedStateLocked (cyclomatic 29): JSONLSink.validateSharedStateLocked has cyclomatic complexity 29 (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":"internal/audit/state.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"598c2ab423ce0d48cfc945c953409239e1e7c4729ba6dd6e06002dd5ed1348d7"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleAuditEvents (cyclomatic 29): Server.handleAuditEvents has cyclomatic complexity 29 (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":"internal/proxy/audit_handlers.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"14676f7e0fcda4c72da289b4b93af74ca6f7f826fd063cd25187f4117b4c2e10"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes._hermes_supports_native_approval (cyclomatic 29): hermes._hermes_supports_native_approval has cyclomatic complexity 29 (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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bfc45a917f80afa87aaf8900901530470ba16d77d2df3a0e368eb0204c2df7"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes.evaluate_pre_tool_call (cyclomatic 29): hermes.evaluate_pre_tool_call has cyclomatic complexity 29 (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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b227da9da8fc370a96b86a30901333afbad5bc084ab342a11553ffa0ede477a"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.outputHookResultWithResponse (cyclomatic 28): cli.outputHookResultWithResponse 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"c45bd26cf2e4655fd20545ea70e3bee86d9fa10ee2a6bf9f2246fa09914aa29e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newMCPProxyCmd (cyclomatic 28): cli.newMCPProxyCmd has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 103, 97). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/mcp.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0211fa74cf0702e86891e8ad19af04ab50266b05a94a63e84b48e393c3c6a57e"}},{"ruleId":"D1","level":"warning","message":{"text":"detect.Environment (cyclomatic 28): detect.Environment 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":"internal/detect/detect.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"1759e065e5f05637ac8279b56c79fac09c60de9a276c233aa5aae75793b5cfb5"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.renderPending (cyclomatic 28): index.html.renderPending has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 13 belong to 4 function literals inside it that branch. 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":"internal/dashboard/static/index.html"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eed4bbfb9dd240a3b8c83e66e0db7731f7432cca6b497aed761fa42a9487ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.resolveBeforePublishLocked (cyclomatic 27): Store.resolveBeforePublishLocked has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/approval/store.go"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b69454bed471ce85f079b199e9126ad173b325fd3b37a9250eff87ec5ee33ff"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiStore.Load (cyclomatic 27): MultiStore.Load has cyclomatic complexity 27 (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":"internal/engine/dirstore.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"586e30a315ea6799732d2e7b81fa423a79da441c6772fcfa2a6e8df312274e9a"}},{"ruleId":"D1","level":"warning","message":{"text":"nativeApprovalDescription (cyclomatic 27): nativeApprovalDescription has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"93674999e2c02344c55b8452b23a1ea7c35cbaa53c96facfedfbd873610ea3df"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.removeClineHooksFromDir (cyclomatic 26): cli.removeClineHooksFromDir 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":"cmd/rampart/cli/cline.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b6097f60ae9b52c220e97ab175f576880e93c3ae75a15d73191d84bc53b74c"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runConvert (cyclomatic 26): cli.runConvert 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":"cmd/rampart/cli/convert.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"828a2207356a6a3b5369566d6d3d52ce75922bb37300a961bf3fe7f526eb2fc0"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.detectPackageRegistryURL (cyclomatic 26): cli.detectPackageRegistryURL 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"6189c904165d9e9d99c36b53c2fb3d7e182126c21785c5f5ed2088221b49f5fb"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.eventKeysCanonical (cyclomatic 26): audit.eventKeysCanonical 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":"internal/audit/event.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"86fe2569bbba79680079a9bb6dad2728567a810814a9bed91165654fa7aa19a4"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.NewWitness (cyclomatic 26): audit.NewWitness has cyclomatic complexity 26 (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":"internal/audit/witness.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad9a36763f90d0ba43b8d990f5d1a8ea9b7e24c54d836a3958138c2af08165d"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXTransparentExecutorOnce (cyclomatic 26): engine.stripPOSIXTransparentExecutorOnce 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":"internal/engine/shellparse.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"5893cf4c19763b7757e35d2d014ddee8c14cb7a7306d5c89951bee54d4b94c5e"}},{"ruleId":"D1","level":"warning","message":{"text":"MixedStore.Load (cyclomatic 26): MixedStore.Load 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":"internal/engine/dirstore.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"050cd5317f22a7494ea1bd13a7afde4eae965e8c1513188de5d434e7f23f43bf"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.installClineHooksWithRename (cyclomatic 25): cli.installClineHooksWithRename 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":"cmd/rampart/cli/cline.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"02b7ea1049c4abf643aa3e9db9d60c2802ef18baf34f678547dc8bae13079a86"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorHermesIntegration (cyclomatic 25): cli.doctorHermesIntegration 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2107}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d1652443d32826905edcb540ebaf633a16753b581cd0f7bbcbd55a3fb42cb3b"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.normalizeGeminiParams (cyclomatic 25): cli.normalizeGeminiParams has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 3 belong to one function literal 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":"cmd/rampart/cli/hook_gemini.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad93ed46c88029d1a1d6244a7e9412c35518c3692b5bbfd7abd00dce046bddf2"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.BeginRunScopeSnapshot (cyclomatic 25): Store.BeginRunScopeSnapshot 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":"internal/approval/store.go"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eae32cdef66173f85f0d09ea5a976145cf7719ea8ca7e02e16854a954d33863"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.prepareToolRequest (cyclomatic 25): proxy.prepareToolRequest 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":"internal/proxy/helpers.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebd8cecc14c9aa326d0b976298677e9ea03e5b37731eb088bbbf63eb20b921f5"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.integrationEnvironmentFingerprintAt (cyclomatic 24): cli.integrationEnvironmentFingerprintAt 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddbdac271e90420e8c3eb40f882d9ba88652e23e47f58ac4984957e616ec2be"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.normalizeV2Cases (cyclomatic 24): cli.normalizeV2Cases 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":"cmd/rampart/cli/bench.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"2622343bedbd9af84dc5bca26bf9886d5e823e39e4b1f4b9fe179f5ca48687a8"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorFileToolPatches (cyclomatic 24): cli.doctorFileToolPatches 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee47411a6787ec5acde41b2195d07fb58672e960899b9769b29a381e79a74df7"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.validateClaudePreToolParams (cyclomatic 24): cli.validateClaudePreToolParams has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 3 belong to one function literal 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b7e28c8fb439e72840df06365f5439bbd091b2ec1e8ff5e2870c13f496a3d3"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.collectClineCommands (cyclomatic 24): cli.collectClineCommands has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1565). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"e958d5bb743ee37bb2349755d15156c29e4af71763a5e5c6d85d992ab6adca62"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.NewJSONLSink (cyclomatic 24): audit.NewJSONLSink has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 7 belong to one function literal 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":"internal/audit/jsonl.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a8410948df9a2ec0f1310b137eb0465838e18c7067ee41b9677578210db739"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.restoreOpenClawExecAskFromReceipt (cyclomatic 23): cli.restoreOpenClawExecAskFromReceipt has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"940f0f9fa3291a2fdfa0e52f2e90a6b94988b7d1458b505797ec68a414d57cbf"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newVerifyCmd (cyclomatic 23): cli.newVerifyCmd has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 137). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c965d2f526141ed6ce649d180a412336f16056f6d8759a06853a5de79ef547a5"}},{"ruleId":"D1","level":"warning","message":{"text":"Witness.validatePage (cyclomatic 23): Witness.validatePage has cyclomatic complexity 23 (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":"internal/audit/witness_pages.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2205862355ef6f08aebed103a2714fa1224a3c39939e226fe757bf94e4339c8"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripShellWrapperOnceForOS (cyclomatic 23): engine.stripShellWrapperOnceForOS 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":"internal/engine/shellparse.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6dd681c7e641504bfe25040bcad0d580c8089ac28166d0bb1dfa81d1727f930"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newAuditVerifyCmd (cyclomatic 22): cli.newAuditVerifyCmd has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 156). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"20881391499be028e739916d846b2424ac07c30564128b61ba3368cb266c4105"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseCopilotInput (cyclomatic 22): cli.parseCopilotInput 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. This is NOT this file\u0027s highest cyclomatic complexity: cli.mapCopilotTool (cyclomatic 29) 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":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"a753a7c32cb44a9c1b946a460ebbe7772e30c894fc341097f385ce4b8bfc087f"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.patchOpenClawToolsIn (cyclomatic 22): cli.patchOpenClawToolsIn 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e703401f171e40737af0a14df95d75113f21c9d6fdb7f02bdcde6bb88a9bb3e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.patchOpenClawDistToolsIn (cyclomatic 22): cli.patchOpenClawDistToolsIn 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d878ff0ffe37eea7bc04811cee7dbe11782f955e322dde47ec533419c4fd99"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.readLatestRecordsLocked (cyclomatic 22): Store.readLatestRecordsLocked 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":"internal/approval/store.go"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"e422af68c89ffcc72cb8209688033db8c9e472f2015b7acbe0e04d2871f308c6"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.recoverChainStateInFileOrder (cyclomatic 22): audit.recoverChainStateInFileOrder 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":"internal/audit/jsonl.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a39bd9c4f7904a79a2bc0270b71d3e196bcd8edfa09ad851e4554cea8d12b26"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.launcherPayloads (cyclomatic 22): engine.launcherPayloads has cyclomatic complexity 22 (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":"internal/engine/matcher.go"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c321cffda888f96d3246176dd49f1de42c17af78117fe5dfa033e499be93126"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.scanCLIOptions (cyclomatic 22): engine.scanCLIOptions 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":"internal/engine/production_commands.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98ce536c5b54858ae39ca0d1a648ca7728c3464914712b2f5d3d0d8420ce087"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXStdbuf (cyclomatic 22): engine.stripPOSIXStdbuf has cyclomatic complexity 22 (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":"internal/engine/shellparse.go"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6db3309585769d7fc39406487559a2a7e4925041789d0666cb7b6a34897637"}},{"ruleId":"D1","level":"warning","message":{"text":"fileTailer.start (cyclomatic 22): fileTailer.start has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 54). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/tailer.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"993e917ab5504e2eabc44539b2c3542bd40cce51e700209ae054c18d4f13b33b"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes.normalize_tool_call (cyclomatic 22): hermes.normalize_tool_call has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea7ba66850a442a44318805ec12ca8f86a45823d989038bec2f365560356f76"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runBench (cyclomatic 21): cli.runBench has cyclomatic complexity 21 (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":"cmd/rampart/cli/bench.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9690c565474ae2ebda593970268dcffff6747e281232af21cac90457594dc2"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newPolicyListCmd (cyclomatic 21): cli.newPolicyListCmd has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 131). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"79fd35d3847c9046a0c0db74775ca4a93dc5b5e4cdaf37c38101a5b82e8ba917"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.removeHermesIntegration (cyclomatic 21): cli.removeHermesIntegration 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":"cmd/rampart/cli/setup_hermes_remove.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"46dced3b3b44e8b566843edb84be84d7f1e337194defd3aa6999106434c9fb21"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.ensureOpenClawApprovalHardening (cyclomatic 21): cli.ensureOpenClawApprovalHardening has cyclomatic complexity 21 (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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de9724195889479137adfab7e6a79820bf7089db5c583dcfd163be5f184e8dc"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.cleanOpenClawConfig (cyclomatic 21): cli.cleanOpenClawConfig has cyclomatic complexity 21 (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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1471}}}],"partialFingerprints":{"codehealthFindingId/v1":"70802460c79c283ea295e40722950d66871635f1cd2775e34ba4180f4b226014"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runUninstall (cyclomatic 21): cli.runUninstall 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"086f15ee0794c428fff4fe5ecc3be7182b4313cc7cde40d42c9c80f07a6ba997"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXTime (cyclomatic 21): engine.stripPOSIXTime has cyclomatic complexity 21 (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":"internal/engine/shellparse.go"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"6441cf59e2ff002c01e66bfdede87f38d6469c0b4eb58780ae615e6322c2929d"}},{"ruleId":"D1","level":"warning","message":{"text":"Proxy.handleClientLineWithContext (cyclomatic 21): Proxy.handleClientLineWithContext 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":"internal/mcp/proxy.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"457c57de69481073e75182abf560dd95d6e9167d42edd14bb3ea65a649c3c7d5"}},{"ruleId":"D1","level":"warning","message":{"text":"policy.IsPathPattern (cyclomatic 21): policy.IsPathPattern 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":"internal/policy/custom.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"9017c1c6d60448bace2b15b26143e9e531a4b908301af932203aae0ca64b0f08"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.Cleanup (cyclomatic 21): Manager.Cleanup has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 6 belong to one function literal 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":"internal/session/manager.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"26a162fec0fbe87cf1ffbc796462dec4518016c9151bc0186783ba14d416c565"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.collectIntegrationAssuranceStatuses (cyclomatic 20): cli.collectIntegrationAssuranceStatuses 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd08caae63e412e355d7ef5b6a670284eb532075341b1c2ecfe43eccc164b47"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorPolicies (cyclomatic 20): cli.doctorPolicies 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"283f0a5db324707c454f5070359c60a37dc99e653c88174723be87bfd4f369f2"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorOpenClawAskMode (cyclomatic 20): cli.doctorOpenClawAskMode 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2008}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18c58999e8a3e3d9149025a0211c07e03f11980be51ee29c6c0dbc6dba90cc6"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseCodexInput (cyclomatic 20): cli.parseCodexInput has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"93887b668e10980cc496ec200988427e0567435add17320b56fe6262271949f6"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.installLinux (cyclomatic 20): cli.installLinux has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5ba7e686c67bd85d8401fa60e7d6a2b963dad66e00cf5367114f2b63d42208"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.ensureRampartDirAccessible (cyclomatic 20): cli.ensureRampartDirAccessible has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/token_unix.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"4472dfb813048b8e689f09a6e41d94b718022843d9c2c559accfeefb4b033b69"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.createLocked (cyclomatic 20): Store.createLocked has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"0770b2d9badd667c3bc1837e6a47770a3f6c94b6a24d6ad1b3eb8422218eeb29"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.restrictiveCommandAliases (cyclomatic 20): engine.restrictiveCommandAliases has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 4 belong to one function literal 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. This is NOT this file\u0027s highest cyclomatic complexity: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a1fd7ae258169fcfa9f8f2d7594ccad2c94d406ae08b46dadeb9d032a58557"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.tokenize (cyclomatic 20): engine.tokenize 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":"internal/engine/shellparse.go"},"region":{"startLine":1344}}}],"partialFingerprints":{"codehealthFindingId/v1":"522dc66a0647f1659358a4f039d50df3dcfdad9e37d105b2385c7dd6ab9fe9b3"}},{"ruleId":"D1","level":"warning","message":{"text":"mcp.validateJSONStringEncoding (cyclomatic 20): mcp.validateJSONStringEncoding 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":"internal/mcp/jsonrpc.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dfaf22a7ed97bfeef3d36102d1790feea2abb41bf69dcd8a523ffd29a1a1e8c"}},{"ruleId":"D1","level":"warning","message":{"text":"signing.LoadOrCreateKey (cyclomatic 20): signing.LoadOrCreateKey has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 86). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/signing/signer.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5117573966eee21038394e36a8d53f22877beaa53d1aabdb6fae83ee19727ea"}},{"ruleId":"D1","level":"warning","message":{"text":"Model.View (cyclomatic 20): Model.View 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":"internal/watch/watch.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f4ba9753a64099113750f2936284d1e000046e3010bf827a865aad5a62a286"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.validateVerificationReceipt (cyclomatic 19): cli.validateVerificationReceipt 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"59aa62d1abb1916530e40db6abe0f1bbe03e6fa27c6e060d86aecdd98ad486ce"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.collectClinePaths (cyclomatic 19): cli.collectClinePaths has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1649, 1631). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e1c20ae1302d0dbcb6c047d405ec1ec9a2000df44442e220b9f0f14cc57b46"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.installDarwin (cyclomatic 19): cli.installDarwin 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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39c57057339548e761e309d3fb30110629125e422b53531be7bcb5fefaa0df6"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.antigravityPluginManaged (cyclomatic 19): cli.antigravityPluginManaged has cyclomatic complexity 19 (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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a4068033c7a9cee3e3436139ce13061613d15c82f60f356c3bccb0782fba67"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runSetupOpenClawMigrateWith (cyclomatic 19): cli.runSetupOpenClawMigrateWith 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a24f753b143c79339139c0e9c952fe8556347754bc16343bfc462b3480f3c3"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.verifyRestartedServeState (cyclomatic 19): cli.verifyRestartedServeState 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc067178fa6b31335adf95a50e3d9dd56f513620a5817d83495362cd5f23ca1e"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.classifyPipelineStage (cyclomatic 19): engine.classifyPipelineStage 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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1abc2ed932e64417137c54b9723d24e4d449edd2b04b39f4222fcd4568d2ee3"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripPOSIXNice (cyclomatic 19): engine.stripPOSIXNice has cyclomatic complexity 19 (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":"internal/engine/shellparse.go"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3cd58de52246707fa1bf4f69ee90bb27fba1b8e28e65516a968985961b6cb81"}},{"ruleId":"D1","level":"warning","message":{"text":"pipelineStage.executesTaintedInput (cyclomatic 19): pipelineStage.executesTaintedInput 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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed01693c9a389520130ae199456fec9efe586269752fd1b6e268ab17bf9f9da2"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleResolveHostedApproval (cyclomatic 19): Server.handleResolveHostedApproval 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"a15dba8bcd7a3d4691b8069e322c75911cba85c022c54c79309262f5f3cd9245"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.bulkResolveRun (cyclomatic 19): index.html.bulkResolveRun 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":"internal/dashboard/static/index.html"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a13fd7b19486bafcbc148c5039a0d7334ad2f7cef6c9e6e66cb3e3aef90185d"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.runPolicyTest (cyclomatic 19): index.html.runPolicyTest 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":"internal/dashboard/static/index.html"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"169661e9082148652f3d127fdb2c425e7fd367acabdf7b696e13a4f988e87e18"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runDoctorFix (cyclomatic 18): cli.runDoctorFix has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ea22d5d7cfeb31cfde96c3b53ef445717ec816bde3cb684476fab67eb12b4e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorPreload (cyclomatic 18): cli.doctorPreload has cyclomatic complexity 18 (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1047}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17e1ffc9b0799ca1f7f47ffc77e96b1b59988b2bdc3427b32daf9d31cae169a"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseClaudeCodeInput (cyclomatic 18): cli.parseClaudeCodeInput has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"3485be47b833e8b9918ad4aafdf2e2fe1504c92ad3265ac498620bae2e82d45c"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.fetchRampartHealth (cyclomatic 18): cli.fetchRampartHealth has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/httpclient.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9bee62e52bcb8ec261472f9b20ea37e4d7d0e19149fb715cbdcfeedce2dcda"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newPolicySearchCmd (cyclomatic 18): cli.newPolicySearchCmd has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 245). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"9109bd6483a0f67f50beb6558d6630efa23ab112701d9a953f55608e0ace8232"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.loadOpenClawToolsConfigDocument (cyclomatic 18): cli.loadOpenClawToolsConfigDocument has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b7955d620fcbb7fe7d3e7a44458d37f66a877a1e1732a5a983a00264661b4b"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.removeManagedServeServices (cyclomatic 18): cli.removeManagedServeServices has cyclomatic complexity 18 (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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b118f623031ce5bb1c4548a99cbe49d62d543e8499a7af156057dfdcc085b7"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.validateLocalServeStateURL (cyclomatic 18): cli.validateLocalServeStateURL has cyclomatic complexity 18 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fcd7dbc71adbb5afd4de5db3c25dce990ac74197929cdc606e964437376656"}},{"ruleId":"D1","level":"warning","message":{"text":"approval.readIdentityKey (cyclomatic 18): approval.readIdentityKey has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/identity.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1a2295e984159d0db6bedbcb29631ea2e2ac1a3477e75058500b59e393bf77"}},{"ruleId":"D1","level":"warning","message":{"text":"Witness.Publish (cyclomatic 18): Witness.Publish has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. 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":"internal/audit/witness.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"00844f3245a27b59e17ee9a802fd016c252800e34e7f45b2f7b028c5d9372865"}},{"ruleId":"D1","level":"warning","message":{"text":"Witness.retrieveFileHistory (cyclomatic 18): Witness.retrieveFileHistory has cyclomatic complexity 18 (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":"internal/audit/witness_transport.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13c5fa1943aa03008f419f7d9f8014315e0914ab27f0cd4c74294b021316f05"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.collectEnvAssignmentNamesFromTokens (cyclomatic 18): engine.collectEnvAssignmentNamesFromTokens has cyclomatic complexity 18 (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: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":2482}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52d8e4c666cce11c5c10976cf802d08f57dc82c348b758c437b4e3c6e176978"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes.load_config (cyclomatic 18): hermes.load_config has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49c4c731cffc83bdd10d250fb44c45cc31fe7718621ae78d9123d1c0b6eeaa5"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes._approval_action_summary (cyclomatic 18): hermes._approval_action_summary has cyclomatic complexity 18 (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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa1f529b0dc89effce329659a346d5a0efcd956174d1923ebd073b2d465b961"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.loadRecentDenials (cyclomatic 18): index.html.loadRecentDenials has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. 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":"internal/dashboard/static/index.html"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c0f9303094783b27840de2901d61ed8861971550596345c6fb6412fe9e4750"}},{"ruleId":"D1","level":"warning","message":{"text":"collectApplyPatchPaths (cyclomatic 18): collectApplyPatchPaths has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 6 belong to 2 function items inside it that branch. 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba623e633b3795ccdc0f33a903e744ab793197acf118f17f45d09632744aa61"}},{"ruleId":"D1","level":"warning","message":{"text":"normalizeToolCall (cyclomatic 18): normalizeToolCall has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e899463df43d8932cfaec424f068cf8241ee728cf29dcadb6c1746d1332ddcf"}},{"ruleId":"D1","level":"warning","message":{"text":"readControlResponseText (cyclomatic 18): readControlResponseText has cyclomatic complexity 18 (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":"internal/plugin/openclaw/index.js"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e8e974b6869bca6206ba02e2c4282f522f2415929315b626c03045463740d2"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newSetupClineCmd (cyclomatic 17): cli.newSetupClineCmd has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 54). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/cline.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e053372a13481fed7196326687b5e3b0431dc53a93a2c8883c22013d540f08"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorAudit (cyclomatic 17): cli.doctorAudit has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"34020b55ab94ac98e5925a1d484c296576077e526dbe31e09b04d91afac9484d"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseReleaseVersion (cyclomatic 17): cli.parseReleaseVersion 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1485}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d3ffda5ea584e884672316336d0d67f03dec6097ad6036e9f34f9c07c909be"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.printStatusHints (cyclomatic 17): cli.printStatusHints 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":"cmd/rampart/cli/firstrun.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"83927883f0a437e42e2363a14f736f7fd8dc0c2aa8bfc8000a203993ff6cf5f1"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.extractPatchPaths (cyclomatic 17): cli.extractPatchPaths has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal 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":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e3b82fa7053c2d1847491b0fc724e321ac69522ceecc82ee5e5b6ac0aee103a"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runRulesRemove (cyclomatic 17): cli.runRulesRemove 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":"cmd/rampart/cli/rules.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e2d48e7dbd279877b081aafca6d426e8e6ab4a6ec5703188984583baed15d6"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runRulesReset (cyclomatic 17): cli.runRulesReset has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec49542047c07cebb797fc468432f9eec3b7eeea0477150fa399abb7138e92eb"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runSetupOpenClawPluginForServeURL (cyclomatic 17): cli.runSetupOpenClawPluginForServeURL has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4240b77783223a71bf10f6600a92c8c7b6cef56da12d32b331b8305b34ce39"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.todayEventsAt (cyclomatic 17): cli.todayEventsAt 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":"cmd/rampart/cli/status.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"423addc95be1e97a54df84cbf4938d076437407cacbed5bab64b97b46dd89188"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.launchdServiceIdentity (cyclomatic 17): cli.launchdServiceIdentity 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d76f6d73f1ca75bbf2de12d8e628eec238dabd980da646c8a1980343e7f4a15"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.validSemverIdentifiers (cyclomatic 17): cli.validSemverIdentifiers has cyclomatic complexity 17 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4a98c4d3cdc56782d5a2d03365a2465182d020b372eadabf0804832ec350bb"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.extractRampartBinaryWithLimits (cyclomatic 17): cli.extractRampartBinaryWithLimits 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2d30e286a86bc50d87072efcee4b520b0607ba543afcee7a137eaa0a23f355"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.verifyRestartedServe (cyclomatic 17): cli.verifyRestartedServe 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b8885bda63904f53c215f4602159bd6538d7b2e7914e2fe6f61a6285a492b0"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.verifyOpenClawManagedConfig (cyclomatic 17): cli.verifyOpenClawManagedConfig has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb250560ea3bae9103894e1115b2a964536e2168b7c391e04057386217f40915"}},{"ruleId":"D1","level":"warning","message":{"text":"approval.walkApprovalStateDir (cyclomatic 17): approval.walkApprovalStateDir 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":"internal/approval/store.go"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffec7cab641f8c6c7e607beb56cfbd83c3c79b06052ef1613cdc93ad7549b3b"}},{"ruleId":"D1","level":"warning","message":{"text":"ExternalRequest.ToolCall (cyclomatic 17): ExternalRequest.ToolCall 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":"internal/approval/external.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc3104e815e43b1075bf805b3565be66abb505cf202a8515420a749e7173993"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.cleanupPersistedReplayState (cyclomatic 17): Store.cleanupPersistedReplayState has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 1502). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbff3e55c84db23e337f251ec5b96ed0031978aa183abc1ebc996cc1bf14ccc"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.mergeYAMLFiles (cyclomatic 17): engine.mergeYAMLFiles 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":"internal/engine/dirstore.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b7ad6ff1ee894d8015acd56579c4f5d90a781b9c645315a81db142734cde1ef"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.stripUnquotedShellComment (cyclomatic 17): engine.stripUnquotedShellComment 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. This is NOT this file\u0027s highest cyclomatic complexity: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e9735581538eb8e8c1499b51110b5a01bb0bc55733404b453bac5bb5312d43"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.leadingOptionValues (cyclomatic 17): engine.leadingOptionValues 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. This is NOT this file\u0027s highest cyclomatic complexity: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"61258a9f05809a04facf982322477a7d86eb1e4f53df597b7321cc6b4f5b1bf4"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.maskLiteralRedirects (cyclomatic 17): engine.maskLiteralRedirects 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. This is NOT this file\u0027s highest cyclomatic complexity: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6cc2701c324915e0c42ee56b614b34bfe923425c00509d9e25b723288039518"}},{"ruleId":"D1","level":"warning","message":{"text":"filetxn.AcquireLock (cyclomatic 17): filetxn.AcquireLock 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":"internal/filetxn/filetxn.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7cb3088d145604b9fcc95c91d1a7a8644732aeaf21872cc327eba26ccf1f5c2"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.enrichParams (cyclomatic 17): proxy.enrichParams 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":"internal/proxy/helpers.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"628073e364b3ffb8c9ccfc0687f3a351c3c56fb2272f095d5d5be0877c49d677"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleLearnRule (cyclomatic 17): Server.handleLearnRule has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/learn_handlers.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e411720713450b3459cc27b418faaf9ce7e03387a2e9e5e3acdfb946324b641"}},{"ruleId":"D1","level":"warning","message":{"text":"hermes._approval_identity_within_bounds (cyclomatic 17): hermes._approval_identity_within_bounds 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"6947f1635a7f32c0946cfbce0b874d8a718e2751279c5e163c9bc9af034414bc"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.warnIfOverlyPermissive (cyclomatic 16): cli.warnIfOverlyPermissive has cyclomatic complexity 16 (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":"cmd/rampart/cli/allow.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"0542ca97b2dbae39ed58819e113b2386f09d5be569dd6b171c3b70c56a2104c4"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.verifyAuditChain (cyclomatic 16): cli.verifyAuditChain has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body\u0027s own statements and 8 belong to one function literal 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":"cmd/rampart/cli/audit.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b34a51016b0b895fbb161888e78a1c3468e22a9fc7c5cdbe77dd9e1e2f19a1"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.doctorVersionCheck (cyclomatic 16): cli.doctorVersionCheck 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"09c4b59a10ee12942efc8c8369cc8fb54946c408cc8eab8b0c73cf6e66bde357"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.newPreloadCmd (cyclomatic 16): cli.newPreloadCmd has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 53, 47). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/preload.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"66bc322583a7c709c9e625402b7ccfd255ee4e4923111d2a0f4b4552cf6321b1"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runProtectOpenClaw (cyclomatic 16): cli.runProtectOpenClaw 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":"cmd/rampart/cli/protect.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"06af0c1a4e8dbe2e3b09bcb8b5ba588212b977b3d2fe44850fcfbc4ff96aa8d8"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.installOpenClawPluginSafely (cyclomatic 16): cli.installOpenClawPluginSafely 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62eef66e150ee0665ba49513d5ae63ba4066316b13f23b22091745e8e5135f3"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseCalVer (cyclomatic 16): cli.parseCalVer 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd5682e6eb3ca4b30059715374d5d4c448ab6f113ea8c9f88d5e79621e2177e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.compareStrictPrerelease (cyclomatic 16): cli.compareStrictPrerelease has cyclomatic complexity 16 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"011a84c048573d6116655098b1edf46bc1c6253304cdc429b143eda9a8146b56"}},{"ruleId":"D1","level":"warning","message":{"text":"hookApprovalClient.requestApprovalCtx (cyclomatic 16): hookApprovalClient.requestApprovalCtx 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea56cfc36de7983ad715fc2c6aa615462aef0a9d821bb11bfdaef27b7b5a7c30"}},{"ruleId":"D1","level":"warning","message":{"text":"hookApprovalClient.pollApprovalCtx (cyclomatic 16): hookApprovalClient.pollApprovalCtx 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"2598b88a19b496302f04effa846879f5457b800446530714bf30521fceb87a7d"}},{"ruleId":"D1","level":"warning","message":{"text":"audit.decodeWitnessJSON (cyclomatic 16): audit.decodeWitnessJSON has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0112b21a076368e755c502c7f0c338b89e317af01ab0842dc6ba2fd04dcf46"}},{"ruleId":"D1","level":"warning","message":{"text":"Witness.retrieveHTTPS (cyclomatic 16): Witness.retrieveHTTPS 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":"internal/audit/witness_pages.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"30ae0e3cd1bb8b5757f270063f9f18d455f985146b682ddd9a7b7cd6dc0f6320"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.cleanPathsAt (cyclomatic 16): engine.cleanPathsAt 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: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d5ecedd476df50fc03851a26dda475343cfb7c6f66d29e0b2d8a2b0e76a2fe7"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.matchRestrictiveAlternateCommandFirst (cyclomatic 16): engine.matchRestrictiveAlternateCommandFirst 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: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"783c298d57cb7b7bf927fcd57c48b25d11481a3893239f71a98fea6d287ac67c"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.matchPathFirstForActionOS (cyclomatic 16): engine.matchPathFirstForActionOS 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: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":2174}}}],"partialFingerprints":{"codehealthFindingId/v1":"a59d0b773d1bc84b72c2d21d5cac6f774e79571d7c6ffdc95149c1a92da314cb"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.matchPathFieldForAction (cyclomatic 16): engine.matchPathFieldForAction 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: engine.joinPOSIXWords (cyclomatic 22) 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":"internal/engine/matcher.go"},"region":{"startLine":2215}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7c4f3494ea26547294f82fcb9234cdd524769be6ecf33418cc2b2b60e8d44cd"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.unwrapPrismaRunner (cyclomatic 16): engine.unwrapPrismaRunner has cyclomatic complexity 16 (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":"internal/engine/production_commands.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"d862863af8edfeb365b165a400c475571c73e16cf75ebeec08e0f1672eba4e11"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.loadPersistentCallCounter (cyclomatic 16): engine.loadPersistentCallCounter 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":"internal/engine/ratelimit_persistent.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7ec0cfe810de0dbf288195c278e37cba6fa7b9e5eda10979478d4ba83e70c5"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.tokenizePowerShell (cyclomatic 16): engine.tokenizePowerShell 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":"internal/engine/shellparse.go"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bb188d9ec74f0380ff601459a65850805683d108b17f303f547af9f1b9799af"}},{"ruleId":"D1","level":"warning","message":{"text":"engine.isExtremelyDangerousPath (cyclomatic 16): engine.isExtremelyDangerousPath has cyclomatic complexity 16 (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":"internal/engine/suggestions.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"47bf31c55be90a8a10f8f4a084190ba1f24caf17c28f3fcd7d3a4ce2bc150aaa"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.handleAuditStats (cyclomatic 16): Server.handleAuditStats 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":"internal/proxy/audit_handlers.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"7215a27cfa01e8859923350170c6eba0c662ab56ec6767cbac8b4a08594db612"}},{"ruleId":"D1","level":"warning","message":{"text":"token.readStoreFile (cyclomatic 16): token.readStoreFile 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":"internal/token/store.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"d507f09a45a8abc1a0d3ce974eb89cfb71ec5f081b38a40a571bcb3b58be3907"}},{"ruleId":"D1","level":"warning","message":{"text":"index.html.handlePendingClick (cyclomatic 16): index.html.handlePendingClick 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":"internal/dashboard/static/index.html"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b9c29156e82c49d74f5c1035138ef781780be5206b717d4e287b46b3958246"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newServeCmd (cognitive 247): cli.newServeCmd has cognitive complexity 247 (threshold 15). Drivers by points: if/else 120 (223 pts), boolean chains 19, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 105). Most of this is not in the body itself: 8 of the 247 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 137, 131). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d4a0321e7c0301e1e4371a7d14cc350a0520167ba8679567e012e717cd5338"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newHookCmd (cognitive 173): cli.newHookCmd has cognitive complexity 173 (threshold 15). Drivers by points: if/else 86 (147 pts), boolean chains 20, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 64). None of this is in the body itself: all 173 points belong to one function literal inside it that branches (line 403). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f51912cfedc8a6ffb6a2c6d72126786a4c650dd0f05419fbd411460a84eb4db"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newUpgradeCmdWithDeps (cognitive 169): cli.newUpgradeCmdWithDeps has cognitive complexity 169 (threshold 15). Drivers by points: if/else 101 (159 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (nesting depth added 60). Of this number, 57 points are the body\u0027s own statements and 112 belong to one function literal 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7fd243d923033cb263ef5f34dccf254f9f00035a2e21eba6f5acdcf9943e19"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.visitPipedDownloadExecutionAliases (cognitive 135): engine.visitPipedDownloadExecutionAliases has cognitive complexity 135 (threshold 15). Drivers by points: if/else 42 (93 pts), boolean chains 17, loops 9 (15 pts), match/switch 5 (10 pts) (nesting depth added 62). Most of this is not in the body itself: 2 of the 135 points are its own statements and the rest belongs to one function literal inside it that branches (line 315). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/pipe_download_exec.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"db37a6401700a3981de9c4080e6319b41290b5c32e2c4bb6a54762f50978c41d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newInitCmd (cognitive 132): cli.newInitCmd has cognitive complexity 132 (threshold 15). Drivers by points: if/else 60 (127 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 68). None of this is in the body itself: all 132 points belong to one function literal inside it that branches (line 94). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/init.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"1590b5fa4698201b2b7b7604eb7efc081461225fc902e124b3fb48897e1da433"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleToolCall (cognitive 118): Server.handleToolCall has cognitive complexity 118 (threshold 15). Drivers by points: if/else 52 (101 pts), boolean chains 14, loops 1 (3 pts) (nesting depth added 51). 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":"internal/proxy/eval_handlers.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f22aa334c486db33db58d097be4f630242767344d29fe08529f132f70536864"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchConditionForAction (cognitive 113): engine.matchConditionForAction has cognitive complexity 113 (threshold 15). Drivers by points: if/else 48 (95 pts), boolean chains 12, loops 2 (6 pts) (nesting depth added 51). 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":"internal/engine/matcher.go"},"region":{"startLine":2669}}}],"partialFingerprints":{"codehealthFindingId/v1":"095903136a5e10ef06b920106eae40c86fb42e822d27a6688191b31cead56d19"}},{"ruleId":"D2","level":"warning","message":{"text":"Manifest.Validate (cognitive 112): Manifest.Validate has cognitive complexity 112 (threshold 15). Drivers by points: if/else 40 (90 pts), loops 8 (15 pts), boolean chains 7 (nesting depth added 57). 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":"internal/assurance/manifest.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"64454c255b6733bfd87a2b099d94fcc9d19c8b9917076a1a61713f5395242359"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.recoverChainStateByLinks (cognitive 112): audit.recoverChainStateByLinks has cognitive complexity 112 (threshold 15). Drivers by points: if/else 36 (96 pts), loops 8 (11 pts), boolean chains 5 (nesting depth added 63). 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":"internal/audit/recovery_links.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"169102ab30561b3042f60b7c6cce0b67d7dafac73322c79092a1070c25a20ef2"}},{"ruleId":"D2","level":"warning","message":{"text":"Model.Update (cognitive 104): Model.Update has cognitive complexity 104 (threshold 15). Drivers by points: if/else 30 (76 pts), loops 5 (15 pts), boolean chains 10, match/switch 2 (3 pts) (nesting depth added 57). 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":"internal/watch/watch.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f6bacae9a592c5d5651e2ca017ae4c3a7da5b1b7a3285040ba3e404d2c9889"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.invocationDownloads (cognitive 101): engine.invocationDownloads has cognitive complexity 101 (threshold 15). Drivers by points: if/else 27 (78 pts), boolean chains 18, loops 3 (5 pts) (nesting depth added 53). 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":"internal/engine/download_exec.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"f236a3761129ba3e0cc5731056fc742671394081ce115161cd77255768f10311"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleBulkResolve (cognitive 94): Server.handleBulkResolve has cognitive complexity 94 (threshold 15). Drivers by points: if/else 39 (73 pts), loops 8 (13 pts), boolean chains 8 (nesting depth added 39). Of this number, 71 points are the body\u0027s own statements and 23 belong to 2 function literals inside it that branch. 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"e757d76fe48f8dd7e5c4c61ec1753fed326dff13ab79f1f5b05107162fd5b49e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newSetupOpenClawCmd (cognitive 87): cli.newSetupOpenClawCmd has cognitive complexity 87 (threshold 15). Drivers by points: if/else 54 (76 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 23). None of this is in the body itself: all 87 points belong to one function literal inside it that branches (line 615). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c33cc3c84a6bdcfc8f4b13d81fef4167dc69ca71f9dde627af095400e835fa"}},{"ruleId":"D2","level":"warning","message":{"text":"Proxy.handleToolsCall (cognitive 87): Proxy.handleToolsCall has cognitive complexity 87 (threshold 15). Drivers by points: if/else 39 (79 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 41). 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":"internal/mcp/proxy.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ee4e6f712d1ffd20c911160bde473979eb944e5af97d2bc4abcc49d039515e"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.pathChangeTargets (cognitive 84): engine.pathChangeTargets has cognitive complexity 84 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 8 (22 pts), boolean chains 18, match/switch 7 (18 pts), jumps 2 (nesting depth added 40). Of this number, 51 points are the body\u0027s own statements and 33 belong to 2 function literals inside it that branch. 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":"internal/engine/matcher.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb8f31c03e277f07f69f789bab0f9ccfa5af3999a3186643032e1e03482dde4"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runDoctor (cognitive 82): cli.runDoctor has cognitive complexity 82 (threshold 15). Drivers by points: if/else 53 (74 pts), boolean chains 7, match/switch 1 (nesting depth added 21). Of this number, 62 points are the body\u0027s own statements and 20 belong to one function literal 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1fe6ee9ab2ea3757be474937a3a56f54962cfed33f76feee2998f443e3b37d"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.visitCanonicalCommandAliases (cognitive 81): engine.visitCanonicalCommandAliases has cognitive complexity 81 (threshold 15). Drivers by points: if/else 22 (51 pts), loops 7 (16 pts), boolean chains 14 (nesting depth added 38). Of this number, 68 points are the body\u0027s own statements and 13 belong to 2 function literals inside it that branch. 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":"internal/engine/matcher.go"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc58711f78813b1823a0c42d403c1c6d0848379dace57c9c42d74dd063d1d7c"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.visitDownloadExecutionAliases (cognitive 78): engine.visitDownloadExecutionAliases has cognitive complexity 78 (threshold 15). Drivers by points: if/else 24 (49 pts), loops 9 (15 pts), boolean chains 12, match/switch 1 (2 pts) (nesting depth added 32). Most of this is not in the body itself: 2 of the 78 points are its own statements and the rest belongs to one function literal inside it that branches (line 473). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/download_exec.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"466c8870f46a306be3a2bd41e24246dc9a07d2153fbe59c0eabf8a94e04ff2fd"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.literalShellWords (cognitive 72): engine.literalShellWords has cognitive complexity 72 (threshold 15). Drivers by points: if/else 23 (55 pts), boolean chains 13, loops 2 (4 pts) (nesting depth added 34). Of this number, 71 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"internal/engine/download_exec.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"34280252f26497f4f7c95167bb1022f97e89d917ee9d75b82836f355293228f4"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.executedFileOperand (cognitive 67): engine.executedFileOperand has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (53 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 35). 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":"internal/engine/download_exec.go"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da5ec70812fbca95499a83217d68273dcf6f14d5739a8a146bfbad7b6c2c054"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.EvaluateWith (cognitive 64): Engine.EvaluateWith has cognitive complexity 64 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 7, match/switch 2 (4 pts), loops 1 (nesting depth added 30). 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":"internal/engine/engine.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c4afce5d948e8cf918a9349584e5bf29345e626dd55c78a6e119b035db2021"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runAllowBlock (cognitive 61): cli.runAllowBlock has cognitive complexity 61 (threshold 15). Drivers by points: if/else 39 (54 pts), boolean chains 7 (nesting depth added 15). Of this number, 53 points are the body\u0027s own statements and 8 belong to one function literal 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":"cmd/rampart/cli/allow.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5717fb4e4b2cbd5069e3ec7e3f83bd95bdae46f41e7fb04a9fc0571c9125c7c1"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.ExplainConditionForAction (cognitive 61): engine.ExplainConditionForAction has cognitive complexity 61 (threshold 15). Drivers by points: if/else 30 (52 pts), boolean chains 7, loops 1 (2 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":"internal/engine/matcher.go"},"region":{"startLine":2289}}}],"partialFingerprints":{"codehealthFindingId/v1":"39346e4b4f4a823ad1c9005a3ac0fa84abab246add25922c3488149e056fd968"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runInteractiveSetup (cognitive 60): cli.runInteractiveSetup has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (41 pts), loops 5 (8 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_interactive.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"be3240b5c538cbd9e368b06074e60048eae3e26ddb7c834c170517f51c11c00a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeOpenClaw (cognitive 59): cli.removeOpenClaw has cognitive complexity 59 (threshold 15). Drivers by points: if/else 26 (52 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 28). 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"414e05d90341677117536455d94a93db4660a58080cd03fa6945307a1c33377d"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.appendHistRow (cognitive 59): index.html.appendHistRow has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 15 (41 pts), boolean chains 18 (nesting depth added 26). 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":"internal/dashboard/static/index.html"},"region":{"startLine":1434}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e316d4d695d966f534df7435ae5f138e7882d707c9fe1269682d9c53132019a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.printBenchSummary (cognitive 58): cli.printBenchSummary has cognitive complexity 58 (threshold 15). Drivers by points: if/else 32 (53 pts), loops 3 (5 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":"cmd/rampart/cli/bench.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb5e7ae7025602b28b232756a4f1f893edb0b49960ea0c716c488d913b594f2"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.recoverChainStateInFileOrder (cognitive 58): audit.recoverChainStateInFileOrder has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (53 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 38). 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":"internal/audit/jsonl.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"f650ced7f2c4e972541706f7e46260b244a982070445d7655034bd212b39f1b3"}},{"ruleId":"D2","level":"warning","message":{"text":"report.GenerateExport (cognitive 57): report.GenerateExport has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 6 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 31). 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":"internal/report/export.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ffdf723400ff626ef478f4f3a31d68472b109bd4b868e8f587de795b4ba0fa"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newPolicyExplainCmd (cognitive 56): cli.newPolicyExplainCmd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30 (52 pts), boolean chains 2, loops 2 (nesting depth added 22). None of this is in the body itself: all 56 points belong to one function literal inside it that branches (line 101). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c63b7acc8f176fbab6aaf06dbd407db72a3532a0f09dae088ee8e26a04e7b79"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.upgradeStandardPoliciesForVersion (cognitive 56): cli.upgradeStandardPoliciesForVersion has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (48 pts), boolean chains 7, loops 1 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b4508f972bc32ccea57cf23e082355e0bfa5225df58fca6b6cb4d2f8aec0f8"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeClineHooksFromDir (cognitive 55): cli.removeClineHooksFromDir has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 31). 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":"cmd/rampart/cli/cline.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa414ad451e1df85c8dcbad761993e0350c193a1e65c6dfae14f0cfc8db630ac"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.splitCompoundCommandForOS (cognitive 54): engine.splitCompoundCommandForOS has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (46 pts), boolean chains 7, loops 1 (nesting depth added 26). 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":"internal/engine/shellparse.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2d8828f982c27924e3500f4a9d09e2726817e72b21834fa2006300a1d21348"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseClineInput (cognitive 53): cli.parseClineInput has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 10, match/switch 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"60877a7efa4e27fcd4b836cac2456175a1230f85223276b32d51b21c3d2a74b8"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.splitHereDocuments (cognitive 53): engine.splitHereDocuments has cognitive complexity 53 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 6 (13 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 29). Of this number, 50 points are the body\u0027s own statements and 3 belong to one function literal 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":"internal/engine/download_exec.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a715530e1aa047a287396c2a2724aff395bb5338d562d8c0765b948c2d24e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleResolveApproval (cognitive 53): Server.handleResolveApproval has cognitive complexity 53 (threshold 15). Drivers by points: if/else 28 (46 pts), boolean chains 6, jumps 1 (nesting depth added 18). Of this number, 51 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"604f3e6f0b9c2f4717a4c9570903ea4991b444ba0f030fd8a2edb8b793fe7ceb"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.normalizeClineParams (cognitive 52): cli.normalizeClineParams has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 8, loops 1 (nesting depth added 22). Of this number, 48 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1446}}}],"partialFingerprints":{"codehealthFindingId/v1":"a12cc8110d2e7e3fa158639ce38b656726a26bc534266ea34924127070aea8e9"}},{"ruleId":"D2","level":"warning","message":{"text":"Proxy.handleChildLine (cognitive 52): Proxy.handleChildLine has cognitive complexity 52 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/mcp/proxy.go"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1151ee2e94ff681938f62522177a91b6325ca32510215618038dad49131d0c7"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripPOSIXEnvUtilityMode (cognitive 50): engine.stripPOSIXEnvUtilityMode has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (34 pts), boolean chains 10, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 26). 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":"internal/engine/shellparse.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"580cfd8d8c1e077b7075aa399d4eec97d23ce4023da211a5a94efaf28bbd80f6"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiStore.Load (cognitive 50): MultiStore.Load has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 23). 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":"internal/engine/dirstore.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc847b61ac3793a01705c3991e339c81b52f3e381148e42f1b1bac615e97986"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.normalizeGeminiParams (cognitive 49): cli.normalizeGeminiParams has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 26). Of this number, 43 points are the body\u0027s own statements and 6 belong to one function literal 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":"cmd/rampart/cli/hook_gemini.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ec975734962233d1d262b5b6057e98bf5fe2311ab1de8aeda198d4fba96e05"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newSetupClaudeCodeCmd (cognitive 49): cli.newSetupClaudeCodeCmd has cognitive complexity 49 (threshold 15). Drivers by points: if/else 33 (45 pts), boolean chains 3, loops 1 (nesting depth added 12). None of this is in the body itself: all 49 points belong to one function literal inside it that branches (line 290). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"4abb4f9e9c8fca6e5b1b20bbac79ce7ed0c1d0be028e8eb94e02f0bcd226bd9a"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.eventKeysCanonical (cognitive 48): audit.eventKeysCanonical has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 3 (7 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 29). 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":"internal/audit/event.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53b4d8a1deb318bae1d9b6ffabb663dee911b9c10ffe4ce2c5785e6a4ac5156"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes._effective_terminal_cwd (cognitive 48): hermes._effective_terminal_cwd has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 12, ternaries 4 (8 pts), error handling 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"2357af2343afdf5ec4b3bfc6f4bf3841d78f39ab3194cf23681180d070d30648"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeOpenClawNativePluginWithHostAt (cognitive 47): cli.removeOpenClawNativePluginWithHostAt has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 6 (nesting depth added 17). Of this number, 45 points are the body\u0027s own statements and 2 belong to one function literal 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1814}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f2b0980dec375ad1274760281dc879ce295366df0bf286d61a5fb18adc4ddf"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newWrapCmd (cognitive 45): cli.newWrapCmd has cognitive complexity 45 (threshold 15). Drivers by points: if/else 31 (38 pts), boolean chains 5, loops 2 (nesting depth added 7). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 93, 87). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/wrap.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"677b547d82280312b7f059a3e48d2a4b979e2575464afbf77b24a2140bf6c768"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.inPlaceEditTargets (cognitive 45): engine.inPlaceEditTargets has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 3 (9 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 25). 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":"internal/engine/matcher.go"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2dc11172071ea0200d92d26ddd201a4d950b09654a746874f0d8eb22e3a5d6"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.visitProductionCommandAliases (cognitive 45): engine.visitProductionCommandAliases has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 13, match/switch 3 (4 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/production_commands.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37bf09dca672fcf16e73b57ee7226964bb9654ae48f7a966cabe18608deb1fa"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectClineCommands (cognitive 44): cli.collectClineCommands has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 4 (9 pts), match/switch 1 (nesting depth added 24). Most of this is not in the body itself: 8 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 1565). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd2c7ef2ed90e29d3a6825c4e0f8a3ee27f87923e4f29fe70a9b508219dcd157"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeManagedServeServices (cognitive 44): cli.removeManagedServeServices has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 28). 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d402d2c64a640dee6b3d357667ace17f9399d114bb0870a5d8a95faf88ce5f6"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripShellWrapperOnceForOS (cognitive 44): engine.stripShellWrapperOnceForOS has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 3 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/shellparse.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"73f33988989c4746e1b58f8bdf043abfc8d141ee9175f43b63acec6daed31937"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.Cleanup (cognitive 44): Manager.Cleanup has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 24). Of this number, 24 points are the body\u0027s own statements and 20 belong to one function literal 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":"internal/session/manager.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59535f84d29a706106e21e8be17c00ff262b936cb31d53e93ecfcf4645e8514"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorHermesIntegration (cognitive 43): cli.doctorHermesIntegration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 30 (41 pts), boolean chains 2 (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2107}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2d19ab400348b17f4a5b854ac174b465c51884ffae4e6d51e0cb8e9920c32a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installAntigravityPluginWithRename (cognitive 43): cli.installAntigravityPluginWithRename has cognitive complexity 43 (threshold 15). Drivers by points: if/else 32 (41 pts), boolean chains 2 (nesting depth added 9). Of this number, 30 points are the body\u0027s own statements and 13 belong to 2 function literals inside it that branch. 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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"88286c2cbe08b7b0cecd8c6f996f20bcef3efccc44063528790f31862ff23775"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.setOpenClawExecAskAt (cognitive 42): cli.setOpenClawExecAskAt has cognitive complexity 42 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1260}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb57aa31a22dfe58319a2ffb8cad9b8a74414c796139d78c515a2b7342d09b0a"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.compactRecord (cognitive 42): audit.compactRecord has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 9 (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":"internal/audit/record.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b0d86e8086dec2649685e523fe76cc92c509a30364cb03d4425ca8774e1ed8"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.tokenize (cognitive 42): engine.tokenize has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 3 (7 pts), boolean chains 5 (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":"internal/engine/shellparse.go"},"region":{"startLine":1344}}}],"partialFingerprints":{"codehealthFindingId/v1":"4734bbe074a5b997790673038089f0bbb3320fc1b17ffda66eb38fb88e52ee3d"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes.extractWithRename (cognitive 42): hermes.extractWithRename has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26 (37 pts), loops 4 (5 pts) (nesting depth added 12). Of this number, 28 points are the body\u0027s own statements and 14 belong to 2 function literals inside it that branch. 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":"internal/plugin/hermes/embed.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7d1f1f7d6debcde19d241ef2caf4e33bf632bf6664a9039387a325c66cafc7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runConvert (cognitive 41): cli.runConvert has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 7, boolean chains 1 (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":"cmd/rampart/cli/convert.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"425fb1716785298c752db8e203cc892aa6d24acfaf79a84db0848a9ced7a9833"}},{"ruleId":"D2","level":"warning","message":{"text":"checkWithRampart (cognitive 41): checkWithRampart has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 4 (7 pts), other 6, boolean chains 5, ternaries 3 (5 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f15d2b4b42e00f5a1b03a484605c10ce8c14aedf5287a945526f2b8cc96c9a6"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.launchdServiceIdentity (cognitive 40): cli.launchdServiceIdentity has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (34 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 27). 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15e5cf196c2a67ff2f6c811d191bcfafcbb266ef6d6db3e737c2f5b8315a9df"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.resolveBeforePublishLocked (cognitive 40): Store.resolveBeforePublishLocked has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (38 pts), boolean chains 2 (nesting depth added 12). Of this number, 38 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/approval/store.go"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"545073c8f3a87f3db7a07315245e3c68cf50473c6c4a0b24a06e17e520d626c8"}},{"ruleId":"D2","level":"warning","message":{"text":"register::evaluateToolCall (cognitive 40): register::evaluateToolCall has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 7 (11 pts), boolean chains 2, other 2, loops 1, match/switch 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"886988bdc902da1c8b6674eab84174b518db3c41cc4c4f1860442affd18ac752"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.integrationEnvironmentFingerprintAt (cognitive 39): cli.integrationEnvironmentFingerprintAt has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 3, loops 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f6903471729a5673b1ac9c0b3d06eec778304b88627cdd8ba1410352583b74"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newPolicyListCmd (cognitive 39): cli.newPolicyListCmd has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 4 (7 pts) (nesting depth added 18). None of this is in the body itself: all 39 points belong to one function literal inside it that branches (line 131). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"adef3e877f6c53fc3623283f07877916903787292a9764bd10462f0d4aab681e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newVerifyCmd (cognitive 39): cli.newVerifyCmd has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 1 (nesting depth added 14). None of this is in the body itself: all 39 points belong to one function literal inside it that branches (line 137). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71b8c757236f116b9d9c3510af444c3856e34a78a819fa4a66cfa41fc94b3a5"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installClineHooksWithRename (cognitive 38): cli.installClineHooksWithRename has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/cline.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"a00f13aa0b30e209219a767e18046c1b43750526f5bf020a053466ef4bb5f36c"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.readLatestRecordsLocked (cognitive 38): Store.readLatestRecordsLocked has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 2 (4 pts), boolean chains 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":"internal/approval/store.go"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"1debc6cbb9c9510fc40914ba3cbd2ed4ac4e55b00605269ebccc930fcb31f752"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.prepareToolRequest (cognitive 38): proxy.prepareToolRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 4 (5 pts), match/switch 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/helpers.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b1463518b6607853b1163e3f947fbab7be469effdf2e4f08f8b2f641ebcad7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.normalizeV2Cases (cognitive 37): cli.normalizeV2Cases has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 1 (2 pts), boolean chains 1, 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":"cmd/rampart/cli/bench.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ad02c66dd36b4c6772dd67eef660b8e9d69b1061ab635ed44368dfaad3aa0c"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.patchOpenClawToolsIn (cognitive 37): cli.patchOpenClawToolsIn has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (35 pts), loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c48fbcf8ed55eb35091ef1c5a59253fe827e94d4b617d958a302d523fc98f21"}},{"ruleId":"D2","level":"warning","message":{"text":"detect.Environment (cognitive 37): detect.Environment has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 12, loops 2 (5 pts) (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":"internal/detect/detect.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2f0d37479aca38d097ab2a433107eb098841c3245e5347f9d6d518dcf4d716"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.isExtremelyDangerous (cognitive 37): engine.isExtremelyDangerous has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 13, loops 2 (4 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":"internal/engine/suggestions.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec9f16b996d305dc3833d36de254854cf200a84bc10e6f0e8d708936f223a69"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes.evaluate_pre_tool_call (cognitive 37): hermes.evaluate_pre_tool_call has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 12, error handling 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff40b5c8411546f0da9eedbd74a6be73d5f3f3df5d7f30e1c4b3b5197c201292"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorHookBinary (cognitive 36): cli.doctorHookBinary has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 3 (6 pts), boolean chains 1 (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2641415b5cfe8b2234e41f4c953fe648e4e51e8be833833f281d67f726b27bb"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripPOSIXTransparentExecutorOnce (cognitive 36): engine.stripPOSIXTransparentExecutorOnce has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (24 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 1 (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":"internal/engine/shellparse.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"281ba7585e6cb011ba4fd720b2e78a314f240f9fa63b21e769ba7e5f327282f9"}},{"ruleId":"D2","level":"warning","message":{"text":"Proxy.handleClientLineWithContext (cognitive 36): Proxy.handleClientLineWithContext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 2 (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":"internal/mcp/proxy.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb13bc60b20d96585bb7a581283f06c5f259da834718091a3ec3363bda504b7"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handlePreflight (cognitive 36): Server.handlePreflight has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 8 (nesting depth added 5). 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":"internal/proxy/eval_handlers.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa9bb717357c2df6a3be3771881248ff8619c20e4d582d3c0bc5c12c3877a84"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleAuditEvents (cognitive 35): Server.handleAuditEvents has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 6, loops 3 (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":"internal/proxy/audit_handlers.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"7197023557492fb9d97e91ffe8a12c0bfd941cc404dff6fbf5a153774f535b76"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.extractPatchPaths (cognitive 34): cli.extractPatchPaths has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 19). Of this number, 32 points are the body\u0027s own statements and 2 belong to one function literal 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":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7081866803e7e561eb194693ac1344df00beeea90830c50ebd80e9b5421fe2"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectNativeHookPaths (cognitive 34): cli.collectNativeHookPaths has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 21). Of this number, 31 points are the body\u0027s own statements and 3 belong to one function literal 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":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2344ab851677a93d85387642b193d1176c6b267a0fe8e001259d33aa4e22ae"}},{"ruleId":"D2","level":"warning","message":{"text":"Model.View (cognitive 34): Model.View has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/watch.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"86bd4c86f4ce8ddf212c180a8ad73f327633e1742909951d08f1b5f3971f3cde"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runSetupOpenClawMigrateWith (cognitive 33): cli.runSetupOpenClawMigrateWith has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (5 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f963b4ea7650e0c8286118ce35e579c22ce8a6cdef31e21bd1110dc72afc3e"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.AutoApproveRunBeforePublishForRunScopeSnapshot (cognitive 33): Store.AutoApproveRunBeforePublishForRunScopeSnapshot has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). Of this number, 31 points are the body\u0027s own statements and 2 belong to one function literal 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":"internal/approval/store.go"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"0314a59cafedecec2d9700087ed5030e16a99fb00ec21496b88ec0222450ec0a"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.NewJSONLSink (cognitive 33): audit.NewJSONLSink has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 22 points are the body\u0027s own statements and 11 belong to one function literal 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":"internal/audit/jsonl.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8635a7fd29245a0807b1973770c84090cd00314c89e273756283866b035050"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.launcherPayloads (cognitive 33): engine.launcherPayloads has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (7 pts), match/switch 3 (7 pts), boolean chains 5 (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":"internal/engine/matcher.go"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"8262f8c88bd20a109492160e4548fd195d335437ddf049f5b905df1ac4332b88"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripPOSIXTimeout (cognitive 33): engine.stripPOSIXTimeout has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 9, jumps 2, match/switch 1 (2 pts), loops 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":"internal/engine/shellparse.go"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbf04cfb08635d19fac26a1f7d73da2b70cd56aaf2b172c6b3dde1a44f6c18e"}},{"ruleId":"D2","level":"warning","message":{"text":"MixedStore.Load (cognitive 33): MixedStore.Load has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 7 (9 pts), boolean chains 3 (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":"internal/engine/dirstore.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"723a422bb4c35c80309c13e0666c419d0a8012b1576850e29c0eff61ba22bbd6"}},{"ruleId":"D2","level":"warning","message":{"text":"fileTailer.start (cognitive 33): fileTailer.start has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 17). None of this is in the body itself: all 33 points belong to one function literal inside it that branches (line 54). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/tailer.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb21c47f08cf906db37a323d6e756e8bc4ef31403f7aafca0d4544217a79cdff"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectIntegrationAssuranceStatuses (cognitive 32): cli.collectIntegrationAssuranceStatuses has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6, loops 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fa089369e49182cf9eedde62f77b4d710285d0a49d6d76cc94ad9cbc8362cf"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorFileToolPatches (cognitive 32): cli.doctorFileToolPatches has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6, 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0bfb8dc607cac28277f16c2e09e0e51845e111514ead6306c1a466db0fa36e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.detectPackageRegistryURL (cognitive 32): cli.detectPackageRegistryURL has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 2, loops 1, 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3553672590b35ae64b4c9a2051fd20aa8b349713dc1528ee4f8598f00167e4f"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.BeginRunScopeSnapshot (cognitive 32): Store.BeginRunScopeSnapshot has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 3, loops 2 (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":"internal/approval/store.go"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8df4e8987d6524e2436abd61a1fdcd4b561eb05851f22a867ce68b537f52e75"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes._hermes_supports_native_approval (cognitive 32): hermes._hermes_supports_native_approval has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 18, error handling 5 (7 pts), if/else 5 (7 pts) (nesting depth added 4). 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c616911b8bdc8c6ce3465894038c2b2b7b45ec065a1d60bcaea96c9e625f03"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectAntigravityPaths (cognitive 31): cli.collectAntigravityPaths has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 18). Of this number, 28 points are the body\u0027s own statements and 3 belong to one function literal 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":"cmd/rampart/cli/hook_antigravity.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"96a2bea393db3b6f48f791a3e8eac8056925471a1e9c7c2d97a376d1abd59864"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newMCPProxyCmd (cognitive 31): cli.newMCPProxyCmd has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 103, 97). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/mcp.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51f30740146b64404260f6cd75b82468db41875afacdc806457fa3d37809327"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.mergeYAMLFiles (cognitive 31): engine.mergeYAMLFiles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 pts), boolean chains 3 (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":"internal/engine/dirstore.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdf9de64f107555f081051313dda22c1fabbf3fdf5769f8aa74f787fdb8e915"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.collectEnvAssignmentNamesFromTokens (cognitive 31): engine.collectEnvAssignmentNamesFromTokens has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 pts), boolean chains 2, match/switch 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":"internal/engine/matcher.go"},"region":{"startLine":2482}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f92c2856bbcf65d1d5adf3adc9925c442bdfeabbf400361916d0d0e3e764ff2"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes._approval_identity_within_bounds (cognitive 31): hermes._approval_identity_within_bounds has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ce9b5c500d672076891e2e9746e14550b41f00d4cff3256a0a8996c48edd26"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newAuditVerifyCmd (cognitive 30): cli.newAuditVerifyCmd has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 10). None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 156). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb7e698ce51b7beda513e913803e43f706cb7a791d579d0a58f902b899814ad"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectClinePaths (cognitive 30): cli.collectClinePaths has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (7 pts), match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1649, 1631). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e8c82f5a39f31cad149c464f2665947135ceb9cba85958da9cd3360482029e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.patchOpenClawDistToolsIn (cognitive 30): cli.patchOpenClawDistToolsIn has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3, loops 2 (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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"f902f99900e1c3e408c7642f58b51caddf7e885d2244a9524e65534495c8eb87"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runUninstall (cognitive 30): cli.runUninstall has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 2 (4 pts), boolean chains 1, match/switch 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb02486536962e7678f61da28c21b8354fae8bda52381b91ce62a6f78cb0a407"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.scanCLIOptions (cognitive 30): engine.scanCLIOptions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, match/switch 1 (2 pts), loops 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":"internal/engine/production_commands.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"f501708749bb4c3812496f647eac95657e0b6820ad85e29469d2d19e805c6d6d"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.extractDollarParen (cognitive 30): engine.extractDollarParen has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (22 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 18). 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":"internal/engine/shellparse.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"7491e678b7d705c3ab8d6d6fc2045e895063bba886d1e1474ae498f805e663c8"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.renderPending (cognitive 30): index.html.renderPending has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, loops 4 (5 pts) (nesting depth added 5). Of this number, 17 points are the body\u0027s own statements and 13 belong to 4 function literals inside it that branch. 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":"internal/dashboard/static/index.html"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a8e43538876af70313164db4fcc44a3d8fc84a47e407ea03e5fe2a573977bab"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeHermesIntegration (cognitive 29): cli.removeHermesIntegration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, loops 3 (4 pts) (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":"cmd/rampart/cli/setup_hermes_remove.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ed3f20e669842bb185ad64803ce26582abcf4c494ec6debb20daea8f7a2343"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyRestartedServe (cognitive 29): cli.verifyRestartedServe has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (6 pts), boolean chains 2, loops 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f6c1a311245e3989047f9525e288d2429428fd2ea3a75c46531c70d31cd14e"}},{"ruleId":"D2","level":"warning","message":{"text":"hookApprovalClient.pollApprovalCtx (cognitive 29): hookApprovalClient.pollApprovalCtx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 2 (5 pts), boolean chains 2, 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"69896d2d7a9bc0f9953ae5e28548ffa576bdec46e39169f938ddcb3470b8aa8e"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.hasNestedRegexQuantifiers (cognitive 29): engine.hasNestedRegexQuantifiers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (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":"internal/engine/policy.go"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e9cd50972710df2ee0aa85373b6fc42dfc52016a63b670e8bdabea867e3735"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.tokenizePowerShell (cognitive 29): engine.tokenizePowerShell has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/shellparse.go"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"2163a904269c92d62f5855ebe91319d50c8cbc7f9b9db707b0056e1b3aec92a8"}},{"ruleId":"D2","level":"warning","message":{"text":"readControlResponseText (cognitive 29): readControlResponseText has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (2 pts), other 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e036803b3e4ca289ebad2e0a7050c5f86d84a971d56da7e696ccbbbd0d653c"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.ensureOpenClawExecApprovalConfig (cognitive 28): cli.ensureOpenClawExecApprovalConfig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 1 (nesting depth added 15). 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a8122f455cce79663c793b742949a98ebc6f70b12ec2eb332f5954dfb4c550"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.restoreOpenClawExecAskFromReceipt (cognitive 28): cli.restoreOpenClawExecAskFromReceipt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 7 (nesting depth added 5). 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bdbd1a4819a7c0547fad3a070a86bf0624abedcc278b56f9ee600e1f1cf45b"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyClineHooksInstalled (cognitive 28): cli.verifyClineHooksInstalled has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 pts), boolean chains 2 (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":"cmd/rampart/cli/verify.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c67f3983bd23b33921fa25fb542b425f5f6f25665dacdb484a24b04a909f35"}},{"ruleId":"D2","level":"warning","message":{"text":"Witness.retrieveHTTPS (cognitive 28): Witness.retrieveHTTPS has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 2 (3 pts) (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":"internal/audit/witness_pages.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3f83115d0d4a3bc3532d82bc16cbf4c605d8013de7a758c799404c2917a37c"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.classifyPipelineStage (cognitive 28): engine.classifyPipelineStage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (5 pts), boolean chains 2 (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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"3751db45b486fe173f45fd76f25439c6b12a11b446f08b732f9c5336f9c04f53"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorPolicies (cognitive 27): cli.doctorPolicies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (6 pts), boolean chains 4, 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d0755c8caa87ab54537446a81b84cbde1380721cbdfa5b0fda351eaa49a8800"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseCopilotInput (cognitive 27): cli.parseCopilotInput has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 4 (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":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdaddafcbcdd86ab82c905c7a2342befcaec6355d98b6d90c44405b67d4006be"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.claudeHooksUseCommand (cognitive 27): cli.claudeHooksUseCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (6 pts), boolean chains 1 (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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3484203bab51b38cc4eed99f2d13240585f81cf8cf8de839ecc4066617c340f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeOpenClawRampartConfig (cognitive 27): cli.removeOpenClawRampartConfig has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (5 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1729}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13943aa79cdb9aca4e1f21e97fd8ba50abb8d54995e2ca3004cb5eef9f54d89"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.todayEventsAt (cognitive 27): cli.todayEventsAt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (3 pts) (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":"cmd/rampart/cli/status.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd6bad4eb9a67544c517726723acc80402b74d4eff1b8f446ba6dc364f90d4c"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.backupLegacyManagedPolicy (cognitive 27): cli.backupLegacyManagedPolicy has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (26 pts), 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":2031}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8690b1332fb56131e9bf81b8df229f95bfc53836bb006d5fc6369f0ab9a3b1d"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.removeRule (cognitive 27): engine.removeRule has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/persist.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"23841b7e512606014df3a243d3e6201fd5f42a71ca5ee4df15a944a5872b610a"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.extractProcessSubstitution (cognitive 27): engine.extractProcessSubstitution has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 15). 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":"internal/engine/shellparse.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"589a38739e528db3388a4940e0319b239c5a5941275a6bc0811f3cfed0767984"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorPreload (cognitive 26): cli.doctorPreload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, loops 2 (3 pts) (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1047}}}],"partialFingerprints":{"codehealthFindingId/v1":"0241bc63ba73bed39531925b7aaa24c82dc263ae7a1333bcbd0462cc6db7a794"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.getOpenClawPluginStateAt (cognitive 26): cli.getOpenClawPluginStateAt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1591}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6ec901a6f877acb02018b5bebbacfb4431227c0ff4e1b6b399bf521ef7483b"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.warnAboutPathCopies (cognitive 26): cli.warnAboutPathCopies has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1649}}}],"partialFingerprints":{"codehealthFindingId/v1":"2258e6302f460d842c4757d754e90103350ca8fde56306b521d10bb766d4a027"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.runGlobNFA (cognitive 26): engine.runGlobNFA has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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":"internal/engine/matcher.go"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"f11ef04ba159464e9aa9d6ccc5d0abe46b3459579d0c629e418f3d403409dadb"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchPathFirstForActionOS (cognitive 26): engine.matchPathFirstForActionOS has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/matcher.go"},"region":{"startLine":2174}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b887e824683a90594518304b849302a0ba9c70ab63aca95b7937e00027db9a"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleAuditStats (cognitive 26): Server.handleAuditStats has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (6 pts) (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":"internal/proxy/audit_handlers.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"835ac8d0bb11bd50ab0c8cb7313b531a4447e9eaa60992205554d38cf762632b"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.bulkResolveRun (cognitive 26): index.html.bulkResolveRun has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (11 pts), boolean chains 2, error handling 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":"internal/dashboard/static/index.html"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"7453b296fb7b98e428cdd1409ab904d8f743a293dda3839c4d3c98b848f7def0"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runBench (cognitive 25): cli.runBench has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). 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":"cmd/rampart/cli/bench.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1e04ec1264f7a9a481580afab8cf5152cbe33ba99eb7c89d9b331e0d440348"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.readClaudeProjectHookControls (cognitive 25): cli.readClaudeProjectHookControls has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 pts), boolean chains 2 (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":"cmd/rampart/cli/claude_hook_state.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b19610ff1f310b59b05b1f04827bce854721119824b6ecfcfa519fc371e5236"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorOpenClawAskMode (cognitive 25): cli.doctorOpenClawAskMode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2, match/switch 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2008}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b846f5bb22c5df77de31bbf9699df262342ce35daf78e0a3deaca3600a6cc17"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newPolicySearchCmd (cognitive 25): cli.newPolicySearchCmd has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2, loops 2 (nesting depth added 8). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 245). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"67217dafda0c969e05aa805c3f521aca420544dc91fecff1c491cd67193d056a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.extractRampartBinaryWithLimits (cognitive 25): cli.extractRampartBinaryWithLimits has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"79add078fb9174dd11e95457ab0520a04fb1dae089413bdc339680516111d0ff"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.checkShadowedRules (cognitive 25): engine.checkShadowedRules has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (8 pts), boolean chains 3 (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":"internal/engine/lint.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c09f50d37b095d3f116281031b06ba16a4675f319c283d27436fcee4bd7d27"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.validateUniqueJSONValue (cognitive 25): mcp.validateUniqueJSONValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/mcp/jsonrpc.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"110979c905456a938167a96e27cc5359bac1d6a727126193f69b6108c4539ead"}},{"ruleId":"D2","level":"warning","message":{"text":"signing.LoadOrCreateKey (cognitive 25): signing.LoadOrCreateKey has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 86). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/signing/signer.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdbaf288dace6067b9540b3422eb98bf143646b279fd81402d7bc48c5cb6f7d9"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.codexHooksUseCommands (cognitive 24): cli.codexHooksUseCommands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 pts), boolean chains 2 (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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5c06790b5a195a7e3bc40695e5e1e9f6c11eb0d25068b21f56549410e0b72f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.cleanOpenClawConfig (cognitive 24): cli.cleanOpenClawConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, loops 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1471}}}],"partialFingerprints":{"codehealthFindingId/v1":"2532d18706bb8f4bdbd85327b43c0a8436b3fbefbb0feeed05a067d787f464ed"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.ensureRampartDirAccessible (cognitive 24): cli.ensureRampartDirAccessible has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/token_unix.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db2b2f1220012ef0d9a5badfff95ff8dc8b8529173877389b1079fb3642f075"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.findRequireApprovalUsages (cognitive 24): cli.findRequireApprovalUsages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1770}}}],"partialFingerprints":{"codehealthFindingId/v1":"6958c2079afc59c8907aa00ad691790d1d52a605b6dfd17002037973d42075d8"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.leadingOptionValues (cognitive 24): engine.leadingOptionValues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/matcher.go"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"5888f29613593933ae28c57703c94d78a890f605d9d217178f677b1885fc7de4"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.maskLiteralRedirects (cognitive 24): engine.maskLiteralRedirects has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, 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":"internal/engine/matcher.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"1256231de8616fb2d0685d73ddbd2963f4c642cd89cc4c0ba45f0f253962be4c"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchRestrictiveCommandDialectFirst (cognitive 24): engine.matchRestrictiveCommandDialectFirst has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (4 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":"internal/engine/matcher.go"},"region":{"startLine":1769}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d67a7cbb2daa9574cd5393e110c8561cf04278093fa7e98a67f07d7809775cf"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.followAuditFile (cognitive 23): cli.followAuditFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 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":"cmd/rampart/cli/audit.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"69076d2a322b07698e0979286602f07d74a2c801f9e26a47101f6c5a7fe6659d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.renderPolicy (cognitive 23): cli.renderPolicy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (9 pts), match/switch 1 (4 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":"cmd/rampart/cli/convert.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"51bf7cdb2843af57df51360f72a360c6c32afa42100db1936bf26be6dd42f4ce"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.outputHookResultWithResponse (cognitive 23): cli.outputHookResultWithResponse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (7 pts), boolean chains 4 (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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ace87578b8993dec2106b5d98804c7bad856a7c5d2af988fde0705a15da631"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseCodexInput (cognitive 23): cli.parseCodexInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d82944402be7a690436741bbc24e05a300f350440956c99dba1ffe9a0e75b5"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.readVerifiedAuditPath (cognitive 23): cli.readVerifiedAuditPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 16 points are the body\u0027s own statements and 7 belong to one function literal 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":"cmd/rampart/cli/init_from_audit.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e542213fbeeed61b83615669a592a7837c00d17e45709a0de61a8e53e359321"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runRulesRemove (cognitive 23): cli.runRulesRemove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 2 (3 pts), boolean chains 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":"cmd/rampart/cli/rules.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"817f7786e26cf5ecebd3b55ec5d71d3de4176f8c532a7aa8e266e55c7eae6e5f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runRulesReset (cognitive 23): cli.runRulesReset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (23 pts) (nesting depth added 5). 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":"cmd/rampart/cli/rules.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"d196b93e9007e9fc77d6072cf7da6a4066aecd9452db9a2e6f91846167d4229f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installLinux (cognitive 23): cli.installLinux has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (23 pts) (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"569585532fdf1efafb3482b04862af041efcef56226b6728024c31705e1e2cf4"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.claudeRampartHooksUnsafeFields (cognitive 23): cli.claudeRampartHooksUnsafeFields has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_claude_failure.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1707e70f7bc7d3de357404dd27dfc6379d5720f6d3c566ac2bbcac426b924ed"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.ensureOpenClawApprovalHardening (cognitive 23): cli.ensureOpenClawApprovalHardening has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 2, loops 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f985441419a091dd20faf9e060e2fec4841f22944b1247fd708e6897b261d6"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.codexRampartIntegrationPresent (cognitive 23): cli.codexRampartIntegrationPresent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (9 pts), boolean chains 2 (nesting depth added 15). 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":"cmd/rampart/cli/uninstall_integrations.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"546965e1c104ebce0057d041c2e90d32d204fbcc3cb61e07ca9be12db27de965"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.configuredVerificationTargets (cognitive 23): cli.configuredVerificationTargets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"4adc55dc4618c75e67b0219861e85a9634e329f85b701e355f6cf09e3155cc24"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.createLocked (cognitive 23): Store.createLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). 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":"internal/approval/store.go"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a73b0a3d0b1ef66faed5be07b31a2820998f70ebbb26b5f8312b7a3637151c"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.cleanPathsAt (cognitive 23): engine.cleanPathsAt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, 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":"internal/engine/matcher.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d52b4b2fc195026bae7e2ee336ccb1665e516dddca641ec910f91dd19c5592"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.restrictiveCommandAliases (cognitive 23): engine.restrictiveCommandAliases has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 8). Of this number, 20 points are the body\u0027s own statements and 3 belong to one function literal 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":"internal/engine/matcher.go"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"253ac742d69c22a61abd5532e4f6e7ae1e710c98db0eb88f2a91cadb028e757b"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchGrantCommandFieldWithAnalysis (cognitive 23): engine.matchGrantCommandFieldWithAnalysis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 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":"internal/engine/matcher.go"},"region":{"startLine":2105}}}],"partialFingerprints":{"codehealthFindingId/v1":"250616fdc54ae32b2a99aaf336426eb7bc7cf96fa79acc2be0831b697e5cd7ff"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.policiesNeedPathResolution (cognitive 23): Engine.policiesNeedPathResolution has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/engine.go"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca739fc9d6f0a8996721909e937906aa07f356e44bcb1de21eb7205e7a50c83c"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.validateJSONStringEncoding (cognitive 23): mcp.validateJSONStringEncoding has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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":"internal/mcp/jsonrpc.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7f8f5726560d5e834251a439d170e882396d3a452e3c5e2793e4e30d6adbda"}},{"ruleId":"D2","level":"warning","message":{"text":"policy.IsPathPattern (cognitive 23): policy.IsPathPattern has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5 (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":"internal/policy/custom.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a60184830bb0363150301cfdbed9caf241fc7d0bd1e7880af9fd946693e2d85"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes._approval_rule_key (cognitive 23): hermes._approval_rule_key has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, ternaries 1 (2 pts), error handling 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea59cf425ee9e8eff30648a9b398f79e1fcadd1b84aad689c78a7ced3de00641"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyAuditChain (cognitive 22): cli.verifyAuditChain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 311). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c04a7d66011a67034d7257700341e302735a021878a10758dd362a855a06d6"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runProtectionPlan (cognitive 22): cli.runProtectionPlan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/protect.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8092340a1ac5ccdf8e0252355cce157d70a02cd7e6845649a47b6d19c8f874f9"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installDarwin (cognitive 22): cli.installDarwin has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (22 pts) (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d97e838777cdd14fd888c3d0b9f7f90f04e4a82fb489951e2df78f0a6727b8b"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.loadFromDisk (cognitive 22): Store.loadFromDisk has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 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":"internal/approval/store.go"},"region":{"startLine":1859}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b11bb25d8b40a4f6c8fef4d7ebc45770e3134e11bc150b5c40bb239eda5bd2"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.decodeWitnessJSON (cognitive 22): audit.decodeWitnessJSON has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 338). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e14f936640948715136291769e3a53b17c854642597698a2dd995637a479fec"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONLSink.validateSharedStateLocked (cognitive 22): JSONLSink.validateSharedStateLocked has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/state.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1558bf539ab887108b64c79304c5627d7abeaf9f84c17f72477c3c496b0407ad"}},{"ruleId":"D2","level":"warning","message":{"text":"Witness.Publish (cognitive 22): Witness.Publish has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4 (nesting depth added 4). Of this number, 15 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. 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":"internal/audit/witness.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1dbee07be4d2b348ddd6a37addde4f2ed07ebbaaff0adf847752cc76b5c78d"}},{"ruleId":"D2","level":"warning","message":{"text":"Witness.retrieveFileHistory (cognitive 22): Witness.retrieveFileHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, loops 2 (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":"internal/audit/witness_transport.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c31f584b6a726c026901a445d690ba5c8316e0a708ace58f5cdb47b4d6ddbf"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.literalShellPayload (cognitive 22): engine.literalShellPayload has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, 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":"internal/engine/download_exec.go"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb67d9daa657fb7eada8294b5f7dfdc6e93605273bd53c0dd7d66ec137cc8b7"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.GenerateSuggestions (cognitive 22): engine.GenerateSuggestions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, 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":"internal/engine/suggestions.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10815c3f5ff341a7b94738c28fc1b517a29861d564967421cd2eef751b7f2ee"}},{"ruleId":"D2","level":"warning","message":{"text":"pipelineStage.executesTaintedInput (cognitive 22): pipelineStage.executesTaintedInput has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (3 pts), match/switch 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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9b31872a9f3e74463baebeec7d533a62b6767d3e5c67d10beceafea14d254e"}},{"ruleId":"D2","level":"warning","message":{"text":"filetxn.WithLockContext (cognitive 22): filetxn.WithLockContext has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 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":"internal/filetxn/context.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb11036fdb6ab5dfe14659c57a30d1d8c806996afef2a3a1ff411d93642397c"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes._approval_action_summary (cognitive 22): hermes._approval_action_summary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (7 pts), boolean chains 6 (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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c0aa10c2c10af4d811e95960c2dd4ba93ab563c8b29e5fea702c8493a910a6"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeApprovalDescription (cognitive 22): nativeApprovalDescription has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 5, if/else 3 (4 pts), other 2 (nesting depth added 1). Of this number, 20 points are the body\u0027s own statements and 2 belong to 3 function literals inside it that branch. 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bae4724e30fe46c5a757770ac1c97bd836b40b706533983113421d9bcb9509d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newSetupClineCmd (cognitive 21): cli.newSetupClineCmd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 54). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/cline.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae504cd00eb69a9ba813a0414fbd39bb269b7661747ee48e137f24fdebf5e66f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.validateClaudePreToolParams (cognitive 21): cli.validateClaudePreToolParams has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 9). Of this number, 17 points are the body\u0027s own statements and 4 belong to one function literal 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f505ecd3c1df3347a72f8ce00cd22cca1fd844fb91cb2e82e23de4413c6f310c"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.loadLogEvents (cognitive 21): cli.loadLogEvents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (2 pts) (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":"cmd/rampart/cli/log.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab35c3e96bf129489aad248e2a89cfa3ccaae81b4e72b78a13b850506c5d7b2e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.patchMessageInDist (cognitive 21): cli.patchMessageInDist has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts) (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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2012}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d1bb0b98f7d9799c27dd47ecce13790348ab96f6f42a4e39a665d55c4eb4da"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installCodexHooks (cognitive 21): cli.installCodexHooks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e17fb1f5f54a8db5c0468fa91975e558a2eb0ce2d1d96a28e38933ba62902b"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installShellCompletions (cognitive 21): cli.installShellCompletions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 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":"cmd/rampart/cli/setup_interactive.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"25ecb254bbf628d10e2226f8012658f44dada22d7281e778ef04b24f7a88d2a0"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyRestartedServeState (cognitive 21): cli.verifyRestartedServeState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69fa550de381fc1a2cfd8cd0ef63b02e112a73b264055910299ab3c1ac11e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"approval.walkApprovalStateDir (cognitive 21): approval.walkApprovalStateDir has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), boolean chains 2 (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":"internal/approval/store.go"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"840069c0df0b247f9d61d33c0c5cc1d0a72552e2922226284e77f66563030d15"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.requireLegacyIdentityStateLocked (cognitive 21): Store.requireLegacyIdentityStateLocked has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/approval/identity.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7eaf3c1a023d7f9fb41572824d1ac932bbd14f5252ba64283fe842d35fcd152"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.ReadEventsFromOffset (cognitive 21): audit.ReadEventsFromOffset has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (nesting depth added 8). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/audit/reader.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd693371807612598f33807b063eb2decd2ebe367525dc9d3ff744f84095f6fb"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchRestrictiveAlternateCommandFirst (cognitive 21): engine.matchRestrictiveAlternateCommandFirst has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 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":"internal/engine/matcher.go"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"011d426509672f41214c51bbf0e4bc51f6b5eca4e0eb53cdbb9b0243366eac7f"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.restrictiveRMOperands (cognitive 21): engine.restrictiveRMOperands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (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":"internal/engine/matcher.go"},"region":{"startLine":973}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a6c9a10954015cb156d9262d2db367e697bef11faa8551e5fbdd078d4ae6aa"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.RequiresCallCount (cognitive 21): Engine.RequiresCallCount has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 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":"internal/engine/ratelimit.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c78b6696b89a1a175b8921bc2a7176e23d69ef26059bf37afa8f926e374533"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes.load_config (cognitive 21): hermes.load_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, error handling 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, 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c6f3fb93feaea8f49a7b3ed12c4bb2533e5953285df624d333ef0fc39734db"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.runPolicyTest (cognitive 21): index.html.runPolicyTest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 2, error handling 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":"internal/dashboard/static/index.html"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3cf535daa336463318fea2b5227bb0e283f748e24c85b132244900ca67847b"}},{"ruleId":"D2","level":"warning","message":{"text":"collectApplyPatchPaths (cognitive 21): collectApplyPatchPaths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts), other 1 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. 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":"internal/plugin/openclaw/index.js"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c417b7b4a19d88399f1e6a92be459511925e4458c4d1ded156e83d84c9cea9"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.listPendingDetails (cognitive 20): cli.listPendingDetails has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2 (3 pts) (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":"cmd/rampart/cli/approve.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d569bbbe876a6b96d8a82d3169c465746c36970f29119cfbfdb4e4e06648f71"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorHooks (cognitive 20): cli.doctorHooks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 5). 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a0b93ddf6420e36442607a7b9e781a1c443f4b4a9858a488e129484ee126aea"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorAudit (cognitive 20): cli.doctorAudit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d178bf4bd56f108be8404eed2aab6d247c0f2e03f3547e9f01b6f37b1c374d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseClaudeCodeInput (cognitive 20): cli.parseClaudeCodeInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, loops 1 (3 pts) (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e807c80f8c7a767d31987432a4b383af3fb6a57fbc8f9c796f20dfd9b3db7cc"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newPolicyRulesCmd (cognitive 20): cli.newPolicyRulesCmd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 367). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bbc1493809e1621b2414757ccd3eba455a6e24b2c4cc1aa132800bce555ebd8"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runProtectOpenClaw (cognitive 20): cli.runProtectOpenClaw has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 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, 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":"cmd/rampart/cli/protect.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"3caa25c926336fade6d569df9a6c959fd9c04cd971d4c12d17baad4d98fea6ef"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.hasRampartHook (cognitive 20): cli.hasRampartHook has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed24110f4681554235658bb2741d281f617833bfd89da7f0ecd1939040c5305"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newSetupCodexCmd (cognitive 20): cli.newSetupCodexCmd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 70). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6d474a084e041c039ca3e5c840895a1c2093086569ad6307139583eff8f372"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installGeminiHooks (cognitive 20): cli.installGeminiHooks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 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":"cmd/rampart/cli/setup_gemini.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2def87f85c42d364c3954a889786d368f3a5090aade65ecbb21e74e93bb4b1c7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.splitServiceCommand (cognitive 20): cli.splitServiceCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"c64c1034668309650ef6f8d6978b77c0ee1240496f66cff3187cb84b34f69f0d"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.extractSubstitutions (cognitive 20): engine.extractSubstitutions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"375dbaf31af86d4944d92919a7f8da19706e8ddb586a91ba115ea83546770851"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripPOSIXNice (cognitive 20): engine.stripPOSIXNice has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 5, 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":"internal/engine/shellparse.go"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"da26a56d551cf3d6e76f2d5af2383fab694503d9768270ff7870dfa71e116b20"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.enrichParams (cognitive 20): proxy.enrichParams has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4 (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":"internal/proxy/helpers.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"72624603d29e23059937b9a454df54d0303c49e19df4ec289abaf56e4034828f"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleResolveHostedApproval (cognitive 20): Server.handleResolveHostedApproval has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 pts), match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/approval_handlers.go"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"b57cf18b5790a9654eca9bf0c7692f3b95d1ed16b33e9646c2e93a8f8a82505e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.validateCursorActionParams (cognitive 19): cli.validateCursorActionParams has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 8). 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":"cmd/rampart/cli/hook_cursor.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a23ac7a6ecfdcb323e461b015294c37164adce12520ce7d251f33aa1edc8dd"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeClaudeCodeHooks (cognitive 19): cli.removeClaudeCodeHooks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (18 pts), 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, 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"734d1ab8f4779ccaf87556b947856a7816e500fe3be8fce9ad3db6a12967d9ac"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.patchWebFetchInDist (cognitive 19): cli.patchWebFetchInDist has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1853}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ebf6c56972b473602e81cad786b5a8d64773abfd81e1553a80cb8844f6652eb"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeRampartCodexHandlers (cognitive 19): cli.removeRampartCodexHandlers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2a6dd2684644fc71980468d553308b311b18d69ea9dad17dae83ad83748d38"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.validSemverIdentifiers (cognitive 19): cli.validSemverIdentifiers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, 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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"74af9e56e90c26a56c513bcab0642d126cffe3a0114c6e404333211598b72bff"}},{"ruleId":"D2","level":"warning","message":{"text":"hookApprovalClient.requestApprovalCtx (cognitive 19): hookApprovalClient.requestApprovalCtx has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 5). 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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa1bc55b0cc58627f5819538eb068ea5691af52b3800f58f4e472462a256fc5"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.cleanupPersistedReplayState (cognitive 19): Store.cleanupPersistedReplayState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1502). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b9f6b5a3de51b21985a9bd124ee7faee38734958364a259bf1e2be3af8031a"}},{"ruleId":"D2","level":"warning","message":{"text":"audit.NewWitness (cognitive 19): audit.NewWitness has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, 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":"internal/audit/witness.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"326e2cae09ce1a8df6e7c27505f7057228e63153cbef6dc0ca3eb7a3b04a610f"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.validatePolicy (cognitive 19): engine.validatePolicy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, 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":"internal/engine/policy.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8446f6de105a1a207923b996aa51d145340b34db31735d3ea9ae4a422ef389"}},{"ruleId":"D2","level":"warning","message":{"text":"filetxn.AcquireLock (cognitive 19): filetxn.AcquireLock has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 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":"internal/filetxn/filetxn.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7cc53f1c9628f8ee691bcc50d8cbb336c72e0899feb0e99a0575ccd6be1f84f"}},{"ruleId":"D2","level":"warning","message":{"text":"report.readAndVerifyAuditChain (cognitive 19): report.readAndVerifyAuditChain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 2 (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":"internal/report/compliance.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f00af60e2cd7321269739e50a3782bb2daf07b040fdf2127643dd81f7e15fc1"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.handlePendingClick (cognitive 19): index.html.handlePendingClick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2 (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":"internal/dashboard/static/index.html"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e81f0362db76942c2c303fbf08324fc8f4c1935f5b19c29d56b6a9b99f7f79d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.doctorOpenClawApprovalHardening (cognitive 18): cli.doctorOpenClawApprovalHardening has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1827}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f488bd6a034176ac2d903c3df98aa43feff21c8787d2a299e63d173a5bcb342"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.printStatusHints (cognitive 18): cli.printStatusHints has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/firstrun.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"15731ba8d0d13fbdf94ad05c86ff4c497e2cca0eb55007ef60a7d9f808850835"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.resolveExplainPolicyPath (cognitive 18): cli.resolveExplainPolicyPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 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":"cmd/rampart/cli/policy.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f6f5b445da66deebcb077500352d88365a8b4913a0d2d9690b87cebb7f012f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.waitForBackgroundReady (cognitive 18): cli.waitForBackgroundReady has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, 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":"cmd/rampart/cli/serve.go"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"c609dffed5d7ab138c080dd8262b4c21ede8f90a20222c94e1623719b84a532e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeRampartClaudeHookCommands (cognitive 18): cli.removeRampartClaudeHookCommands has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2239}}}],"partialFingerprints":{"codehealthFindingId/v1":"7197a14656776bffcc5b964fd77ecfc0ea1f1a6b87d8a1f4f9f29fa7f2f27a3f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.removeGeminiHooks (cognitive 18): cli.removeGeminiHooks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 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":"cmd/rampart/cli/setup_gemini.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae225fd7ccb0c97867991dd2e45d372b62f513f117e569294d548843577236e9"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.clineManagedHooksPresentInDir (cognitive 18): cli.clineManagedHooksPresentInDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 2 (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":"cmd/rampart/cli/uninstall_integrations.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"506cc006c53965f8058213cd9f80fe7b211a9fabdd867f7e128d026fe509f723"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.oversizedMatchInput (cognitive 18): engine.oversizedMatchInput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 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":"internal/engine/engine.go"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1a87ddf4f7ac61fb3b5b81aebae0468c0dd07d65a7e885fcfa075f8cbf1783"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.matchPathFieldForAction (cognitive 18): engine.matchPathFieldForAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, 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":"internal/engine/matcher.go"},"region":{"startLine":2215}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a90ecb8468c35923c6d8db64fb25fa09386177598e84bf0233b814726d92d7b"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.loadPersistentCallCounter (cognitive 18): engine.loadPersistentCallCounter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2 (3 pts), boolean chains 2 (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":"internal/engine/ratelimit_persistent.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"b010b6e9a5a877729c89a38569b28c37e480aad2d62b99766ff1ad2221192e12"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleLearnRule (cognitive 18): Server.handleLearnRule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1, loops 1, match/switch 1 (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":"internal/proxy/learn_handlers.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"32317c0cd11e6cf023b85594ec813cbfa8cb22fb08235979e8259ee0a2add532"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.loadRecentDenials (cognitive 18): index.html.loadRecentDenials has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 2, error handling 1, loops 1 (nesting depth added 2). Of this number, 13 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. 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":"internal/dashboard/static/index.html"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1731c0c38d939f7e965ff16d60abef8705684594d196015d7d239d4b3504ed"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.validateVerificationReceipt (cognitive 17): cli.validateVerificationReceipt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (3 pts), boolean chains 2, 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":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9c7f6e775df0ead0841eab4f24077beeef9d8a04d960038c5c315044e4ed8d"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runDoctorFix (cognitive 17): cli.runDoctorFix has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f87cf5c94e4af9f9b6306407bca4d7ad62fcfcabcfaefc3d078db184d2a197"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newLogCmd (cognitive 17): cli.newLogCmd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 53). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/log.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a23aff2cfb48874cdb7653f5d1792673883a60ebbfbcf2bf5f9fb2f8aed1747"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runSetupOpenClawPluginForServeURL (cognitive 17): cli.runSetupOpenClawPluginForServeURL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6f4e76be481e3f544c4d87148bb98f3d7159cb6cab9b59af998ef0e2669584"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.installOpenClawPluginSafely (cognitive 17): cli.installOpenClawPluginSafely has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a8285e8805a62b7d2eebbb87fe8d2511ca140d899d234109bf2fb16912734a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseCalVer (cognitive 17): cli.parseCalVer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"892a55140f46117ce6d4007669d8755d0200fb1e851274694360bd8b08963957"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyOpenClawManagedConfig (cognitive 17): cli.verifyOpenClawManagedConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"664970ed0f0ada45f02520cda74396121d60310ea5a0094256fcd2b7af08d668"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.validateStringAliasesWithValues (cognitive 17): engine.validateStringAliasesWithValues has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 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":"internal/engine/decision.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c76cc508423931b7aa6c1f5f9286c7c6b98c240b6deb014d706ff789ff38186"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.parseLiteralInvocation (cognitive 17): engine.parseLiteralInvocation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, match/switch 1 (2 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":"internal/engine/download_exec.go"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a56d2cd9f1da6daecf4749d9415c7e736396a8e831b83b5f59f548c784d9ba"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.extractBackticks (cognitive 17): engine.extractBackticks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/shellparse.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b6b496f8da2c4366ea2cd5039aac5d81441254c3c4eb1b657d9d69c35c8b2ff"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripPOSIXStdbuf (cognitive 17): engine.stripPOSIXStdbuf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/shellparse.go"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"5291b573982cd8004ce6726043757713f14f3c977eb232789b87c048b5437af8"}},{"ruleId":"D2","level":"warning","message":{"text":"hermes.normalize_tool_call (cognitive 17): hermes.normalize_tool_call has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4 (5 pts), boolean chains 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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d13396cea290ff352d4085d61992c8ae1553bba8b93d2a864fafc7f9988987d"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.poll (cognitive 17): index.html.poll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, error handling 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":"internal/dashboard/static/index.html"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"7845eefcc1647c002f52a148f35bb38f50265c0c737cd23300be73cc2312efeb"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeToolCall (cognitive 17): normalizeToolCall has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3 (4 pts), other 1 (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":"internal/plugin/openclaw/index.js"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"667bf7c24196fbb74ec307c699ae280ede564e4ee4ba5b752871e8ddaf53e5b2"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyAnchorsWithSince (cognitive 16): cli.verifyAnchorsWithSince has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f408d0a07bb530ee6f9fd1197d2deaeb19941de6bf1f4ae3958a59a40124f6"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.inspectClineDestination (cognitive 16): cli.inspectClineDestination has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 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":"cmd/rampart/cli/cline.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c5626a1e52f7af505f9edeb96833c734e4cd86362db011913b3998eaa330661"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.openclawUsesBundledDist (cognitive 16): cli.openclawUsesBundledDist has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed07ed5afda4854665a29a978268c76f5af8fc6ad81f047bc0ba2445d9b9f8df"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.collectClineURLs (cognitive 16): cli.collectClineURLs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1719, 1707). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":1704}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f1e64d5744e4f78d4e20934c5409e847c33d97773f3defb72710f7c4980d33"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.newPreloadCmd (cognitive 16): cli.newPreloadCmd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1. None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 53, 47). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/preload.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fc9b47acbe41853b75d5de905b08f705fcc405fec56fd30c043f8b855b895c"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runComplianceReport (cognitive 16): cli.runComplianceReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1 (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":"cmd/rampart/cli/report.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"870efe82fc20fec843d5251901ac00b3ffdbd01ce45ea5dd7149e24803f103da"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.patchBrowserInDist (cognitive 16): cli.patchBrowserInDist has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1927}}}],"partialFingerprints":{"codehealthFindingId/v1":"e049e210ef989f7d2c9540054846dd38fb7694b59d91a1f4a1bbddb761f553eb"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.antigravityPluginManaged (cognitive 16): cli.antigravityPluginManaged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec19c5ded38c9f7b9e550bd2e538a88f7e53c4c42e396ef7f6e6e764d8663ac7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.geminiHooksConfiguredForHome (cognitive 16): cli.geminiHooksConfiguredForHome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 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":"cmd/rampart/cli/setup_gemini.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc0f651fbc1221930ee36630db2c37c3e891633cdd8f61a996fcb84e73eb9be"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.loadOpenClawToolsConfigDocument (cognitive 16): cli.loadOpenClawToolsConfigDocument has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"65158d444910f0c8af04a5c28c7fdfa49b0684f76a77f87439d2e8fccd4dd022"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.openClawConfigHasRampart (cognitive 16): cli.openClawConfigHasRampart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1780}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fb8e30f8d994ff3aa412dae686aa60edf2c40e6a2af6c84d09a35536f3a653"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.detectHermesPluginStateForHome (cognitive 16): cli.detectHermesPluginStateForHome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (3 pts), boolean chains 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":"cmd/rampart/cli/status.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc8c75f0cbae2a545dcbb73bf749127ee891a5abfd0c04b28e7ce2ede4493b3"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseStrictSemver (cognitive 16): cli.parseStrictSemver has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"546b3a03310a5d4017dae4adfe0995d598a60037dafb6765de095bfd9c3b66ca"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.verifyOpenClawExecConfigValue (cognitive 16): cli.verifyOpenClawExecConfigValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (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":"cmd/rampart/cli/verify.go"},"region":{"startLine":1313}}}],"partialFingerprints":{"codehealthFindingId/v1":"a295dd2bc897bf30e97aa53a892d7e9738f18f2bd2847b9a114968c5e9fdffa9"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.validatePluginVerificationResult (cognitive 16): cli.validatePluginVerificationResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (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":"cmd/rampart/cli/verify.go"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"55d3d16aa5888f6d2147242e94895332e4a1af36f37b57c15e3c64aa4eac295a"}},{"ruleId":"D2","level":"warning","message":{"text":"policyRegistryClient.loadManifest (cognitive 16): policyRegistryClient.loadManifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (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":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"6463b49182b7bf570bbd92985d033a1233efadb721fa6b000a3258d5741b2ccf"}},{"ruleId":"D2","level":"warning","message":{"text":"policyRegistryClient.downloadPolicy (cognitive 16): policyRegistryClient.downloadPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 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":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ed7747ec921dc815a37cecb9363134df3acb8f6c39e18ce9bf8f22d35901ed"}},{"ruleId":"D2","level":"warning","message":{"text":"approval.readIdentityKey (cognitive 16): approval.readIdentityKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 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":"internal/approval/identity.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20d0c59579dcd5f9b46c969f945324b9473f8a0b5c26695af61edc5bc06e3d0"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.consumePersistedReplayGrant (cognitive 16): Store.consumePersistedReplayGrant has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, 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":"internal/approval/store.go"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f84a19e54024f1148d45967e3e6e85bb672bacf5b5fad263015be68620942e"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.lintRawYAML (cognitive 16): engine.lintRawYAML 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":"internal/engine/lint.go"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f761e21347880a80bbaa2015d426f099b4d3b420ce6f4f9d0a4256c81801c1"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.stripUnquotedShellComment (cognitive 16): engine.stripUnquotedShellComment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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":"internal/engine/matcher.go"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef820e37c69b85a1a7c45037b6ffcfee64074cf018d9b9bab9449f8a255ef6d5"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.redirectWriteTargets (cognitive 16): engine.redirectWriteTargets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/engine/matcher.go"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4172a14a266aedce2c991931d504182b75d20cb3a4968c756dd35a8fd5bdd43"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.collectPowerShellEnvAssignment (cognitive 16): engine.collectPowerShellEnvAssignment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 1 (2 pts), match/switch 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":"internal/engine/matcher.go"},"region":{"startLine":2550}}}],"partialFingerprints":{"codehealthFindingId/v1":"c093a5a37b02448807de8d36fb68c4a19d5a0e23d49621608a5d124f92cc059b"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.migrateAllowRuleGlobsLocked (cognitive 16): engine.migrateAllowRuleGlobsLocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 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":"internal/engine/persist.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f09444e92929528b65a25a9ec28b1c5fc9f9349f1709658064a8c9821d6dc6"}},{"ruleId":"D2","level":"warning","message":{"text":"policy.EnsureUserOverrideAllow (cognitive 16): policy.EnsureUserOverrideAllow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 1, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 161). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/policy/user_overrides.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc921a183bca5ba3aaf51f5762897fdf99f852b5be9f3e23ff81e8d379f0744"}},{"ruleId":"D2","level":"warning","message":{"text":"policy.validateUserOverridesPolicy (cognitive 16): policy.validateUserOverridesPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 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":"internal/policy/user_overrides.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"40962b559a5bfadb9ffa5509d09f8aebd3bfb273cb6d97ae473c5333a3072738"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleListApprovals (cognitive 16): Server.handleListApprovals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, boolean chains 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":"internal/proxy/approval_handlers.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"f300695a53fba02354d636ed79105a5b31abcae9e106d9d84d13fd290172dcef"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.identify (cognitive 16): Server.identify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (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":"internal/proxy/auth.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b680c2286f50c15084857bfd4c540dbe8f617e9ef343c4a3807004fe298e78"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.handleGetAutoAllowed (cognitive 16): Server.handleGetAutoAllowed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/rules_handlers.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2570b1051d7364f487ba7f23400da50eb222e2ca0aa0451256338a0846817379"}},{"ruleId":"D2","level":"warning","message":{"text":"report.hasDenyCoverageForCategory (cognitive 16): report.hasDenyCoverageForCategory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 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":"internal/report/compliance.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"e263bbad7eb44200f12a941aa5593885800aa3854082a1ae992f85f314ace897"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newServeCmd: FunctionTooLong \u2014 newServeCmd runs 424 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 324 over it, 4.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":"cmd/rampart/cli/serve.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"be2e72355fd2ef27c173b5541800b51611f095372e52f0634997bc1ca3dbf571"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newHookCmd: FunctionTooLong \u2014 newHookCmd runs 419 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 319 over it, 4.19\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":"cmd/rampart/cli/hook.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5dce56bdb041e88422889037f76f4cf483a30c7bc07a8127f3a4d05031537b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: engine/matcher.go: FileTooLong \u2014 1775 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1275 over it, 3.55\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":"internal/engine/matcher.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2d67d03aaa5d4f0efbe27ba40b3b6f0c38cce3a032d843c614670c97779e6f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/doctor.go: FileTooLong \u2014 1576 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1076 over it, 3.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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"051cb4794cc27cce7e846cfeea94e7ae8331265f6c9972fe9374919a0d7bb462"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newUpgradeCmdWithDeps: FunctionTooLong \u2014 newUpgradeCmdWithDeps runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.94\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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"63220fe0b31676d6a295edd7f54f3116d923f73546e378332016cf482671d579"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/upgrade.go: FileTooLong \u2014 1399 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 899 over it, 2.80\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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35faa26b622eca753e8b1300672e560b644e5ca8cc080be6456df5468dd11826"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/hook.go: FileTooLong \u2014 1304 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 804 over it, 2.61\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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a978de140eda65516ee71440eb6e7eb8ef9f73dd1fa80d25d242c70a950f645"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/setup_openclaw_plugin.go: FileTooLong \u2014 1283 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 783 over it, 2.57\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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0da0bfe90769519d8ce9a860f6916ac6f6740b0f1b4ead415dbcbeec707e80"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: approval/store.go: FileTooLong \u2014 1252 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: Store (44 blocks, 253-2043). The bar is 500 significant lines; this is 752 over it, 2.50\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":"internal/approval/store.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6deb6fe40d5b6be39841fabdd2603e9ff2672f222b938c3f221a9c45ff6cd2c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/setup.go: FileTooLong \u2014 1218 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 718 over it, 2.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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"082ff62ad0e96df74eb6d9837af5e7ecd6db67bc237698d02ed356fb5da96753"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Server.handleToolCall: MethodTooLong \u2014 handleToolCall runs 232 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 132 over it, 2.32\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"b46ce33686f92de8a90da363ec25e97ec0e34daa5facf754e3eab4396b011d98"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/verify.go: FileTooLong \u2014 1078 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 578 over it, 2.16\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":"cmd/rampart/cli/verify.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27cf619ce4772e6f3a8834ce42b369cebfdb8e91ee070abf1fbfcdec7639ab5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Server.handleBulkResolve: MethodTooLong \u2014 handleBulkResolve runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15\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":"internal/proxy/approval_handlers.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"126a7e361ad3b9af0f301d58851e71cdfefe5215723385b8e6ba0b6ac500b391"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Store: ClassTooLong \u2014 827 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods, 44 blocks, lines 253-2043. The bar is 400 significant lines; this is 427 over it, 2.07\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":"internal/approval/store.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9e2aebf8595e36207173bdd18e033a31da831f7253e68435df7e2692738a39"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newSetupOpenClawCmd: FunctionTooLong \u2014 newSetupOpenClawCmd runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bff75bedcd214a1a823abc3e1c42b96dd24bb8040314a4c8a78e69396213708"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: engine/shellparse.go: FileTooLong \u2014 902 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 402 over it, 1.80\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":"internal/engine/shellparse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2f735e13aa343c3ab6724fe231bb37c459694ea0c48f05fc3c280f693261a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: static/index.html: FileTooLong \u2014 896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 396 over it, 1.79\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":"internal/dashboard/static/index.html"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c381fc0083f949285edde223526d8ab47fd35d7f1c6876a6f5019f1548aefba4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Server: TooManyMethods \u2014 53 methods, declared across 10 files: proxy/eval_handlers.go (15), proxy/server.go (10), proxy/approval_handlers.go (8), proxy/audit_handlers.go (5), \u002B6 more file(s). The bar is 30 methods; this is 23 over it, 1.77\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":"internal/proxy/server.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"c361f31eff43f036b6099c9017e56d621cacde9a237a79dd412b1e396d5d15b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: engine.visitPipedDownloadExecutionAliases: FunctionTooLong \u2014 visitPipedDownloadExecutionAliases runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66\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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca487b457179a12f67dcb3e4c723f7c2f083d2cbc21fb2e5634e3b942fa8642"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Store: TooManyMethods \u2014 48 methods, declared across 2 files: approval/store.go (43), approval/identity.go (5). The bar is 30 methods; this is 18 over it, 1.60\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":"internal/approval/store.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a96a1fcb0ec48a1e24de78587a941c7fbe6a18a68c6bc8e4ba22c63731653c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: engine/engine.go: FileTooLong \u2014 780 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: Engine (35 blocks, 40-1305). The bar is 500 significant lines; this is 280 over it, 1.56\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":"internal/engine/engine.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd997fe34a6d5936b7f4b461638ef4562bdf4407ee55027572ef38d4477d0a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newInitCmd: FunctionTooLong \u2014 newInitCmd runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\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":"cmd/rampart/cli/init.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ee968bbb5ee573c9fa3d867cbc87510c8fcbeb5819c1732ad8810d929bf812"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Engine.EvaluateWith: MethodTooLong \u2014 EvaluateWith runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\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":"internal/engine/engine.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"2752d6e25214cc4edbf0516d3765cebb1706aecda93702deec4b1e14bd120c10"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: audit.recoverChainStateByLinks: FunctionTooLong \u2014 recoverChainStateByLinks runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52\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":"internal/audit/recovery_links.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e32a25ae4c311be2d91cd80681a0c4a75114caf6622f4f6decabd0d1b72fc41"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Engine: ClassTooLong \u2014 606 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods, 35 blocks, lines 40-1305. The bar is 400 significant lines; this is 206 over it, 1.52\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":"internal/engine/engine.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dcdf8c88cb0b34a09d7624946d01e1298369a2287ac8405581e12fd7a9c950f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/proxy.go: FileTooLong \u2014 752 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: Proxy (25 blocks, 126-1143). The bar is 500 significant lines; this is 252 over it, 1.50\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":"internal/mcp/proxy.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cea28033f5cd5669d4de786a7a9fc4c4a49644ea589c9a9e279e3b7a2e342fa"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.runInteractiveSetup: FunctionTooLong \u2014 runInteractiveSetup runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\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":"cmd/rampart/cli/setup_interactive.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"168645df1c2339d47101ebfacac9fdcfa4a1cc826b7550eede0ddf44169ea032"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.runDoctor: FunctionTooLong \u2014 runDoctor runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"83c17bbf25566eccf37529cb488d1605f4bd3d28282eec73d0d50a4997d333ba"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newWrapCmd: FunctionTooLong \u2014 newWrapCmd runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.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":"cmd/rampart/cli/wrap.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4bd82f2784358e3db4279021694e7df79a7668ef289a3bb13398ac5170ba1a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/serve.go: FileTooLong \u2014 689 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: newServeCmd (95-741). The bar is 500 significant lines; this is 189 over it, 1.38\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":"cmd/rampart/cli/serve.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d63fdeb49af5276f94290528d6cfd9bf2f45fa3c65c35c57512e9b2f068416e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newSetupClaudeCodeCmd: FunctionTooLong \u2014 newSetupClaudeCodeCmd runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2982d2de8f6825a947f15a747515e50b60c8a21257e9a4ec7ea6d3931a6aa482"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openclaw/index.js: FileTooLong \u2014 670 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 170 over it, 1.34\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":"internal/plugin/openclaw/index.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7aee13cc92ee8cb06e0aee5d9d7ef76e31e5942457fa71f80aad2b86fbed8b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/approval_handlers.go: FileTooLong \u2014 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: Server (8 blocks, 21-966). The bar is 500 significant lines; this is 165 over it, 1.33\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":"internal/proxy/approval_handlers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca748bc6a1f2046fb871097a1096834ebe14553d62e48d5ad369e8f44096f71"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Proxy: ClassTooLong \u2014 527 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods, 25 blocks, lines 126-1143. The bar is 400 significant lines; this is 127 over it, 1.32\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":"internal/mcp/proxy.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9c905e17fb6c91f452aeeb61c52c5a7dd6e30b31c86478340877c8daa52875"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: engine.matchConditionForAction: FunctionTooLong \u2014 matchConditionForAction runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\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":"internal/engine/matcher.go"},"region":{"startLine":2669}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6440db247bea5364838a8bf87913d684af08d8a7bacff2e5a0fe7142ed278a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.NewRootCmd: FunctionTooLong \u2014 NewRootCmd runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\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":"cmd/rampart/cli/root.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7f7a0491f6052f32c8e2457870a4c544cb5ccf24778d858b867eaac3edc82d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/bench.go: FileTooLong \u2014 622 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 122 over it, 1.24\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":"cmd/rampart/cli/bench.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2ebd253deff32d6eff080e2c06259d9ab0764a700b12be2d9c2e0e39ff16f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.runBench: FunctionTooLong \u2014 runBench runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/bench.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"c141068f6ec3a3e1915902999bfcfbc564c8c24b59360f4f1bd52bb26748e5c1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Engine: TooManyMethods \u2014 36 methods, declared across 3 files: engine/engine.go (34), engine/ratelimit.go (1), engine/ratelimit_persistent.go (1). The bar is 30 methods; this is 6 over it, 1.20\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":"internal/engine/engine.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"086cef2d4d1f815bfcb632d21cdb5a48504d3c6491ed4a0b2dcfba353453d2b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.newMCPProxyCmd: FunctionTooLong \u2014 newMCPProxyCmd runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8e4989b5cad3229c0ccf38b415a86b077d266f8ded14b5e128c81fed967aca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/eval_handlers.go: FileTooLong \u2014 592 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Server (15 blocks, 44-853). The bar is 500 significant lines; this is 92 over it, 1.18\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e0f8b39bbd3938931207e3b55b0735a246e2cdf85c84224bab98bd52c7cab8f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Proxy.handleToolsCall: MethodTooLong \u2014 handleToolsCall runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/mcp/proxy.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9cc8e94f6e99eb7b3ecf0ca4d2aed476ca6451fe2ea6ebfdcafdcc4a970898"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Model.Update: MethodTooLong \u2014 Update runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"internal/watch/watch.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4762f5011e5d2bfed663638615f0c336db824f24e95e11b977bf26f816f4b9f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: engine/download_exec.go: FileTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 78 over it, 1.16\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":"internal/engine/download_exec.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"401367ffda652151048146336a52e6254c659adccde071904f54546c59b4d290"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.runAllowBlock: FunctionTooLong \u2014 runAllowBlock runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\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":"cmd/rampart/cli/allow.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"011bfde414a86e7f02422d395d6a46a58a1019a7f1c74f0d267d9aec02d0044c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: engine.pathChangeTargets: FunctionTooLong \u2014 pathChangeTargets runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"internal/engine/matcher.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"38a33bcc855a5f2412461f8d4dfbc81ad05ea255464bbd7850b14b075d39d3ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.supportedIntegrationDrivers: FunctionTooLong \u2014 supportedIntegrationDrivers runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\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":"cmd/rampart/cli/integration_driver.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8f49cadacbea417006e7188bebe1509d73f6849f620df1b9bc72a92159717a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cli.doctorHermesIntegration: FunctionTooLong \u2014 doctorHermesIntegration runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2107}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e16f6e7d42490f4f9803721fe90646c9acd0947dc884673fb20ce3c1c07d84"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/policy_registry.go: FileTooLong \u2014 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01\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":"cmd/rampart/cli/policy_registry.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcc7df3ecaf99b153970ec031e48e489784c7b540ae4c758d733400aa33e0e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (59 shared lines): cmd/rampart/cli/mcp.go:77-260 | cmd/rampart/cli/wrap.go:57-277 \u2014 These two members are variants of one another: 59 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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df3cf6917a0b50fb7f77b1558835a8c5d19b96d78a815b806df5bd03912ea6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (22 shared lines): cmd/rampart/cli/mcp.go:301-334 | cmd/rampart/cli/test_cmd.go:347-389 \u2014 These two members are variants of one another: 22 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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d8930646894c86312892f0d3139ef3d492e2a4506897b90256655f0d310a8cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): cmd/rampart/cli/setup.go:1716-1849 | cmd/rampart/cli/setup.go:1853-1923 | cmd/rampart/cli/setup.go:1927-2008 | cmd/rampart/cli/setup.go:2012-2145 \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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"19128ffc88eb6688b4c353cf990f1e7d4d758876e0fe6218507e56048061ce3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (76 corresponding lines): cmd/rampart/cli/serve_install.go:506-581 | cmd/rampart/cli/serve_install.go:583-659 \u2014 These two members are one piece of code written twice and then edited apart: 76 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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c3d50dc9dd7f0ed998a6308765503f8f7cb00930671b0af59ad25aa74aa14ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 51\u002B corresponding lines): cmd/rampart/cli/verify.go:546-596 | cmd/rampart/cli/verify.go:623-684 | cmd/rampart/cli/verify.go:711-771 | cmd/rampart/cli/verify.go:807-870 | cmd/rampart/cli/verify.go:989-1056 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 51 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7777733f369f9e17452d20327cd96a2362b43db34cc01af37af5f9e8e1e16f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): cmd/rampart/cli/hook_antigravity.go:149-192 | cmd/rampart/cli/hook_copilot.go:237-281 \u2014 These two members are one piece of code written twice and then edited apart: 44 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":"cmd/rampart/cli/hook_antigravity.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"0179220178100ea85f33df43a5acaea189b2f177c7c95ac1f8683d90fb0ed704"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 43\u002B corresponding lines): internal/engine/persist.go:498-544 | internal/policy/user_overrides.go:71-113 | internal/session/manager.go:140-196 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 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":"internal/engine/persist.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"24637bf73f3278c9aa79eeee58cee7121bde4218837bf326e6656345dccddfa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 51\u002B corresponding lines): cmd/rampart/cli/setup_antigravity.go:19-70 | cmd/rampart/cli/setup_cursor.go:26-76 | cmd/rampart/cli/setup_gemini.go:16-67 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"df1ed1e21b92b042a911ed91af64f4b4944fa11117d73dcd57d27cb1b25e355b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): internal/approval/store.go:1597-1635 | internal/session/manager.go:475-512 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1597}}}],"partialFingerprints":{"codehealthFindingId/v1":"489f23d9cdfae8431cc83336fe0b760c8140b5f064287a4544f9d05e35e5489c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): cmd/rampart/cli/setup.go:2239-2277 | cmd/rampart/cli/setup_codex.go:422-463 \u2014 These two members are one piece of code written twice and then edited apart: 39 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2239}}}],"partialFingerprints":{"codehealthFindingId/v1":"1108180499e9b17774311ada86c5d4bf91dc6ab04ebfe94a2843e3985641ca0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): cmd/rampart/cli/setup_codex.go:281-320 | cmd/rampart/cli/setup_gemini.go:194-240 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ceb4076533d207c1563ed808523091a5a188628dffb7904f02a2d9d46b3a67"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): cmd/rampart/cli/httpclient.go:54-88 | cmd/rampart/cli/upgrade.go:1275-1303 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/httpclient.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"688db1ed8b5bee4308e57af6bb56bdb80ef4967d0930b3a6b381bb364354a092"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): cmd/rampart/cli/setup.go:2279-2317 | cmd/rampart/cli/setup_codex.go:222-257 \u2014 These two members are one piece of code written twice and then edited apart: 36 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae2aca17e4be180676ebdd3d379a121973dec96ad22b7ba9a88de0bd9a5f86f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): internal/engine/shellparse.go:111-143 | internal/engine/shellparse.go:147-186 \u2014 These two members are one piece of code written twice and then edited apart: 33 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":"internal/engine/shellparse.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f78e81f2feea47b1e77641790d3382d88b2828f294ab6117e5408628a9e5da0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): internal/watch/format.go:148-168 | internal/watch/format.go:171-192 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/format.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"73826840e9c2836719e5fc83dc874d680df3525946fccc879c1ba6c5b5e706b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): cmd/rampart/cli/audit_helpers.go:330-362 | internal/report/compliance.go:419-446 \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":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0569363f8e429f42a79645ffd96c95fd06ed5292f787752e355309f35a3f274"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): cmd/rampart/cli/serve_uninstall.go:56-86 | cmd/rampart/cli/serve_uninstall.go:88-120 \u2014 These two members are one piece of code written twice and then edited apart: 31 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":"cmd/rampart/cli/serve_uninstall.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8516126dec5b396ce62a33d012be0c1d5be05bd4b53108e00a474c7285e52728"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): internal/engine/decision.go:239-265 | internal/proxy/helpers.go:245-277 \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":"internal/engine/decision.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac71216e604904e44cd003c79de8fb546f0eceb5129eb8dd23a2779c2f1c764"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): cmd/rampart/cli/setup_copilot.go:155-180 | cmd/rampart/cli/setup_copilot.go:188-209 \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":"cmd/rampart/cli/setup_copilot.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c087cde07f00b3676f939286b8add552369ebd01360360fbc87882995fd301f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): internal/proxy/approval_handlers.go:251-282 | internal/proxy/approval_handlers.go:288-311 \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":"internal/proxy/approval_handlers.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03eb2e3dd65559be4332701715885daa421000632c906ec5143b65693bdb6ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): internal/detect/detect.go:172-201 | internal/detect/detect.go:205-226 \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":"internal/detect/detect.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"3925578421f3a1c769992046e7e5194599d046a70a260088c8461c8f7476a272"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): cmd/rampart/cli/rules.go:62-86 | cmd/rampart/cli/rules.go:89-109 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6e9f6ec18ced30f9f5cca062ab95eefa00be8208a0fa55098f8842a1a9caadc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): cmd/rampart/cli/setup.go:1289-1318 | cmd/rampart/cli/setup.go:1320-1377 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"4906d411e275be28591c2d3de3b44e602100038fb541f3f0e96b8fbf82fb95e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): cmd/rampart/cli/audit.go:504-524 | cmd/rampart/cli/audit_helpers.go:383-409 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit.go"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4e3054ba2cbdac626f7ccd54927dba8bfb03a218ad93b7e432888ac9e4d0063"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): cmd/rampart/cli/setup_antigravity.go:303-321 | cmd/rampart/cli/uninstall.go:457-476 \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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dba2bd410becb2e1bbb9ecd2f25352f20c134b86a5dc85156eaf80c1581e1e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): cmd/rampart/cli/setup.go:98-112 | cmd/rampart/cli/setup_codex.go:259-274 | internal/detect/detect.go:152-166 \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":"cmd/rampart/cli/setup.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c629279ac1442528772bd5503e96cd02aebae18aade08b72dedb34f06455f33f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): internal/engine/matcher.go:795-820 | internal/engine/matcher.go:1018-1044 \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":"internal/engine/matcher.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcd8b496683705a1e394be5d150a3688a1e66f8de6e4160db5d8028a1f429b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): internal/plugin/hermes/embed.go:109-124 | internal/plugin/openclaw/embed.go:57-72 \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":"internal/plugin/hermes/embed.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff9fc21ef56352c909deb3e660094dee6c1082fc4fa41efe9290f17e1028d5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): internal/engine/engine.go:503-516 | internal/engine/engine.go:1046-1074 \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":"internal/engine/engine.go"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c78f280b3a26180aa598a4c38aeac663df6c2f1162af35647ed5ddf4f610c66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): cmd/rampart/cli/hook.go:1266-1285 | internal/audit/redact.go:93-116 \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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1740448676e4e5ba6831bdaba5a45b7d135924d6153b11898e408ea92609e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): internal/mcp/proxy.go:693-708 | internal/mcp/proxy.go:719-734 \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":"internal/mcp/proxy.go"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86d8140372d15e81a4c349dac5c54dfbb318d948c7a226ece259919804878fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): internal/proxy/server.go:299-320 | internal/proxy/server.go:323-345 | internal/proxy/server.go:348-365 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/server.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"e584bb03146657b36538aad275e40929a67e83e3678c62a92bc34285bd9a54be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): internal/report/compliance.go:448-469 | internal/report/compliance.go:471-489 \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":"internal/report/compliance.go"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e8e680a128412b8c0654a361bcb84b68c8625f06abbc03511a54a79d69c7716"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): cmd/rampart/cli/setup_openclaw_plugin.go:309-332 | cmd/rampart/cli/setup_openclaw_plugin.go:334-356 \u2014 These two members are one piece of code written twice and then edited apart: 23 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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4d73a8c21e49e147d1fdba035363062d6313ce5d4920047a8d77cf5a116eb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): cmd/rampart/cli/approve.go:32-58 | cmd/rampart/cli/approve.go:60-78 | cmd/rampart/cli/approve.go:80-103 \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":"cmd/rampart/cli/approve.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e8f479832c1cfe3473fd2dd188477cd4c1d7be11d32d674d78f32df5773561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): cmd/rampart/cli/setup_openclaw_plugin.go:290-307 | internal/plugin/openclaw/embed.go:77-94 \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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea39860cd7bff0e4b8500d495f46d0c261e02726cac33e73e5bdf0c452d3f0ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): cmd/rampart/cli/hook_codex.go:324-336 | cmd/rampart/cli/hook_copilot.go:126-138 \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":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d0225e088dae5cb0244a4f0159d051dd71be1001cdc3979c775d0cf8169772"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): internal/policy/custom.go:71-88 | internal/policy/user_overrides.go:55-69 \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":"internal/policy/custom.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e90fef9543438f2b27f33f971fd91102413f172cff8c8f9652b3190575c9c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): cmd/rampart/cli/policy_sync.go:392-407 | cmd/rampart/cli/serve_install.go:290-304 \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":"cmd/rampart/cli/policy_sync.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7160ea8c3e8e6176a0b669524193a4c101342a75f0e223d591766bd35a1957"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): internal/detect/detect.go:321-341 | internal/detect/detect.go:344-364 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/detect/detect.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"53536909694f28a0eaf9b6a4afa3e9c78b2faf173ef2bfddaa1e59fa56d9aa94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): cmd/rampart/cli/setup_codex.go:477-492 | cmd/rampart/cli/setup_copilot.go:245-260 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"a79a2e4bc3681d33cb4b8a3ae5dcde378e4b9515872631a42bc97837d97d7061"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): internal/mcp/proxy.go:279-296 | internal/mcp/proxy.go:298-315 \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":"internal/mcp/proxy.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddef4660f2fb17650d21b53a980d3d1998eeb1dea4559501759911d2a180210"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): internal/report/html.go:375-394 | internal/report/html.go:397-416 \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":"internal/report/html.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e2b8287d05da6c44f77763650b867d12145b7eafda96b8b85632078b6e0d1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): cmd/rampart/cli/watch.go:147-164 | internal/report/compliance.go:568-584 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/watch.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb36198fd37c87740127941165a4dd56cdc88eeee27defc9cce4cb1ce2aab52"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): internal/filetxn/lock_windows.go:16-23 | internal/filetxn/lock_windows.go:25-36 \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":"internal/filetxn/lock_windows.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6bcf9edbde2f510ea4722dd3bd8f8314ced5eeeb5a5e240d48ee28ae6226aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): cmd/rampart/cli/allow.go:78-104 | cmd/rampart/cli/block.go:20-46 \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":"cmd/rampart/cli/allow.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ab6f589b74d5b42b9444af63b50ec8e03ca3195fe2980571684415137ed243"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): cmd/rampart/cli/rules.go:639-648 | cmd/rampart/cli/token.go:111-120 | cmd/rampart/cli/upgrade.go:1713-1725 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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":"cmd/rampart/cli/rules.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"272d8b7e7ea28255d4ae5fe23cc6f62f1f5c4996507db8e745a724579361630f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): cmd/rampart/cli/inventory.go:88-109 | cmd/rampart/cli/status.go:35-48 \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":"cmd/rampart/cli/inventory.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"48e0b07ccd767acdfe810e5865a5308d54ba5ac44cd4d91c9d0f329c30bcafa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): cmd/rampart/cli/generate.go:252-265 | scripts/generate-registry.go:233-246 \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":"cmd/rampart/cli/generate.go"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf6a965d745595107bf45566b5a1b9b0ca72f68f39796454ddfc549aebc5306"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): cmd/rampart/cli/setup_codex.go:41-53 | internal/tlsutil/tlsutil.go:211-223 \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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef474367542fb869af1cdec2dd9dcd5fde4e3133e9e506011068b891448dea1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): internal/approval/external.go:50-63 | internal/proxy/helpers.go:72-88 \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":"internal/approval/external.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fb127ee1912534074e9029c5ba67d13cd6b94b725ede10fbbf25d000e776d39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): internal/engine/decision.go:348-367 | internal/engine/policy.go:248-265 \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":"internal/engine/decision.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"1206f25b19d74e6e5de278779a8127343bc49f9f25560ae4450b9576ea2de500"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): cmd/rampart/cli/convert.go:241-255 | cmd/rampart/cli/convert.go:257-276 \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":"cmd/rampart/cli/convert.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0e90139f9691515479beb0010809f2d17d5c2420579b450818be1f0279648d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): cmd/rampart/cli/setup_codex.go:25-39 | internal/mcp/jsonrpc.go:234-247 \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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d851d8ceb6b79f33cd8012095b66bff44d5490dc6575f119ec91ae56061449c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): cmd/rampart/cli/doctor.go:1284-1298 | internal/openclaw/hardening/hardening.go:160-176 \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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1284}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54af67ad3fab7558e81eed601c8cbae1b33317100f0e38f4dc450564224c7a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): cmd/rampart/cli/report.go:307-317 | cmd/rampart/cli/report.go:319-330 \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":"cmd/rampart/cli/report.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d76539807574959d0ddd15bb83dfaaa118444df5d48143de1c22541ee5466a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): cmd/rampart/cli/setup_codex.go:465-475 | cmd/rampart/cli/setup_cursor.go:259-269 | cmd/rampart/cli/setup_gemini.go:260-270 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc63b79874fbd155707409440e2078b55fb695b4abdebbfb07e514943e9c018"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): cmd/rampart/cli/token_windows.go:15-27 | internal/securefile/owner_windows.go:18-30 \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":"cmd/rampart/cli/token_windows.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0882fb28275219326b895076e34c428eb60222b118a9215701929f715340a355"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): cmd/rampart/cli/spinner.go:69-80 | cmd/rampart/cli/spinner.go:83-93 \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":"cmd/rampart/cli/spinner.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb401e46c730a6ef1b01ee421ad5577c8c2674e08ba6fe502cf83e172eceea5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): cmd/rampart/cli/policy.go:322-338 | internal/engine/engine.go:1016-1032 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d5777339eb2e5a2404bbf09a2084572fdc9e9599656230778c3775aa4ef3c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): cmd/rampart/cli/setup_hermes_remove.go:20-30 | cmd/rampart/cli/setup_hermes_remove.go:32-44 | internal/engine/lint.go:505-515 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_hermes_remove.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"232c913f0ec8ad7a919bfe78961f52222f98bf189791a1fee5a9c9a243952f93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): internal/watch/watch.go:268-276 | internal/watch/watch.go:278-287 | internal/watch/watch.go:289-297 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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":"internal/watch/watch.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f301c0c2cfaae927553e0b4e739b06edbd5cd75da90bc86b2399b17267994e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): cmd/rampart/cli/setup.go:2147-2162 | cmd/rampart/cli/setup_codex.go:322-334 | cmd/rampart/cli/setup_gemini.go:163-179 | cmd/rampart/cli/setup_gemini.go:242-258 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":2147}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5c40c547ecfd5b66f59dd08f4bae1c4fbbba6c730ee42b57cd18917a7c18831"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): cmd/rampart/cli/wrap.go:693-707 | internal/proxy/webhook.go:87-100 \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":"cmd/rampart/cli/wrap.go"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc72cf7ce901a155c3d608fe2f0d8323f7457f847b387a3a8e2ca208e850817"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): cmd/rampart/cli/hook_antigravity.go:194-207 | cmd/rampart/cli/hook_gemini.go:213-228 \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":"cmd/rampart/cli/hook_antigravity.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"2660925c84d3a4e34b233948092124b016a4f7ba33af11bbb5013f20fcf7717a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): cmd/rampart/cli/paths.go:15-24 | cmd/rampart/cli/watch.go:166-175 \u2014 These two members are one piece of code written twice and then edited apart: 10 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":"cmd/rampart/cli/paths.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"24492d99ca002f971ff98865549cfb7d7fceb52e998d6aeab11466d33a2b885d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): cmd/rampart/cli/hook.go:355-361 | cmd/rampart/cli/setup_openclaw_plugin.go:1988-1993 \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":"cmd/rampart/cli/hook.go"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18b0d4c2ff33a70f099634e214fcdd98be0fac455178b3fdc8184d9974f3e14"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): internal/approval/review.go:98-107 | internal/audit/redact.go:78-91 | internal/mcp/proxy.go:1158-1167 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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":"internal/approval/review.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"88cca0e91589793dd6dabe8ab560d002f7e1eeb19ad99c33efa7337df236a0d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): internal/audit/event.go:232-239 | internal/engine/shellparse.go:945-955 \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":"internal/audit/event.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7cfc447f4dc0772e9109ca55a09e46f5cd2eb50030ac8aa4fbed5b565ba396e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): cmd/rampart/cli/token.go:103-109 | internal/dashboard/handler.go:97-104 | internal/report/html.go:458-464 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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":"cmd/rampart/cli/token.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb1e4d6d899312320d5ba09f60ad34243f9716f02a3fdfdd2ccda3e1e0bdf52"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): cmd/rampart/cli/bench.go:853-861 | cmd/rampart/cli/rules.go:664-672 \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":"cmd/rampart/cli/bench.go"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e78cc8cc232ab760408550171f7ecdd023aab268fac545f1e870502704bc22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): internal/engine/persist.go:31-37 | internal/tlsutil/tlsutil.go:40-46 \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":"internal/engine/persist.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9aeb4e2b9767cb7cd37c466cb976789f2a124c40ab5f81346e729d32c74e0f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): cmd/rampart/cli/inventory.go:194-200 | cmd/rampart/cli/serve_install.go:172-178 | cmd/rampart/cli/user_config.go:28-34 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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":"cmd/rampart/cli/inventory.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f418f3acaa1013ca5a3f17b64390f58e2e6c6d91838abf9993c1f8176fd7699"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201337 lines \u00D7 2): cmd/rampart/cli/hook.go:960-996 | cmd/rampart/cli/hook.go:1002-1034 \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 \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":"cmd/rampart/cli/hook.go"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b16b8d6fb89de4f706cc645f720378047892b9a16b204bf7af0c6ff560abc35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): internal/audit/jsonl.go:85-128 | internal/audit/recovery_links.go:44-87 \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 \u0060internal/audit/jsonl.go:85\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":"internal/audit/jsonl.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4743eca99892d69e990c82dce2785959c857f32687b7febd51066139006f677"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201331 lines \u00D7 2): internal/policy/custom.go:135-165 | internal/policy/user_overrides.go:85-113 \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 \u0060internal/policy/custom.go:135\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/policy/custom.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e4be8e526f34073cdec69a51e950ff42e4189f0aad50bf776254dc8da92cd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): cmd/rampart/cli/setup.go:2259-2277 | cmd/rampart/cli/setup_codex.go:445-463 \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 \u0060cmd/rampart/cli/setup.go:2259\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":2259}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f40126ba1bcc53233676961be8b34e7fc407073c80c82ced455805c7e85cf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/engine/matcher.go:796-814 | internal/engine/matcher.go:1019-1037 \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 \u0060internal/engine/matcher.go:796\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":"internal/engine/matcher.go"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5ee5e8ba3fdbd0527544605616986dfdf8049af55715c6539478dbb067ee22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): internal/engine/dirstore.go:102-118 | internal/engine/dirstore.go:293-308 \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 \u0060internal/engine/dirstore.go:102\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":"internal/engine/dirstore.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"078c99cdfe45dc5308409b5ef44911e0ab4cea03b65c237212b715ca77a1d400"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): cmd/rampart/cli/setup.go:1901-1916 | cmd/rampart/cli/setup.go:1987-2001 | cmd/rampart/cli/setup.go:2124-2138 \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 \u0060cmd/rampart/cli/setup.go:1901\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1901}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d15bc0688acb85d7a8e38c765ffcafdcb6631bd08b688a74b474ba2357e0d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/rampart/cli/doctor.go:847-862 | cmd/rampart/cli/doctor.go:877-892 \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 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b0e4e7c9d3c0e22479280e30f3b7912a916428ddfb5925fe1069341367f9f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/proxy/eval_handlers.go:77-91 | internal/proxy/eval_handlers.go:623-637 \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 \u0060internal/proxy/eval_handlers.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/eval_handlers.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3157754d528d32ca964cae25a39e291e2187662b8b2f0785b5e5ce9b7dee8a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/report/html.go:380-394 | internal/report/html.go:402-416 \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 \u0060internal/report/html.go:380\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":"internal/report/html.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a217f180925cfb72a98be6c294da6eb4606bc64f2f56eedfb4ca72f20b3f735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/rampart/cli/serve_install.go:518-531 | cmd/rampart/cli/serve_install.go:595-608 \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 \u0060cmd/rampart/cli/serve_install.go:518\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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ef34e77e9405bedcc29ae8d87a613c127d2ee1b9b6f9baf18833ca5163b3b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/rampart/cli/setup.go:2242-2255 | cmd/rampart/cli/setup_codex.go:429-442 \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 \u0060cmd/rampart/cli/setup.go:2242\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2242}}}],"partialFingerprints":{"codehealthFindingId/v1":"89eff104457e12a10a98fd3190439ca40497bd40fbf14cbf5bf8a5972b338d82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/proxy/server.go:304-316 | internal/proxy/server.go:329-341 | internal/proxy/server.go:349-361 \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 \u0060internal/proxy/server.go:304\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060internal/proxy/server.go:348\u0060 calls \u0060Serve\u0060 and \u0060internal/proxy/server.go:303\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":"internal/proxy/server.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"636945d2effaa4c1c63e58aeececf331524ef52d27cf93c2d420440aa0433281"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/rampart/cli/audit_helpers.go:397-409 | internal/report/compliance.go:457-469 \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 \u0060cmd/rampart/cli/audit_helpers.go:397\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Check import visibility before settling on that home: \u0060internal/report/compliance.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"758765f2a910c6c8bb166f0768722578ecf3770e970dcd88767766a524bd3889"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/rampart/cli/setup_hermes_remove.go:81-93 | cmd/rampart/cli/setup_hermes_remove.go:105-117 \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 \u0060cmd/rampart/cli/setup_hermes_remove.go:81\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":"cmd/rampart/cli/setup_hermes_remove.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb7b7c45c3db291363bd096024d081d920bb36e3a5d0f65b1bf4eba0d305ca24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201313 lines \u00D7 3): internal/approval/store.go:1193-1205 | internal/approval/store.go:1266-1278 | internal/approval/store.go:2002-2005 \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 \u0060internal/approval/store.go:1193\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":"internal/approval/store.go"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d22a1e1534d5dded74b9e55ad3ae8c042f4ab952784e2db6cf6447544a4af0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/approval/store.go:1608-1620 | internal/session/manager.go:487-499 \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. 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. 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":"internal/approval/store.go"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aea29fd5a6bf9bb15bbab41010d670c885d5aca062ff1fa30b76a85748e070b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/proxy/eval_handlers.go:45-57 | internal/proxy/eval_handlers.go:589-601 \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":"internal/proxy/eval_handlers.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"6023a84e06ef5ec05f453a7780b30cc9744de8541532149e24796ee836b8cd55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): cmd/rampart/cli/setup.go:103-112 | cmd/rampart/cli/setup_codex.go:261-272 | internal/detect/detect.go:157-166 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/setup.go:103\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Check import visibility before settling on that home: \u0060internal/detect/detect.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"81afa0906e5e0bed3ce1f6f41f69795cc2bd520db03dc68922d8650a2a65664b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/rampart/cli/generate.go:254-265 | scripts/generate-registry.go:235-246 \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 \u0060cmd/rampart/cli/generate.go:254\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/generate.go"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b0cfd75d35f1a70d10a34d52b1cb565b0fde68df9c4f7265641cb27622bdb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/rampart/cli/mcp.go:195-206 | cmd/rampart/cli/wrap.go:222-233 \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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"18335349d6cc66713b94b5fd6d7a40aadf142aadaf840a0f6c0af9d3a67538d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/rampart/cli/setup.go:2285-2296 | cmd/rampart/cli/setup_codex.go:228-239 \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 \u0060cmd/rampart/cli/setup.go:2285\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2285}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5bd1bdea91bdaf96415a54ada846e57b234d34b999d77175f33cec97e6e122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/rampart/cli/setup_codex.go:200-211 | cmd/rampart/cli/setup_gemini.go:119-130 \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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4cd43c9f299c83b18e1f96df42d21055d28ba00f80f58ee87e5705567371751"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): internal/engine/shellparse.go:124-133 | internal/engine/shellparse.go:163-174 \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 \u0060internal/engine/shellparse.go:163\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":"internal/engine/shellparse.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c92d36c106371d16c33fb90d6293936474fc62d9afb31f69c86cb4fa739a97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/proxy/eval_handlers.go:194-205 | internal/proxy/eval_handlers.go:362-373 \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 \u0060internal/proxy/eval_handlers.go:194\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c9a34c8d28def82bfa5340294ad6b67e6171647f32e24104eeaed706dee3cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): internal/proxy/eval_handlers.go:197-207 | internal/proxy/eval_handlers.go:333-342 | internal/proxy/eval_handlers.go:365-375 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060internal/proxy/eval_handlers.go:378\u0060 calls \u0060applyMonitorToolDecision\u0060 and \u0060internal/proxy/eval_handlers.go:208\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"765ea785b649e4b0d198f5416047f4169593a596826a2eab8e358b76a8d4b3c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/report/export.go:143-153 | internal/report/export.go:156-166 | internal/report/export.go:169-179 \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":"internal/report/export.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"2779f50d20fa78deb19a266a8ab7ef9aa65a51568f55ed35ff5355b26d1cb89b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/approve.go:120-130 | cmd/rampart/cli/approve.go:170-180 \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":"cmd/rampart/cli/approve.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"0664db60a7a33dc3036d86205a74d96c472be6d758f4d0a0c6f615c21abe049c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/rules.go:421-431 | cmd/rampart/cli/rules.go:551-561 \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 \u0060cmd/rampart/cli/rules.go:421\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":"cmd/rampart/cli/rules.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b135925c1b6f3ed04e28a72a608c980284c206152687e18fd98d11f1fef1d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/setup.go:2291-2301 | cmd/rampart/cli/setup_claude_failure.go:191-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 \u0060cmd/rampart/cli/setup.go:2291\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2291}}}],"partialFingerprints":{"codehealthFindingId/v1":"b771ea7fece0e199b08b21b88bdb9416db8d6ca0e9e9b2dbb00312dc195ef688"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/engine.go:128-138 | internal/engine/engine.go:608-618 \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":"internal/engine/engine.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"b80251f7fad30feb2d6175324253712505ba8679a91184398710879ac27c02cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/watch/format.go:151-168 | internal/watch/format.go:175-192 \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 \u0060internal/watch/format.go:151\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/watch/format.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"543b8cf7231ec5d4dade889a9bfc9e4f75526261035bde1a7db98ca3fa28b8ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): cmd/rampart/cli/hook_antigravity.go:150-159 | cmd/rampart/cli/hook_copilot.go:238-247 | cmd/rampart/cli/hook_gemini.go:135-144 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/hook_antigravity.go:150\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":"cmd/rampart/cli/hook_antigravity.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"0833fc8f616673a8a90fa7da01e8e9c574f90a865b362b40cad6231f316209c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/doctor.go:1520-1529 | cmd/rampart/cli/upgrade.go:760-769 \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 \u0060cmd/rampart/cli/doctor.go:1520\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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fa3f762b733941b083a807b85f105a20dc83fb92b4826da3d8348d5eb98bc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/protect.go:289-298 | cmd/rampart/cli/protect.go:370-379 \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 \u0060cmd/rampart/cli/protect.go:289\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":"cmd/rampart/cli/protect.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d0012b88c86cd5db23db70ae733830bbaed15074a67a238862d528258f006c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/setup.go:1143-1152 | cmd/rampart/cli/uninstall_integrations.go:209-218 \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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f93b9680237c4cbe8534c43abf53f5d28cf9a4bcdbd9510b64a1fca5923710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/setup_gemini.go:164-173 | cmd/rampart/cli/setup_gemini.go:243-252 \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 \u0060cmd/rampart/cli/setup_gemini.go:164\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":"cmd/rampart/cli/setup_gemini.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"975bb91aac9c2f9c544a182d2e5a80b1cffbc05e17b04c605f8cd52fca17402c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/token.go:320-329 | cmd/rampart/cli/token.go:345-354 \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 \u0060cmd/rampart/cli/token.go:320\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":"cmd/rampart/cli/token.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c6259dd99407a985e96f44cb037d9a6d0f4c099630b400a98bd3dd3bff8c2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): internal/engine/dirstore.go:90-99 | internal/engine/dirstore.go:282-290 \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 \u0060internal/engine/dirstore.go:90\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":"internal/engine/dirstore.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"48d18eec1c83c07526989a579d89131a146a9f1007e861c4b8715e6a830d7b7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/mcp/proxy.go:694-703 | internal/mcp/proxy.go:720-729 \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 \u0060internal/mcp/proxy.go:694\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":"internal/mcp/proxy.go"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"885ac1e4e1933deb29f6b804a983bebda0584a98b1a9c2f1bcdbbb02e20d55c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/rampart/cli/setup.go:437-445 | cmd/rampart/cli/setup.go:571-579 \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":"cmd/rampart/cli/setup.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b635701fc0527324febb6a65e3f1c37f3ba0b701ae15b0fa9bf76749910870a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/rampart/cli/setup.go:1928-1936 | cmd/rampart/cli/setup.go:2013-2021 \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 \u0060cmd/rampart/cli/setup.go:1928\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1928}}}],"partialFingerprints":{"codehealthFindingId/v1":"027916b70228dfb3d5248c4a937f877901d7d26737395065123c43b199489122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/rampart/cli/setup_antigravity.go:146-154 | internal/plugin/hermes/embed.go:162-170 \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 \u0060cmd/rampart/cli/setup_antigravity.go:146\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. Check import visibility before settling on that home: \u0060internal/plugin/hermes/embed.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bf3b7a6d172f9c8e9179189989e709a725550aba08bf8c34b5df88489469b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/rampart/cli/upgrade.go:1568-1577 | cmd/rampart/cli/upgrade.go:1611-1619 \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 \u0060cmd/rampart/cli/upgrade.go:1568\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":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"f939c6b7d6ef39270dfbe7aa94de02c74e1f1e1a016d4d948bc71f336aa84372"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/audit/jsonl.go:149-157 | internal/audit/recovery_links.go:110-118 \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":"internal/audit/jsonl.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"aecd9b002e031c1c8ef935b834ce1f3d888a25152381fc569ff6736751c3c92a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/plugin/hermes/embed.go:88-96 | internal/plugin/openclaw/embed.go:80-88 \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":"internal/plugin/hermes/embed.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44bcdb98e0ac2f2facd5d1654ac5c313e8ec413d52692b4e70ab21591ff6abf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/proxy/eval_handlers.go:58-66 | internal/proxy/eval_handlers.go:616-624 \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":"internal/proxy/eval_handlers.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"becced7b54b1a62855c8fb6aa4941299f3cee934093fcccd0fec9a5045ec325e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): cmd/rampart/cli/hook.go:899-906 | cmd/rampart/cli/hook.go:963-970 | cmd/rampart/cli/hook.go:1005-1012 \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":"cmd/rampart/cli/hook.go"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ac2a8b225b89bc43a6ce6642ae671492143df3ca9d5c8e1b17517767a228f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): cmd/rampart/cli/setup.go:2290-2297 | cmd/rampart/cli/setup_claude_failure.go:190-197 | cmd/rampart/cli/setup_codex.go:233-240 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/setup.go:2290\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":2290}}}],"partialFingerprints":{"codehealthFindingId/v1":"25495d62ba07fde43c61653f50cc80400d2a6eb3eec9eac0e3da7c8160878957"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/doctor.go:1835-1842 | cmd/rampart/cli/doctor.go:1990-1997 \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 \u0060cmd/rampart/cli/doctor.go:1835\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060cmd/rampart/cli/doctor.go:1843\u0060 calls \u0060emit\u0060, \u0060Sprintf\u0060 and \u0060cmd/rampart/cli/doctor.go:1998\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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1835}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fd39317dc2f545387704ca5afb58b7e71e0d5a96601e4a26fb9af565f0c6bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/mcp.go:146-153 | cmd/rampart/cli/wrap.go:134-141 \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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6b04a6b84c55021d33a7b6a6a3edf4e99e0d8cfa9dde0ac45fb37bc0153d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/rules.go:71-78 | cmd/rampart/cli/rules.go:98-105 \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 \u0060cmd/rampart/cli/rules.go:71\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":"cmd/rampart/cli/rules.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62e96269e9951311a2418cf70c28652dde3cae8ec695f5ad7c3ffb550dd6fca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/approval/store.go:1208-1215 | internal/approval/store.go:1281-1288 \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":"internal/approval/store.go"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"9357b4156f382b05775b72ac8126c1d0d69e92c5e81044bf63e8938c2a1a64d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/proxy/approval_handlers.go:131-138 | internal/proxy/approval_handlers.go:224-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 \u0060internal/proxy/approval_handlers.go:131\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":"internal/proxy/approval_handlers.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"5298db414edecda0ea9a202490e0fc56eb34765e4706b523b3e5ff152b0c40bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/engine/shellparse.go:657-663 | internal/engine/shellparse.go:666-672 | internal/engine/shellparse.go:675-681 \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. 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":"internal/engine/shellparse.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"990e804d001d5c8b85c70b4eb0d635ae06b8d372efeaefaef6ecb815def73330"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/proxy/approval_handlers.go:260-266 | internal/proxy/approval_handlers.go:291-297 | internal/proxy/server.go:233-239 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/proxy/approval_handlers.go:260\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":"internal/proxy/approval_handlers.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcbd8d7a5608fe17a1c02ec9fcae184164f6c317b11935baa072c188c36636ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/audit.go:515-521 | internal/report/compliance.go:480-486 \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. Check import visibility before settling on that home: \u0060internal/report/compliance.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"962f72ebb6c1b3e554a1f1829da1f7942caad1bdb55b23681c0582b9f93fb964"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/doctor.go:824-830 | cmd/rampart/cli/doctor.go:845-851 \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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc224059d33a22064db3c757c76f55d4fe042ecf2bc489dca439b302a40068f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/rampart/cli/policy_sync.go:89-95 | cmd/rampart/cli/policy_sync.go:113-118 \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":"cmd/rampart/cli/policy_sync.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2ecaa71e0562844f2dc4eaf7baf8211bbeb107935fe9ba607743c3ca590001"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/rampart/cli/setup_copilot.go:164-169 | cmd/rampart/cli/setup_copilot.go:198-203 \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 \u0060cmd/rampart/cli/setup_copilot.go:164\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060cmd/rampart/cli/setup_copilot.go:197\u0060 calls \u0060currentCopilotHookCommands\u0060 and \u0060cmd/rampart/cli/setup_copilot.go:163\u0060 does not \u2014 after which the two agree again for 4 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":"cmd/rampart/cli/setup_copilot.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e799620f9d9b8a74eca4f49a780d426fd84e4c4e60be8d23346bdb12c5df25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/rampart/cli/setup_openclaw_plugin.go:296-301 | internal/plugin/openclaw/embed.go:79-84 \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. Check import visibility before settling on that home: \u0060internal/plugin/openclaw/embed.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c02d715e7c5c7d26d3b1530a4413423d955c9ee50d68066bfb2775d2a67f2aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/proxy/audit_handlers.go:98-103 | internal/proxy/audit_handlers.go:313-318 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/proxy/audit_handlers.go:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060internal/proxy/audit_handlers.go:104\u0060 calls \u0060Error\u0060 and \u0060internal/proxy/audit_handlers.go:319\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":"internal/proxy/audit_handlers.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e42f829d7565ecf5aadda9aeedc814c2bb266b83a5e97a06930cccfee3e6447"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/proxy/eval_handlers.go:389-395 | internal/proxy/eval_handlers.go:689-695 \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 \u0060internal/proxy/eval_handlers.go:389\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"7680fda304f9b1100a0f94208927f6ff1497862bbecca97b1d12c8deedf17595"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/rampart/cli/mcp.go:119-123 | cmd/rampart/cli/wrap.go:111-115 \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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2f8ce720026baa03f3240df11f01ce5ea7a8a85603d3f480cd654f84b66c57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/httpclient.go:26-33 | internal/watch/approval_client.go:63-70 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Check import visibility before settling on that home: \u0060internal/watch/approval_client.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/httpclient.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fdbcb947c787adfaafee7039e7e0db0a1f6ad3de5e1251877d03d7f8954c08b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/report.go:292-305 | internal/report/export.go:269-279 \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. Check import visibility before settling on that home: \u0060internal/report/export.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/report.go"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f7597b5c12c89fa919ed1ba28cb100dd1f15cc293682831af9b36073fd41385"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/token_windows.go:16-22 | internal/securefile/owner_windows.go:19-25 \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. Check import visibility before settling on that home: \u0060internal/securefile/owner_windows.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/token_windows.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f09ff2dc284acb8f920a5e889484ab920b584fac6f6afd70f66fd9962cfed9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/upgrade.go:732-742 | internal/engine/download_exec.go:362-372 \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. Check import visibility before settling on that home: \u0060internal/engine/download_exec.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ea881d9537edf246c95add41d0f6444059dbf1f81414c75804b0559d59b592"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/persist.go:379-389 | internal/engine/shellparse.go:1073-1083 \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":"internal/engine/persist.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"4322ed9314cc560de98d083d691a29204a426aece2c480962392567eeccad8a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): cmd/rampart/cli/verify.go:628-642 | cmd/rampart/cli/verify.go:716-729 | cmd/rampart/cli/verify.go:812-827 | cmd/rampart/cli/verify.go:902-918 | cmd/rampart/cli/verify.go:994-1011 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/verify.go:628\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7389070bde9c0606d04382545185c0bbc21a28a205e2a7adee71aa36910ee37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/rampart/cli/hook.go:1114-1127 | cmd/rampart/cli/hook_copilot.go:84-97 \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 \u0060cmd/rampart/cli/hook.go:1114\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":"cmd/rampart/cli/hook.go"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa2dae35884030b1b6745ee8e1bd19672cd413e01085bc608ab7dbf0ee3e89c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/mcp.go:126-139 | cmd/rampart/cli/wrap.go:118-127 \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 \u0060cmd/rampart/cli/mcp.go:126\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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/mcp.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e7d6ba810cc4d523cea7ddea338192a8e8d59a3550eda2d06bb8a1415518c87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/rampart/cli/rules.go:145-158 | cmd/rampart/cli/rules.go:166-179 \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 \u0060cmd/rampart/cli/rules.go:145\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":"cmd/rampart/cli/rules.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b791a098a6279994d356b77dc64ebcdacacf745d0083a03bb186d4a98d5bdaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/engine/shellparse.go:763-774 | internal/engine/shellparse.go:862-873 | internal/engine/shellparse.go:887-898 \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 \u0060internal/engine/shellparse.go:763\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":"internal/engine/shellparse.go"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a13eababca01ee0afa3015e6950647d343f72734292b3797301d1060427196a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/engine/policy.go:455-463 | internal/engine/policy.go:503-514 \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 \u0060internal/engine/policy.go:455\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/policy.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cec32c2d6138327013cd5f0a2a852d9162e74082e091cf91316747d9ca95c04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/engine/dirstore.go:320-328 | internal/engine/dirstore.go:403-414 \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 \u0060internal/engine/dirstore.go:320\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":"internal/engine/dirstore.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"660f3305fbcce38fd4bf4b46b72bdef7c80e33be5d251d0f76588fc979d9c9d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/rampart/cli/audit_helpers.go:332-342 | internal/report/compliance.go:421-430 \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 \u0060cmd/rampart/cli/audit_helpers.go:332\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. Check import visibility before settling on that home: \u0060internal/report/compliance.go\u0060 sits under a restricted \u0060internal\u0060 directory, which only code inside its own subtree is permitted to import from \u2014 so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e79d27a4c2c299e8426b4fdc45b1b21635927202691039bb56c44eec02be3b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/rampart/cli/mcp.go:241-251 | cmd/rampart/cli/wrap.go:260-270 \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 \u0060cmd/rampart/cli/mcp.go:241\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"87db3628381fd2ab64bfa0ee5527199762cce149c404744d3b1860436ed9a16e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/notify/slack.go:126-136 | internal/notify/teams.go:101-111 \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 \u0060internal/notify/slack.go:126\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":"internal/notify/slack.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"9455f1031bdf9875b4ec3100e40066094a70eaadd29f3b608216689cb045bdfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): cmd/rampart/cli/mcp.go:303-312 | cmd/rampart/cli/test_cmd.go:349-358 | cmd/rampart/cli/wrap.go:288-297 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/mcp.go:303\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060cmd/rampart/cli/wrap.go:299\u0060 calls \u0060embeddedStandardPolicyFile\u0060 and \u0060cmd/rampart/cli/mcp.go:314\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d8085c96cbb6d962a1ae7af9616f7decddf6e55251f395e1b1c8b39c99c9a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/rampart/cli/setup_codex.go:155-163 | cmd/rampart/cli/setup_gemini.go:81-89 \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 \u0060cmd/rampart/cli/setup_codex.go:155\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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3a6187f2fcdbb54482e86cc3df4abf5f2bb4684c281747faba39ace059d653"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/hook_copilot.go:61-69 | cmd/rampart/cli/hook_cursor.go:37-44 \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 \u0060cmd/rampart/cli/hook_copilot.go:61\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":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4d166fca7e108d0b7bfcb0bc7601cba8e15a59a14ff3b9a32e44d705e2b5c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/rampart/cli/setup_codex.go:286-302 | cmd/rampart/cli/setup_gemini.go:199-215 \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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ccb02b15c8c47ddf2a0cba5db6c299d5b27543f48aff250e702a17036c0d6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/setup.go:1815-1823 | cmd/rampart/cli/setup.go:1984-1990 \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":"cmd/rampart/cli/setup.go"},"region":{"startLine":1815}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bd14a8089c45fd12ead398efa8af6f18891bbadab9cb85262b99acb315a545"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/policy/custom.go:139-146 | internal/policy/user_overrides.go:89-95 | internal/session/manager.go:172-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/policy/custom.go:139\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":"internal/policy/custom.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"504c1c800a0c2b7b36f6bdfbde421f4e13c4f47ea6d7f7a88bb25d6ce2de6ac7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/mcp.go:108-115 | cmd/rampart/cli/wrap.go:100-107 \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 \u0060cmd/rampart/cli/mcp.go:108\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"6296f5880bfe17ba85dd6f7101c01ca84621d3e9c608a2d35df36c4176b90f5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/rampart/cli/audit.go:231-238 | cmd/rampart/cli/audit.go:396-403 \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 \u0060cmd/rampart/cli/audit.go:231\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060cmd/rampart/cli/audit.go:240\u0060 calls \u0060Flags\u0060, \u0060StringVar\u0060 and \u0060cmd/rampart/cli/audit.go:405\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":"cmd/rampart/cli/audit.go"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"5349185f3d29525c6cf9022928bf5bc03079b7d4f44aa371dd0c492d755b8e08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/engine/persist.go:530-536 | internal/policy/custom.go:150-156 | internal/policy/user_overrides.go:99-105 | internal/session/manager.go:182-188 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/persist.go:530\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":"internal/engine/persist.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b13b57c8db0d74ca21dbbbb924d17333b07b24b0136a6a48a6212f42062901"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): cmd/rampart/cli/setup.go:310-316 | cmd/rampart/cli/setup_codex.go:149-155 | cmd/rampart/cli/setup_gemini.go:75-81 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/setup.go:310\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0bd57e3a891716c9e2c8a42c0d93b459e75b87420c7a19d4a349cb54b863550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/mcp.go:97-103 | cmd/rampart/cli/preload.go:47-53 \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 \u0060cmd/rampart/cli/mcp.go:97\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/mcp.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"7366948e453e2bff5aa0e6551c7e9fc47dcd3594a64971cfd43123e4dc7585e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): internal/notify/discord.go:105-111 | internal/notify/notifier.go:86-92 | internal/notify/openclaw.go:59-65 | internal/notify/slack.go:135-141 | internal/notify/teams.go:110-116 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/notify/discord.go:105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/notify/discord.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6ab0a7bbea9d1bba46d045037f320cb549208b0834fab8702953cd2a33ae08d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/rampart/cli/serve_background_unix.go:40-46 | cmd/rampart/cli/serve_background_unix.go:48-54 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"cmd/rampart/cli/serve_background_unix.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb3afad254deafd361c0f58fe3b2d1685ebdb388075aaec741ea99177c9f5e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): cmd/rampart/cli/mcp.go:320-325 | cmd/rampart/cli/test_cmd.go:375-380 | cmd/rampart/cli/wrap.go:313-318 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/mcp.go:320\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7c3aa1b7cf4c0d852e3af891172de870ef8c64251c500ce1fa15cf76829be0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/rampart/cli/serve_install.go:556-561 | cmd/rampart/cli/serve_install.go:626-631 \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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"45cb0497b8d5e5b8bdc8e83183c829cbadf5444d480a8901f6045a27e3a068b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/rampart/cli/token.go:113-118 | cmd/rampart/cli/upgrade.go:1715-1720 \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":"cmd/rampart/cli/token.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d567929a03c8757352d84fdddf607dd7b0ebe7dfa6e0458184fe0538ec40903"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): cmd/rampart/cli/mcp.go:329-334 | cmd/rampart/cli/test_cmd.go:384-389 | cmd/rampart/cli/wrap.go:322-327 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/rampart/cli/mcp.go:329\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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd50203efdcb4cf3563a9caea391a9a481649e0198018c226e350b1ea7381a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/plugin/hermes/embed.go:228-233 | internal/plugin/hermes/embed.go:235-240 \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":"internal/plugin/hermes/embed.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74114c3566a75b3512be537763fd9fedfbacdf2c76ee851a803156e2848fdb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/rampart/cli/mcp.go:225-229 | cmd/rampart/cli/wrap.go:251-255 \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":"cmd/rampart/cli/mcp.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c15d1dfb9ba8419bbac13c59acaee555e8cd37043e39508c694169aa56dfe36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/rampart/cli/init.go:283-287 | cmd/rampart/cli/init.go:289-293 \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 \u0060cmd/rampart/cli/init.go:283\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":"cmd/rampart/cli/init.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe2334be5954ebd51433bf9a67d6e556e7e47d7da7d17d89edf6906d1010cdc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/rampart/cli/setup_antigravity.go:226-230 | cmd/rampart/cli/setup_antigravity.go:239-243 \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":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb2ca08c50eaf91f733f0692579581599861204d92845ba7b6735b9c1b5c5bfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/rampart/cli/audit.go:269-273 | cmd/rampart/cli/audit.go:360-364 \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 \u0060cmd/rampart/cli/audit.go:269\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":"cmd/rampart/cli/audit.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"940faa0882232136cb6a2a8b076ae64ab31ec4ca9c7a59928fe4edb85a131348"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/doctor.go: 49.8% line coverage (847/1700)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fec9970f0ccd02a3f2c38bdf68705f8a976709bc2e414d705923293d61524fc"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/policy_generate.go: 45.2% line coverage (56/124)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_generate.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea50b643c421ca602a084d00870f5310051c6ba2f39c354b99bdbb072183cc44"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/preload.go: 42.4% line coverage (56/132)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/preload.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8461e986f1d0cda6d5d14cd9cfccd67e258009b4fb83cb83951d8030067a82e6"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/serve_background_unix.go: 36.4% line coverage (8/22)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_background_unix.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cda2d3a5bf3297545590b5ad7671c6c98a65d734c83794117df0fdbedffb72d"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/serve_uninstall.go: 32.9% line coverage (24/73)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_uninstall.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4e7ba000d7c5feb51dc94ce9728a5295e670e04b3598b8860b8cf77c9e795f"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/setup_interactive.go: 36.0% line coverage (118/328)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_interactive.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2e91e400b4e5ca572a0ff28c3011233ea229c0dc397701b0c1fe1620cd067c"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/cli/token.go: 35.7% line coverage (107/300)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/token.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d35bbeab11bb9500a9f7ff14e83dce5bd7eabe39d5b57418d90dab2a537b4be"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: cmd/rampart/main.go: 0.0% line coverage (0/3)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/main.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"978028a6232245c41900101f3afaf6fac7bb17bce8c5dabdb0200e87bfe747ae"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/audit/record.go: 49.1% line coverage (83/169)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/record.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"652e23ee201ed5101f92f99aaf1756f892b5e9206d877fee51a831d8d7d8d4b9"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/audit/syslog.go: 0.0% line coverage (0/48)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/syslog.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"369cb067233cb1822a8746765eb11b9162d7529c0cbfcb842b0163b9cab87c86"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/notify/approval_format.go: 42.1% line coverage (8/19)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/notify/approval_format.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c4ee2a6d18fc4cc7d50c2d1c56d7b6082e82cf3f2498546d64b4812527c38b"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/proxy/rules_handlers.go: 31.5% line coverage (23/73)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/rules_handlers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e47702562ec15fa2dbbc30bc4343599d5cbf34889867dfcf8c236e97b2a335"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/proxy/webhook.go: 26.6% line coverage (17/64)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/webhook.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3202854fb3aac5a4742907e8b63e920d78afb67506a097e1430943b3f8d0592a"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/watch/format.go: 35.1% line coverage (39/111)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/format.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f03b6823b3bc0146fbb7d9a5d47b6bb8a0796ed2e333518fd2486d801f69037b"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/watch/tailer.go: 5.7% line coverage (5/87)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/tailer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"50cf2e52660d6d5b8b4c4a023ef858891de9bd260443f9fe8cd020700c5a8b28"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: internal/watch/watch.go: 49.5% line coverage (192/388)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/watch.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ac529d6a099e3dd91ba91a6180099377540f914128a647d07d9022c13e4c8b"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: pkg/sdk/errors.go: 0.0% line coverage (0/4)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/sdk/errors.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"603e10be02300f47b8c89c25190b0681ddda8efb5230fdf5e229da57801b65a3"}},{"ruleId":"D8","level":"warning","message":{"text":"Low coverage: scripts/generate-registry.go: 0.0% line coverage (0/142)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/generate-registry.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9b18a3381a3fc6cdd82d6b6d9dfb145de78e9c602ca8197fbda2d6611958d2"}},{"ruleId":"D8","level":"note","message":{"text":"Tests reach code only in some runs: cmd/rampart/cli/upgrade.go: 2 line(s) (1242-1243) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1242}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8af652d19fb6bcb765584cc0abcdf6d3f55b9656bb5d902ae3ae003e226b6b"}},{"ruleId":"D8","level":"note","message":{"text":"Tests reach code only in some runs: internal/engine/engine.go: 3 line(s) (1217-1219) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/engine.go"},"region":{"startLine":1217}}}],"partialFingerprints":{"codehealthFindingId/v1":"586d8446d39c4f20b1f46ac4526dee6e89fd0b099f929e1b1e4a63196c150d69"}},{"ruleId":"D8","level":"note","message":{"text":"Tests reach code only in some runs: internal/filetxn/context.go: 4 line(s) (45-46, 59-60) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/filetxn/context.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb72059be1325ce5dba68228c19217d868c569d5c0889f649268f2ed752ad87"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/hook.go: cmd/rampart/cli/hook.go changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 126 in cli.newHookCmd at line 363. 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/hook.go\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":"cmd/rampart/cli/hook.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb6937e7fa4877cb4f33b04d4ced783ff3eccac2011bf56320e9e14b70c4277"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/matcher.go: internal/engine/matcher.go changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in engine.pathChangeTargets at line 1286. 15 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/engine/matcher.go\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":"internal/engine/matcher.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"5379d6485b71d83dacfce74dd8466ed722c76fadf42ca5f8d653dd7411d30e07"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/serve.go: cmd/rampart/cli/serve.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in cli.newServeCmd at line 95. 5 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/serve.go\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":"cmd/rampart/cli/serve.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b0e2a740a1ab9bee6a9bec1249d2502a231eba931536bb114862ff12fe5de5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/doctor.go: cmd/rampart/cli/doctor.go changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in cli.runDoctor at line 159. 9 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/doctor.go\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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0fcf6ee3b43daed7eb56aa0046c698328c586bd42450679d9e82064e6749d2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/setup.go: cmd/rampart/cli/setup.go changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in cli.newSetupClaudeCodeCmd at line 264. 7 of those changes were fix/bug commits, and the other 9 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/setup.go\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":"cmd/rampart/cli/setup.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b73d02540350bbd79afedd2fd8a6889a9fadd66b57e1e3f90f9072bff5c2fc5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/plugin/openclaw/index.js: internal/plugin/openclaw/index.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in index.register at line 723. 7 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/plugin/openclaw/index.js\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":"internal/plugin/openclaw/index.js"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"470dbc5de06ad224663a2635773e3b836c4c404ba832bef89d69d38524e9090d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/proxy/eval_handlers.go: internal/proxy/eval_handlers.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in Server.handleToolCall at line 44. 4 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/proxy/eval_handlers.go\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":"internal/proxy/eval_handlers.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fa54d4f6eb115e1c7131687d8e15158c363307384ba64a7735efcd9413d34f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/shellparse.go: internal/engine/shellparse.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in engine.stripPOSIXEnvUtilityMode at line 617. 6 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/engine/shellparse.go\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":"internal/engine/shellparse.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"731981a5017d6781d33cdcf4ba69f175e9549bbe97759e7c8f8597ba6fded829"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/plugin/hermes/__init__.py: internal/plugin/hermes/__init__.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in hermes._effective_terminal_cwd at line 1038. 5 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/plugin/hermes/__init__.py\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":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0dc4c3fb1c3d71c7e54fe685b3102dcd5661a56f48bb1066a2f3a705637bf57"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/verify.go: cmd/rampart/cli/verify.go changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in cli.newVerifyCmd at line 119. 6 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/verify.go\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":"cmd/rampart/cli/verify.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"6783a61a88a78f73e413d170540a3c20a2cc2c6d2dda269e4182d84fdc4452a5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/download_exec.go: internal/engine/download_exec.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in engine.visitDownloadExecutionAliases at line 467. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/engine/download_exec.go\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":"internal/engine/download_exec.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"83040d40b1a1157f2d30a916ebb7b3d4d48cdb566a6ef5727e3d298de0daf14a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/pipe_download_exec.go: internal/engine/pipe_download_exec.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in engine.visitPipedDownloadExecutionAliases at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/engine/pipe_download_exec.go\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":"internal/engine/pipe_download_exec.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf5f24312d6679be401853eed3c1093eef20990192a559dddfa2ca2a8568e10"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/approval/store.go: internal/approval/store.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Store.AutoApproveRunBeforePublishForRunScopeSnapshot at line 1133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/approval/store.go\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":"internal/approval/store.go"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea185cc26ad7dfaf669a48d3de87468778d6eab30e9a81e907c884ac735f6cb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/mcp/proxy.go: internal/mcp/proxy.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Proxy.handleToolsCall at line 428. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/mcp/proxy.go\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":"internal/mcp/proxy.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffc38d24a530181ec2207c41b0fe359fbad9065f6dcd6359bf2569406acf7b2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/hook_codex.go: cmd/rampart/cli/hook_codex.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cli.parseCodexInput at line 41. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/hook_codex.go\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":"cmd/rampart/cli/hook_codex.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6719ad5cdf453bbf9ce7d8e1fda5456a1ac43321e2c84b90e703aeb9dc49294"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/engine.go: internal/engine/engine.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in Engine.EvaluateWith at line 127. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/engine/engine.go\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":"internal/engine/engine.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"236353773e5ce86db6c3ab438beb9376180236d7a552ec29a7f64d214bd0b31b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/setup_openclaw_plugin.go: cmd/rampart/cli/setup_openclaw_plugin.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in cli.loadOpenClawToolsConfigDocument at line 1066. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/setup_openclaw_plugin.go\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":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ed3b86cf20cb5432c2015645e071d3f79f2fa0391dca1073f67f049f11c64b5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/init.go: cmd/rampart/cli/init.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in cli.newInitCmd at line 84. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/init.go\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":"cmd/rampart/cli/init.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb900dd06365420ca06416313034f37e2f2f7d88660ca37937b73bb171639630"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/compat-hermes-latest.py: scripts/compat-hermes-latest.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in compat-hermes-latest.main at line 670. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- scripts/compat-hermes-latest.py\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":"scripts/compat-hermes-latest.py"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"73bc03265f2c91f7ef047b666e430f344f42038a84e84289d1ed35ce79ec12d8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/audit/event.go: internal/audit/event.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in audit.eventKeysCanonical at line 148. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/audit/event.go\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":"internal/audit/event.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba43d77ce522996dbf73b946f7ba708bbf4bb2110097fe538ac8fe2e0587fc3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/hook_copilot.go: cmd/rampart/cli/hook_copilot.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in cli.parseCopilotInput at line 52. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/hook_copilot.go\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":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3db4779d0315ff08eafc18391d04e6d685fb4b665ed1b190e7a9baa6a86bc9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/serve_install.go: cmd/rampart/cli/serve_install.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cli.installLinux at line 583. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/serve_install.go\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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"818078085c9b3808a8b247bf250ddae923ce25c8add553d87be768f7fe3424f4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/cline.go: cmd/rampart/cli/cline.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in cli.newSetupClineCmd at line 30. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/cline.go\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":"cmd/rampart/cli/cline.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"66182ee4c105d54f70a4ca1400fad46e4247c1ba2128074910ec954695e8b614"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/dashboard/static/index.html: internal/dashboard/static/index.html changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in index.html.handlePendingClick at line 1101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/dashboard/static/index.html\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":"internal/dashboard/static/index.html"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a393fd1c0c0575ef61225b9ea19993443481be17051b323072599761c6b21f22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/rampart/cli/hook_approval.go: cmd/rampart/cli/hook_approval.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in hookApprovalClient.requestApprovalCtx at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/hook_approval.go\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":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c2fff75b74f27a78687908679d5f7b572cad193c3ea38ac30a97da96914e5fa"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: cmd/rampart/cli/setup_codex.go: cmd/rampart/cli/setup_codex.go changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is cli.newSetupCodexCmd at line 55), 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(doctor): remember setup so removed hooks fail even without verification\u201D; \u201Cfix(codex): report hooks that cannot run as not configured\u201D; \u201Cfix(doctor): fail when a previously protected agent loses its hooks\u201D; \u201Cfix: preserve exact numbers in incoming tool arguments\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/setup_codex.go\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":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb67fa09918ef54d7f922cc92ccafbd891e9bfa54a6200cf683a7f0ec0d5a06a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/plugin/openclaw/provider-surface-replay.mjs: internal/plugin/openclaw/provider-surface-replay.mjs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 3 (its worst body is provider-surface-replay.runPolicyScenario at line 57), 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(openclaw): a reply must also go to the originating provider\u201D; \u201Cfix(openclaw): judge browser navigation by the URL OpenClaw will open\u201D; \u201Cfix(openclaw): avoid misclassifying policy rejections as auth failures\u201D; \u201Cfix(approval): bind redacted review to immutable actions\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/plugin/openclaw/provider-surface-replay.mjs\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":"internal/plugin/openclaw/provider-surface-replay.mjs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f469170a285a2a4d8c602fa19229981a4ba4ec2bab7676c95967411da8a87627"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: cmd/rampart/cli/setup_claude_failure.go: cmd/rampart/cli/setup_claude_failure.go changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is cli.planClaudeHookFailure at line 124), 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(setup): fail closed over a Rampart hook Claude Code never waited for\u201D; \u201Cfix(setup): keep fail-closed when any duplicate Rampart hook blocks\u201D; \u201Cfix(claude-code): plan fail-closed for a new PreToolUse hook even with leftover Post hooks\u201D; \u201Cfix(claude-code): keep Rampart\u0027s hook decisive and doctor visible\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/setup_claude_failure.go\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":"cmd/rampart/cli/setup_claude_failure.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e112c2b6d93cef4d60fcec40f0c0d93c3367a5323418189114cd6b835c061a5"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/audit/reader.go: internal/audit/reader.go 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 14 (its worst body is audit.ReadEventsFromOffset at line 108), 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(audit): report malformed records instead of skipping them silently\u201D; \u201Cfix(audit): classify records by event id in the reader, as the verifier does\u201D; \u201Cfix(audit): skip chain-continuation headers when reading events\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/audit/reader.go\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":"internal/audit/reader.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0ab7c3acc8db8551c47c751996a5f6a210cd869c2a271bb9d9b0e57e011a00"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/notify/sanitize.go: internal/notify/sanitize.go 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 5 (its worst body is notify.SanitizeSuggestions at line 63), 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(notify): keep token redaction unanchored\u201D; \u201Cfix(notify): extend credential redaction patterns\u201D; \u201Cfix: redact output copies and version Python refusal defaults\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/notify/sanitize.go\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":"internal/notify/sanitize.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e89116cf3dbe69252151805002e73f215d09ff91da696863f127472132c1e0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/plugin/openclaw/approval-regression.mjs: internal/plugin/openclaw/approval-regression.mjs 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 6 (its worst body is approval-regression.runScenario at line 28), 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(openclaw): reserve approval review space for execution details\u201D; \u201Cfix(openclaw): preserve derived policy facts with original review input\u201D; \u201Cfix(approval): bind redacted review to immutable actions\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/plugin/openclaw/approval-regression.mjs\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":"internal/plugin/openclaw/approval-regression.mjs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d65b4b50420e3e249d8b19eab3f53356039dfb2f9e42de9f32db81d536edebf"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/approval/review.go: internal/approval/review.go 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 4 (its worst body is approval.cloneReviewValue at line 109), 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 numeric values in dashboard approval review\u201D; \u201Cfix: preserve complete actions through external approvals\u201D; \u201Cfix(approval): capture input once and preserve run scope identity\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/approval/review.go\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":"internal/approval/review.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9125964d1b5685fd8f1a567a9672a60ba49f8d7f77a827d502d09d4e3a3f4b0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: internal/proxy/server.go: internal/proxy/server.go 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 proxy.New at line 190), 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: redact diagnostic output and audit metadata\u201D; \u201Cfix: preserve complete actions through external approvals\u201D; \u201Cfix: make future run approval explicit\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- internal/proxy/server.go\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":"internal/proxy/server.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f0c2a8bf1c2da204cbb0c5d9ee49da91a7e8607de45deb45bed41b4cfb7a3d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: cmd/rampart/cli/serve_log.go: cmd/rampart/cli/serve_log.go 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 11 (its worst body is serveLog.Write at line 139), 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(cli): replace inherited diagnostic backups on Windows\u201D; \u201Cfix(serve): preserve long Windows log paths during rotation\u201D; \u201Cfix(serve): allow Windows background log rotation\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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 21:50:16 -08:00\u0027 --until=\u00272026-11-10 21:50:16 -08:00\u0027 --full-history --no-merges -- cmd/rampart/cli/serve_log.go\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":"cmd/rampart/cli/serve_log.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae58ea8fbf49fde966c49b1aef59a7806fdf5940fd0ca241dc7be740bf21ccfe"}},{"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 \u0060cmd/rampart/main.go\u0060 makes this repository a deployable product (line 14)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/main.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec993c2c8612fc190381713ae76c2de3baad1405560620dadc7df1870db1028"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (66933 LoC, 193 module-visible types across 37 directories) overshoots its size bounds. 1 of 2 build unit(s) (Go, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"go.mod"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d39784e8a78933b908507d20b4610b78a7f819ed418525c8adae26ae57410589"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4d23dfc47c093c15196dccdc36a85a8372e1ab130592be5d1cc18ef0f320334e"},"properties":{"commitSha":"1923ca31e4dd099cdf2efabd1031b7ec797a1834"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cf3577bb12cf85bafc839553b308ea74b05a92796276de84bcd100cacc19f3bd"},"taxa":[{"id":"CWE-415","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e55d79aeba6715a35beb7a1bc3b680a78f4908be90813594bcaa09abcdfd393d"},"taxa":[{"id":"CWE-415","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d54c0c3ce559540173cf4a016d751e03a38cb7dbbec0899e988842d7161ebda5"},"taxa":[{"id":"CWE-415","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3111c10474cc4d8784609683015c508a832d280edbd1c3d4cc1cc46bbecc0a8b"},"taxa":[{"id":"CWE-415","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"13f78094f69f1a372c73045f3f39fd90c5ffc2cd86dec9d0761a2924fe1e9e76"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"ae108bdcc35277e86d1347129c5564d2ccc766737f29541e87aefc72ea90e80f"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"6580975be3254015f735044ec823b951f2a6b21e36703cbdbc3071c20fb2af68"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"fade783b0b7c3c8539a852b4410bc5a081e45908155792737c2333173fbd175c"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"516c63d0c7941bc8ac7d26be3a54992c1279af4dc05a6e14e1407b8e771c2887"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"a7c94f4fbcea038ac6b000738277c4a971ebebfca91ce163c413d8d976dafac9"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"a7989ae023f342866e72d69f60d8c51a442bead616491601f48320d45d2ac74f"},"taxa":[{"id":"CWE-772","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-835","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"48477a1208c9f3569242e4081ddb09f440792e368855cceeb351c8f0605da3e8"},"taxa":[{"id":"CWE-391","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-703","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A10:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"6dd557dfa5f33da2f95062a81b15f3cee3dd7c03b8999feb34abdffe8dc2ed8b"},"taxa":[{"id":"CWE-391","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-703","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A10:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"3d979ddf4a5ba3adb03e0014210d1b35b1524ad88bc4d9662be631f2c524f066"},"taxa":[{"id":"CWE-772","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-835","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","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":"2e6c7432ea45ca7359c34ce22808a8375d07702f734cc912c8a3037910e28bc9"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"9e752039772e845fc8073219267c8eb58a1370092ffaa2ba356f7b3e6887ff82"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"1df3d74303b022930fd3c17ed9b013934bd42921abfbf2876d605f7df07fd1fc"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"01d3b89dc9b20e29f07feb06f84f786408414e3532a480bf63e446dddead94fc"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"188e0fcdbac10ce39c93d6abd3c5f47ca9c5c19c96d2ba844b1c318cba0d9210"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"1f51a163f26d94ce6b6f473117dde579d091c8cbf9e59810475c94d9fc921120"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 2 of 157 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 157 of the 193 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: scripts/generate-registry.go, cmd/rampart/cli/policy_suggest.go. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/generate-registry.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"457f79e304c9e0aecdfc98cdeb4eb61bd2114bcdfb6bdebda1e2b716b3303e5c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_suggest.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"576d0c51c96447b2c0d30cdb69c7dc708f75c500bfabda153f61d62378baa469"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"962c624014f186a63830f1675e081557ebdefffae1a87333e9b418c65865d20b"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc029872ffb77a40bafe6071308e4af9e382dd8a547e4695270e6bfc56df66c"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel for\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55d7672237aa5cf1f9cfc32493999cd6b6b2939e51efc9d4ba9dc590528b641"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"07b78e9f9ae4168496db7f10997f10fcb3d33b294c1f6fc4fd17703d9d9db575"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel for\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda3075d672d992f58dc63e28270133addc16ff7fd235dbc3fb0166c4f397498"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10c528c933d81976b7951711c760fa4f62a0818fb52bcf4fd88395570ba566c"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A script attaches a click listener to this \u003Cdiv\u003E, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca87a6bcc66f23622bfd0172cd6f4ae8b072f366b6bcc8779e4d0c37019cbd7c"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ctbody\u003E: A script attaches a click listener to this \u003Ctbody\u003E, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"4615d7ae9fc298960515c6ce47cd14b099f8e84928559651d2b8747e5d1ac9e2"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A script attaches a click listener to this \u003Cdiv\u003E, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae671ff5c4099436f6586cf68a1169487dae1adbbf4aa075ddc7bf1a712bd4a"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ctbody\u003E: A script attaches a click listener to this \u003Ctbody\u003E, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e9d6449ee86462154691c9c39cc077b9bfcfa76873448eafe357f75dc4990c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.policy-reload-btn.spinning svg\u0060 moves (\u0060animation: spin .6s linear infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a17e6b17c2e5126a41403ed0a77623f02ac485600c91d79140a8b67459d072f"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060#connect-btn\u0060 sets color: #fff on background-color: #FF6392 \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b90f0167626253ae85e9417e3eedae114ab3dca813d985a9d42a748483a759"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.8:1): \u0060#error-banner button\u0060 sets color: #fff on background-color: #ef4444 \u2014 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0b62671ddb946b02ddaa035623af7991ff3dc994f5cda89436abd8c380f45d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.tab-badge\u0060 sets color: #fff on background-color: #FF6392 \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e0bc4b4091e24890d1f59f6043adb874476a3287bdf515f01f5c75589eefe0c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.session-group-count\u0060 sets color: #868e96 on background-color: #e9ecef \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"882f1427a643d22268d229e2f6eab4e2fbc3251deaac5bdde7a4de16438fc419"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.policy-test-btn\u0060 sets color: #fff on background-color: #FF6392 \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"aec2de934dca47ed9ba7132287902edf4c56f2c7e266e0003d33213d72d36f32"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.8:1): \u0060.run-cluster-count\u0060 sets color: #868e96 on background-color: #e9ecef \u2014 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/index.html"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"301bc3b38cc4429588de9977176caa9eccb3720c2ac6f908463fff0780528e55"}},{"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":"P12","level":"warning","message":{"text":"Coverage collected but not gated: CI collects a coverage report but no step enforces a minimum \u2014 coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool\u0027s minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository\u0027s CI files AND its coverage configuration \u2014 the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited \u2014 matched against the threshold settings this check knows by name. A floor set in your coverage service\u0027s web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7f63c06044cf998d9a0698692df30d8873e29bc9b0c98ee829255017c1193d33"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060internal/plugin/openclaw/approval-regression.mjs\u0060 reports through \u0060console.*\u0060 at line 228 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/approval-regression.mjs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"67c9bcab715587feb4faa1104d79b77207c458ee7f21d22229c9ff8cb7520c9a"}},{"ruleId":"P2","level":"note","message":{"text":"Console output used as the logging channel: \u0060internal/plugin/openclaw/provider-surface-replay.mjs\u0060 reports through \u0060console.*\u0060 at line 529 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/provider-surface-replay.mjs"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5881239e3b1914d809228079f76043cb036c2422edc9f8fab03a06b6632462"}},{"ruleId":"P3","level":"note","message":{"text":"Dependabot does not watch npm: \u0060.github/dependabot.yml\u0060 schedules updates, but no \u0060package-ecosystem\u0060 entry covers \u0060npm\u0060, which this tree depends on \u2014 so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the \u0060updates:\u0060 list."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/dependabot.yml"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"da14c5e8fb421b8614b797a2517de829b3c94f3b85263a50e3283dfd26519afe"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/docker.yml"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"P5","level":"warning","message":{"text":"No DR/backup evidence: A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced \u2014 a volume that survives a container recreate is not a tested restore from catastrophic loss."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"5daabb38c90b07af65b8738cf94ce884e90a7d8fef810d341de5c186188c8fe0"}},{"ruleId":"R1","level":"warning","message":{"text":"Type Safety: 0 typed \u00B7 15 plain JS \u2014 the untyped files are docs-site/assets/search-input.js, internal/plugin/openclaw/approval-regression.mjs, internal/plugin/openclaw/degraded-mode-test.mjs, internal/plugin/openclaw/hooks/rampart/index.js, internal/plugin/openclaw/index.js, internal/plugin/openclaw/provider-surface-replay.mjs (\u002B9 more)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d00ee7953f55325a823d27e5db9657c80ca9b9861c0c0abf8fe487cd3fa586d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (61 matched lines \u00D7 2 locations): scripts/compat-copilot-latest.mjs:22 \u00B7 scripts/compat-gemini-latest.mjs:20 \u2014 the two spans are one implementation copied and then locally edited \u2014 514 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/compat-copilot-latest.mjs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b02bf4187ea2d8500079f4fb0477422095c23be836119211a1678f28205ca6f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2 locations): scripts/compat-cline-latest.mjs:26 \u00B7 scripts/compat-gemini-latest.mjs:25 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/compat-cline-latest.mjs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d5f9eed1a191fc523d69cadd6c00643925ad44d3b61cfa40e4132df0dfc324"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2 locations): internal/plugin/openclaw/degraded-mode-test.mjs:3 \u00B7 internal/plugin/openclaw/tool-alias-test.mjs:3 \u2014 the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/degraded-mode-test.mjs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d8e70d2da0fbaed13e92aec839eb21037e2cc006813f137104add1eac18fa4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3 locations): scripts/compat-cline-latest.mjs:147 \u00B7 scripts/compat-copilot-latest.mjs:142 \u00B7 scripts/compat-gemini-latest.mjs:113 \u2014 the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/compat-cline-latest.mjs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f76130ea30fd9f331e351a617dc71e9aee343158d70188310172d7374d2f86d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): internal/plugin/openclaw/approval-regression.mjs:14 \u00B7 internal/plugin/openclaw/degraded-mode-test.mjs:12 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/approval-regression.mjs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1246c75ca93bf5be0e2f28a2d0415a456f9beac4a08853aee0122ea755d4c745"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3 locations): internal/plugin/openclaw/degraded-mode-test.mjs:7 \u00B7 internal/plugin/openclaw/provider-surface-replay.mjs:15 \u00B7 internal/plugin/openclaw/tool-alias-test.mjs:7 \u2014 the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/degraded-mode-test.mjs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ec706f08c319ddd389169553fde85325f334f00bfb43ff52cd853376ddeb1e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): internal/plugin/openclaw/approval-regression.mjs:41 \u00B7 internal/plugin/openclaw/smoke-test.mjs:29 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/approval-regression.mjs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7c9b4c41b12e96c134d96434c28055d357f3bb930c965b03a11510ea1c7f70"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): scripts/compat-gemini-latest.mjs:32 \u00B7 scripts/compat-openclaw-latest.mjs:63 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/compat-gemini-latest.mjs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"365b09198e02bb33b2127e8500d266e264683f37dcd369168ea368b441778b76"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (5 matched lines \u00D7 2 locations): internal/plugin/openclaw/tool-alias-test.mjs:47 \u00B7 internal/plugin/openclaw/tool-alias-test.mjs:74 \u2014 the two spans are one implementation copied and then locally edited \u2014 55 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/tool-alias-test.mjs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c2f3b758ffd86d4b0f14c35222a1901fb60784b5beedbb30e4bd719a25ab39"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function checkWithRampart (cyclomatic 39, cognitive 41): checkWithRampart has cyclomatic complexity 39 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b18a00f7552e4e8a6a2e7611fa92deb57579704a081393d99c60516fb5c969b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateToolCall (cyclomatic 35, cognitive 40): evaluateToolCall has cyclomatic complexity 35 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e313a3ed41bcd1821ff2049e85a7efa3ae22695060c9f8fefd3c661d3a3a83"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function nativeApprovalDescription (cyclomatic 24, cognitive 20): nativeApprovalDescription has cyclomatic complexity 24 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"6163b525545e2a499c3d2e1cffd6bc0551fdd1a4269e1b92824893f8ba8950df"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readControlResponseText (cyclomatic 18, cognitive 29): readControlResponseText has cyclomatic complexity 18 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64de9198a5a7c1245f2d87cbc6a8d94fc33b4c0d459c9b8e654cfa13df6f1ba"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeToolCall (cyclomatic 18, cognitive 17): normalizeToolCall has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"142a6d5fc5e0ce78c94e4b9edc628bb013c44a226ae977e9eadd63914308dc1d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sameConversation (cyclomatic 14, cognitive 12): sameConversation has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"46015bf06a5f006a7bbe9b1d89c94269bd0e1f39f6da7bc23743e72152d2941c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function collectApplyPatchPaths (cyclomatic 12, cognitive 17): collectApplyPatchPaths has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"87455d6991351d3b238b625ac7eb3b5879da2e7648625ba4c1192c7b2a232dff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function classifyControlConsequence (cyclomatic 11, cognitive 10): classifyControlConsequence has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d1499ea3cf7b42eb5f1175b489af5eee59fc020165296c4adda0721cec665e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function fetchImpl (cyclomatic 11, cognitive 10): fetchImpl has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/provider-surface-replay.mjs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae72a407fa17dc23dafe6bdf2596e051f7db24164d10cf2a0e7280da22cefa23"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function policyParamsForTool (cyclomatic 11, cognitive 9): policyParamsForTool has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa67a1ce36a2945fa8680b77990a23a477bd3ae5407d707057a9b96cb673808"}},{"ruleId":"R3","level":"warning","message":{"text":"internal/plugin/openclaw/index.js: 960 lines of code: internal/plugin/openclaw/index.js has 960 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f5ac48f0d01d0779fdd314e6015248caa196ef2252dfff56085d1926b2f5ff"}},{"ruleId":"R3","level":"warning","message":{"text":"internal/plugin/openclaw/provider-surface-replay.mjs: 501 lines of code: internal/plugin/openclaw/provider-surface-replay.mjs has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/provider-surface-replay.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fbd26bd1ba2b8cadf56937c3c7c3b6afc473d4c5ef6fc05ab794660f417dcc2"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/provider-surface-replay.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd770809abd5291bb3062c9065d3f50cb705655367971854292a5b49f1f6ba4"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/approval-regression.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d144abbc91f783b199ad884099f86fe276cf98bec05586c4fd61e6f9e3ae9326"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/degraded-mode-test.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d30c119a0920d10ec10c45d13fafbb0edf8f596574e081d236cb433987829284"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/tool-alias-test.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30d7252a74f39bbdb9b0d0becbf0b8363c9957714b68c9868427c9a6338f82c"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs-site/assets/search-input.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6461874bf78fb0c2bf859692e695ea680bff1c42830ac608574a78d156b90637"}},{"ruleId":"S1","level":"note","message":{"text":"Security headers incomplete: Set: X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options \u2014 the four headers that carry the points of this card\u0027s security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (\u22121.5 on this card.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/_headers"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"906991fef79b762203289a0b35018c482cbb7153d01544db94bc8aa89b90cc82"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!word.operator || !strings.HasPrefix(word.value, \u0022\u003C\u003C\u0022) || word.value == \u0022\u003C\u003C\u003C\u0022\u0060 appears character-identically in 2 files \u2014 internal/engine/download_exec.go, internal/engine/pipe_download_exec.go. 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":"internal/engine/download_exec.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fa752644e3bda360da17a15ebcfa91fe77fdd740e862861f272841ed188b9c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cfg == nil || strings.TrimSpace(cfg.URL) == \u0022\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/serve.go, internal/webhookaction/webhook.go. 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":"cmd/rampart/cli/serve.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7384af8710ba557f3c198aee6fec334ace27d1f1d543914707b40109f66b73c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060decision.Action == engine.ActionAllow || decision.Action == engine.ActionWatch\u0060 appears character-identically in 2 files \u2014 internal/proxy/eval_handlers.go, pkg/sdk/engine.go. 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":"internal/proxy/eval_handlers.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68a06e9f9630c115854d0b8a62b5bc74bbce11dc06cd29d3189df0660c1ca2a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060e.IsDir() || (!strings.HasSuffix(e.Name(), \u0022.yaml\u0022) \u0026\u0026 !strings.HasSuffix(e.Name(), \u0022.yml\u0022))\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/doctor.go, cmd/rampart/cli/status.go. 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd87525a5ca27bee624da1d5a6f31e66d963464c1ef07e7a2ee12484c1011fc6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060entry.IsDir() || !strings.HasSuffix(entry.Name(), \u0022.jsonl\u0022)\u0060 appears character-identically in 4 files \u2014 cmd/rampart/cli/audit.go, cmd/rampart/cli/init_from_audit.go, cmd/rampart/cli/inventory.go, internal/report/compliance.go. 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":"cmd/rampart/cli/audit.go"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"d34743a8120462eed1ff17f45b5da4e7ed02349567858d664e5d1b4ef4c12f95"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060event.Action == \u0022watch\u0022 || event.Action == \u0022log\u0022\u0060 appears character-identically in 3 files \u2014 internal/notify/discord.go, internal/notify/slack.go, internal/notify/teams.go. 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":"internal/notify/discord.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b05e5d11813f737842051156edb079902cb8199e5915b298e6b33af7b6dac96"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060eventCount \u003E 1 \u0026\u0026 event.PrevHash != prevHash\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/audit.go, internal/report/compliance.go. 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":"cmd/rampart/cli/audit.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0613774742300fe38f5ca19409c11f5a17efd4b855d209584cac49fb5384c4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(cond.CommandMatches) \u003E 0 || len(cond.CommandContains) \u003E 0\u0060 appears character-identically in 2 files \u2014 internal/engine/engine.go, internal/engine/matcher.go. 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":"internal/engine/engine.go"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb82b5331e3f686034fca67c6fcb9d1634c77a0fbdd5846abf5d30cd0feba203"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(expanded) \u003E= 2 \u0026\u0026 expanded[0] == \u0027~\u0027 \u0026\u0026 (expanded[1] == \u0027/\u0027 || expanded[1] == \u0027\\\\\u0027)\u0060 appears character-identically in 3 files \u2014 cmd/rampart/cli/setup.go, cmd/rampart/cli/setup_codex.go, internal/detect/detect.go. 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":"cmd/rampart/cli/setup.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1603cfa66005bd623cd9440d2f72067b8d52a94cf32a8946796110cbe7723d2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(line) \u003E= len(\u0022ExecStart=\u0022) \u0026\u0026 strings.EqualFold(line[:len(\u0022ExecStart=\u0022)], \u0022ExecStart=\u0022)\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/uninstall.go, cmd/rampart/cli/upgrade.go. 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":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"396b1508ce29856ace7e8294cd9c84ed0fdecab8a96518e2aea79ea01b30b69d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mode != \u0022enforce\u0022 \u0026\u0026 mode != \u0022monitor\u0022 \u0026\u0026 mode != \u0022disabled\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/preload.go, cmd/rampart/cli/serve.go. 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":"cmd/rampart/cli/preload.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ce4f4a0d9e32dc7355bb5aa0e2aabcc6ec9b9fc609c3c45e452347bf3725d3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060name != \u0022rampart\u0022 \u0026\u0026 name != \u0022rampart.exe\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/serve.go, cmd/rampart/cli/uninstall.go. 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":"cmd/rampart/cli/serve.go"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b16fd01987235ec1b983d08663d66f323122e3ffa21aae3d0c52edd7e7d72a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060name == \u0022audit-anchor.json\u0022 || strings.HasSuffix(name, \u0022.anchor.json\u0022)\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/audit_helpers.go, internal/report/compliance.go. 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":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da2127d7a1b56f73b01a25e12696e3eec98e8889e84bcc71ee97e8dc9c55fe5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060opts.configPath != \u0022\u0022 \u0026\u0026 opts.configPath != \u0022rampart.yaml\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/serve_install.go, cmd/rampart/cli/test_cmd.go. 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":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a289a823ad1b4416982b75f802c504b1715d39e19384857ef2bd8621e41083"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060resp.StatusCode \u003C 200 || resp.StatusCode \u003E= 300\u0060 appears character-identically in 5 files \u2014 internal/notify/discord.go, internal/notify/notifier.go, internal/notify/openclaw.go, internal/notify/slack.go. 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":"internal/notify/discord.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e03f1c822f00c46b789317c6badd720a088bb21cd0bbefe0502827406720d778"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.notifyConfig != nil \u0026\u0026 s.notifyConfig.URL != \u0022\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/wrap.go, internal/proxy/eval_handlers.go. 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":"cmd/rampart/cli/wrap.go"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a45efc5b0747b5b7d6d37b1ee260acde5f432d5ab3e101c2e30f6a1fca9f6c1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060serveURL == \u0022\u0022 || !isServeRunning(serveURL)\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/hook.go, cmd/rampart/cli/hook_codex.go. 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":"cmd/rampart/cli/hook.go"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf8f789f3af9effbfe83438edfce2283578d0424243e5bc0aaecfc0dd26e7f2d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060state.ExecApprovalsPath == \u0022\u0022 || state.BashToolsPath == \u0022\u0022\u0060 appears character-identically in 3 files \u2014 cmd/rampart/cli/doctor.go, cmd/rampart/cli/setup_openclaw_plugin.go, internal/openclaw/hardening/hardening.go. 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":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"594a7290291145ea224e5ce528c4f41dd7766a0ece0175f83786c845bd743885"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed == \u0022\u0022 || strings.HasPrefix(trimmed, \u0022#\u0022)\u0060 appears character-identically in 2 files \u2014 internal/proxy/helpers.go, internal/report/compliance.go. 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":"internal/proxy/helpers.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c2d24bbd5915281e2f550c1846651f3d716acfaf2ad27d011d4bbffb73b85a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060u.Scheme != \u0022http\u0022 \u0026\u0026 u.Scheme != \u0022https\u0022\u0060 appears character-identically in 2 files \u2014 cmd/rampart/cli/httpclient.go, cmd/rampart/cli/upgrade.go. 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":"cmd/rampart/cli/httpclient.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fc34c354af5a165b7a95e1a74fa1d3057882e5b1eff286209805b2fbb39a5d"}},{"ruleId":"X2","level":"note","message":{"text":"Not all functions that make a request accept a context.Context or an AbortSignal: Only 17/21 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up \u2014 a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a \u0060signal\u0060 (Go: \u0060ctx context.Context\u0060) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice \u2014 judge against how the function is used."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"577196fe89725f9b0e6c2faf89eceb8eb245919bd44e4439e0b0d649c1ee1c53"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without context.Context: checkServeReachable: \u0060checkServeReachable\u0060 calls \u0060http.NewRequestWithContext(\u2026)\u0060 but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take \u0060ctx context.Context\u0060 as the first parameter and build the request with it: \u0060http.NewRequestWithContext(ctx, \u2026)\u0060, \u0060(\u0026net.Dialer{}).DialContext(ctx, \u2026)\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/watch.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4618345d98aa7f6498ec4b0292b64021f7ff188a77e05f510c97ac4c01784e8"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without context.Context: doctorTokenAuth: \u0060doctorTokenAuth\u0060 calls \u0060http.NewRequest(\u2026)\u0060 but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take \u0060ctx context.Context\u0060 as the first parameter and build the request with it: \u0060http.NewRequestWithContext(ctx, \u2026)\u0060, \u0060(\u0026net.Dialer{}).DialContext(ctx, \u2026)\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":823}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a880258818ec3689278c15742dcd95fdcb7751489e9f47c7a3ec71d40c7987"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without context.Context: doctorPoliciesAPI: \u0060doctorPoliciesAPI\u0060 calls \u0060http.NewRequest(\u2026)\u0060 but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take \u0060ctx context.Context\u0060 as the first parameter and build the request with it: \u0060http.NewRequestWithContext(ctx, \u2026)\u0060, \u0060(\u0026net.Dialer{}).DialContext(ctx, \u2026)\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0595ee9d808102ca2d100ae72821cdd15caf120578d815be4a606da1b66c673"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without context.Context: doctorPending: \u0060doctorPending\u0060 calls \u0060http.NewRequest(\u2026)\u0060 but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take \u0060ctx context.Context\u0060 as the first parameter and build the request with it: \u0060http.NewRequestWithContext(ctx, \u2026)\u0060, \u0060(\u0026net.Dialer{}).DialContext(ctx, \u2026)\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"7858b61db5fd4af7e98921ee8ad4bd5f05eaa738bb7c58c642b551399408fe45"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060body, _ := io.ReadAll(io.LimitReader(resp.Body, 512))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060body\u0060 as if the call succeeded. When \u0060io.ReadAll\u0060 fails, \u0060body\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060body\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/approval_client.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3045c5fe3a936a67b4b1ad826dd227e1bb712c73994a2044a8b292b6a0dc23f"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060body, _ := json.Marshal(map[string]any{ \u0022approved\u0022: approved, \u0022resolved_by\u0022: \u0022watch-tui\u0022, \u0022persist\u0022: persist, })\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060body\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060body\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060body\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/approval_client.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d8b2e65690ce2e23a9d1d486ea5c56bc313503ea62373ce423f85258daa419"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060respBody, _ := io.ReadAll(io.LimitReader(resp.Body, 512))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060respBody\u0060 as if the call succeeded. When \u0060io.ReadAll\u0060 fails, \u0060respBody\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060respBody\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/approval_client.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5a270b0e0b92bf0ef88b895a4d48403272047052eae46a0f472137a8df2690"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/watch.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2d148d138fab055d7a372e34d4195f8942ddf2168647f1be392b10e38b7e58"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/watch/watch.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58a6ea915603bc3717cd89ccc8e6dcdaf742a8556dcfc54326da0f0dfcf8cfe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/token/store.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae35316cd012e51558a80f48ecaaad6925cecb0112139a5eb056945677a2f0d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tlsutil/tlsutil.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"5029032f78b1cb6271759f8a92d1b652ca84f5adf706767ac23fd98fd6436fde"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := os.Stat(path); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tlsutil/tlsutil.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc96b71303899b6e20911d4acc3e29043b3a97ec3ecf74a2ba6f6fa7e124393"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/report/compliance.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1810416f639f71ce5477f84f5a7e74fefcc37b28cbe26008e489822f330c38"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if readErr != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/report/export.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ae21f04eb4454ba2d30441f74fcea33091e571cfca6afa8d66a1ff1d578558f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := rand.Read(b); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/report/html.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d81b031c6a7fc9eb741d3c781848bd5f34a881f918b8229cc99b66550d1372"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/audit_handlers.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"671652addd346e59a2383408e3d68465c659510c7dbdec352ddf1d8b13596bfa"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/audit_handlers.go"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d3c873e1078c332e45ff3400061216f6935a8d24c9ed2cbd0d0454f7b9c9d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/helpers.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"d448b6d3ba9fb0f1fc294aa7809b5ba3d1faf9c902b54145d1d29a296af35433"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := w.Write([]byte(\u0022 \u0022)); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/sse.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd8016aaadaf5ddb0554f8f9d9b4ea45528a50057496492e13982f0dbf83462"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := w.Write(data); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/proxy/sse.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"743acc16745bfd2681c83d60db7a328a5ae44a28b02f131c3d11563fa353ff60"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/embed.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae5e0abffdd2f91a7d8c3ad47af699f258f3a9ff34cf4ebaa3dca4d09a2fd53"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(data, \u0026pkg); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/embed.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"c17d648badf0f26ee601e06ecb4ecec85e73a1eb4ca76fdc408adb2ac218e20d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/embed.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8909db412ab4f0c7d251ba90c52d437e3bb16497175a44c5af6071d4f9b5be5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ed722ef246f08c0a7a41c9012cf94458bb7c940f5f5e02a26309d6e3cc2ae07"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c35c261f401d0596a73771c0d51dae2a684f8f86aeff6046677a6b492cc803"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ebcabbd150a960bcde23b4e13d959691991e108845c4614a2f76759e11fcb6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d56eafd6fa45c888ce7b877e3482d0c31522d764981e13d5a7e18de2823eaa9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac96dd93b89fc07da361d899f11c275958875728ada4af785c95b8b5b40664b2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d014489d22990821e331759ad6cb358dd6a59804cef4ce0e327841f01acbb9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/index.js"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e61855f06313ca2f8b2eef8cba14a28c25b173191f4fa4c6621af6982ebf70"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"f033b367f361caba3d19bf978492d9ce226eb39f19241fe43e8fc2b77a47728d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0156509105676d44c5271b582e1c59dbd65d56819360ab4f07245bea5702bf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/embed.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"9884c680049f65a05dbb480768434f84bf728f13deca6c4325cc4ecf967ec175"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/embed.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeab1943abfa7a879f54d4783c923c4a0ceb2b001e0874e0b2322afd38168b26"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/embed.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"76291af0827fb60c7d65c615c53bd6594ef15ef4f0f787f8705e3afb6737fcca"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/openclaw/sync.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0add89b488722cd6714564c592c5b08982555dc79fd0f78b2aeea41eddd902e"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.MarshalIndent(approvals, \u0022\u0022, \u0022 \u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.MarshalIndent\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/openclaw/sync.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"79980b88ce78f5a9e897dc0856530a27704547635da71afe61f19fc3a3256690"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matches, _ := filepath.Glob(filepath.Join(dir, pattern))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060matches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/openclaw/hardening/hardening.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c1252ce76a1f0113458952eb12c90a7961008ea7c2e8fb718586c86d86bfce"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matches, _ := filepath.Glob(filepath.Join(dir, pattern))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060matches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/openclaw/hardening/hardening.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb255f9bc9dca81caec7b9d3e466c11c2c115dcc7a6b6a3e26cd3e56e5db95bf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/openclaw/hardening/hardening.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ebc585729a7959befae8f1e95d9d012f9ecb24e203ad6c8e17918cbe5b1bfe4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/notify/approval_format.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"4193c4afce9c6dfeec167a9a52a0f40f93da3449da44bfaf1adc2f83e04d4f3f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/mcp/jsonrpc.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df85a46b1d770b269e02124eab64a0516f6c939ad3cd2dfb1cd78eb015b360a"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060responseFields, _ = decodeCanonicalJSONObject(trimmed, \u0022jsonrpc\u0022, \u0022id\u0022, \u0022method\u0022, \u0022params\u0022, \u0022result\u0022, \u0022error\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060responseFields\u0060 as if the call succeeded. When \u0060decodeCanonicalJSONObject\u0060 fails, \u0060responseFields\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060responseFields\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/mcp/proxy.go"},"region":{"startLine":785}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f1da4776411aa8279068256744f6077db37c87d34f4c723d1c94454436d1ce5"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060absFile, _ := filepath.Abs(s.file)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060absFile\u0060 as if the call succeeded. When \u0060filepath.Abs\u0060 fails, \u0060absFile\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060absFile\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/dirstore.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1aae0f32f27660a1394a8e134a98604622d4b770a59d48b3df3146acc65d4d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060action, _ := rule.ParseAction()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060action\u0060 as if the call succeeded. When \u0060rule.ParseAction\u0060 fails, \u0060action\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060action\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/dirstore.go"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"b69672c10e2d7f992b1bffccc439915e767d20c5c51fac4785b8bb49d8fe2756"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/persist.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"472e1fb1f7caae362a1564a4e0a7542ac6be0805e30ee690cd038477f6d813cf"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060abs, _ := filepath.Abs(policyPath)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060abs\u0060 as if the call succeeded. When \u0060filepath.Abs\u0060 fails, \u0060abs\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060abs\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/testrunner.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2b505ad6eddfe2f22fb6072b8308135b801e42f57c6beb9ec0ace18ae91792"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matched, _ := filepath.Match(tc.ExpectMessage, decision.Message)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matched\u0060 as if the call succeeded. When \u0060filepath.Match\u0060 fails, \u0060matched\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matched\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/testrunner.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e2e25ffd2e65740c92ac27afb32ce105fbd29ca25a9b9f87f9a2adfa7dac84"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/detect/detect.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5012677717d988139ff3c432b0e313fb7b89dfddfe3b79795bcbb42e3619348"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/detect/detect.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"a166069c01894effe9b3a5e4482a63f5f0ca5f39aee6a3a3e9be8953258e5949"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/record.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"726145dc8a4b1f32fbc9c5b7ad865a01dc5a934ab5cfc516ae7f6e2defeb407e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(record, \u0026event); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/state.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebdbfae1a5a77b6b3a0b447fec0ab5c93806767d95046f0834b2a234af0060c"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.Marshal(a)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3722618ec77395df857ef304f85f605b7acc672d77344e76f93fbf18f52e3f"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.Marshal(checkpoint)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness.go"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f83e7664df550d0ccd422efc983fb23163430f78e0ddc3a23feefcf83b2d07"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.Marshal(p)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness_pages.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0d3c22aaca9bcc947db8dc269db606d341dea5fb7944486bd493d80dc541ce7"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.Marshal(checkpoint)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness_transport.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20d7746ab858e873ae5a6625e4a2ba9bbc4d843bf5ff659d01e227d0d49f65a"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060data, _ := json.Marshal(state)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060data\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060data\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060data\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/audit/witness_transport.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"31af3a384abe29cea84fbcb10f69df50d9fad2079876bf1f4fb3555e047f68b0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/assurance/manifest.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc46a2a2dd493690933e0bb00e6b644b28c407cf9e2ecd792aa5447b464bb49"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := hex.DecodeString(digest); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/identity.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d3ca8acb7d06c9ae22b044b05f2634170481b25df90b562b660a393173092b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"89870792a14b55aaf9e4f2ed1a67165461b18649071ea22eeb49209af352dfa8"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060pending, _, installed, _ := s.AutoApproveRunBeforePublishForRequest(call, source, ttl, nil)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060pending\u0060 as if the call succeeded. When \u0060s.AutoApproveRunBeforePublishForRequest\u0060 fails, \u0060pending\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060pending\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e94caaf838dbdd6b60e05a49a9906c54cd636af30cf4ddc30da999f4cbae2a"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060pending, _, installed, _ := s.autoApproveRunBeforePublish(call, ownerScope, ttl, nil)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060pending\u0060 as if the call succeeded. When \u0060s.autoApproveRunBeforePublish\u0060 fails, \u0060pending\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060pending\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"933c87ca264ec84b983f4c0d6d8fbb7321c69e277e46b1d71b6d005f1b65ede6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if readErr != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":1510}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d0cfdfef697e3d7fcc262f000208a1b099cda27e7d937e29c5e3ab4e46da9c"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060dur, _ := time.ParseDuration(opts.forDur)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060dur\u0060 as if the call succeeded. When \u0060time.ParseDuration\u0060 fails, \u0060dur\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060dur\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/allow.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"7359cfadcbe11b51aafa474a80b3f9cb1a8d9110867c6de1bfa15c7fb8e28028"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/allow.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0ce90d525ef0629bfad3f0f641ceef3adaf7e84572621c7caa304ad41d124c"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060body, _ := json.Marshal(map[string]any{ \u0022approved\u0022: approved, \u0022resolved_by\u0022: \u0022cli\u0022, })\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060body\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060body\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060body\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/approve.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"22fa19529d35e5ed926f4a8b2d698e62c5635e6ee6558e8ad12f249390136091"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060respBody, _ := io.ReadAll(resp.Body)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060respBody\u0060 as if the call succeeded. When \u0060io.ReadAll\u0060 fails, \u0060respBody\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060respBody\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/approve.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0e1531763edcb06987d9bba118981237342103581e4c8af76a5bc9ae4d1bf5"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060expires, _ := time.Parse(time.RFC3339, a.ExpiresAt)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060expires\u0060 as if the call succeeded. When \u0060time.Parse\u0060 fails, \u0060expires\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060expires\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/approve.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ed418f67cfb0a78e54eea26bdc12d9af04c657130ecd3c9bf513f6274d469d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06b17a233e6506d521212c3bf898819c66117a1c281fd97d1c44c6c7cad1dfd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e155931b9e2b43a55f5405c9c316faa3f725086b812c534a714a0703beea8f"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060bin, _ := findOpenClawBinary()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060bin\u0060 as if the call succeeded. When \u0060findOpenClawBinary\u0060 fails, \u0060bin\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060bin\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/assurance_status.go"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f3cb2eac7478e84eb0c5c7b42ac8d483ddcbd5eb032360abc2f5b96aa1fbcd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/audit_helpers.go"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0c657504a8a805f46a63523b56d444664e81cbe23914a037fc998c81e1c92c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1e564d25fc4e2d91d277a2405c62fea17eada5b07908754a0249ca8e726072"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"77df9f0a0027170f40c54dbfb31340017c202c1a8a616c15b87757f701256098"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e02aabe15d90323a702e742bc73071791706980962f710d5d14ff55cdee871"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a59c62ee3e2629e59d975e10f229b482a8e5cf7a7f130d82e1482d9435a8d2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b867fc99d8d2112f263b2f5f890d10c34e9e72a2fd3a4596487ceb51e2dbab"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.NewDecoder(resp.Body).Decode(\u0026body); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a1ec860c5cab1384619bf50eccf459112465336a31a41ae9343694b3908f86"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c237b9df65a793afabd86c59c88f7c202e7408601ef2fb5d1b9a41728ee1b95"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.NewDecoder(resp.Body).Decode(\u0026body); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"0add618e2248141000f3d6b5c2653528b29e65faefb7686f2d10b763f15fe65f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"b596a002edda6716b02511d4067f1570a58463372156bb773acc12dc32800317"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060claudeBinary, _ := exec.LookPath(\u0022claude\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060claudeBinary\u0060 as if the call succeeded. When \u0060exec.LookPath\u0060 fails, \u0060claudeBinary\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060claudeBinary\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ffeafda484dee5a098f3596daf1d9f704e84dc0a3d256c90bd20de00561b4d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060clineBinary, _ := exec.LookPath(\u0022cline\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060clineBinary\u0060 as if the call succeeded. When \u0060exec.LookPath\u0060 fails, \u0060clineBinary\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060clineBinary\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d896f44a58a8413ca3794eade33d46380ad7afe3efe1d5c6f3c8b8a1caaef6f"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060codexBinary, _ := exec.LookPath(\u0022codex\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060codexBinary\u0060 as if the call succeeded. When \u0060exec.LookPath\u0060 fails, \u0060codexBinary\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060codexBinary\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"7438d78b9cd9204dd2953e806d9a73daec486eb148e118a58ae73c11546f16d9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dedd82672941fd50ef18c951473e1200726762da1d66fc45f147634641273f7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a8859542ccb51c9818b312c4d70579db99e707599548391b0fbef937be1ec5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"39109158f9d2c33da6247bb67725e57528c7d1b8999fe7da30985d29582b1a71"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a65871e668b8af3103a838d3dfcc917139880142d6b9512409032bcf167ac9"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060authMatches, _ := filepath.Glob(filepath.Join(distDir, \u0022auth-profiles-*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060authMatches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060authMatches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060authMatches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1237}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab11157156d05d36e5447f140876ca0a02e922be6895249ca23db42b629d8b45"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1244}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe48303cd83e05eb8183518478157737d1b63f7e466d565f7c4c0989142c877"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060allJS, _ := filepath.Glob(filepath.Join(d, \u0022*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060allJS\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060allJS\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060allJS\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"617dac88430791749391316e196b4f6afd5359f8198c3ad10826688711b2d44d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"14431de32104a4670b2034c9b4c40edd96f82aba2d94e634576f3223d1950815"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"a905196e0cc92747a867a5941a5f9f2bcc784043704d84afd6cf74dcc964c3cf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1316}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6896e7bf9fce858937ab301e2561fd387643f9149a84cc7b1cdffbd64f019f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9f1a8624751a86e7f009abb1c1b201a38cd6aeb1db488d21633c66c219ff7e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.NewDecoder(resp.Body).Decode(\u0026release); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5732a7770450196208ee19e0061baf56567fc2f1d1285dd3881b0ecf1ef5aba"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c08c9592baab3209b83f790eb778de8913a013413a65ff4141c880031d45adb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1703}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc8267c56cd1c786ddd23b657936125530879a345673dd1d0e6932fa51ea986f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1707}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0a401676c3f05c27726e4ffdf89c1de3dc0b1ab78b105048624720d316107f6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(data, \u0026cfg); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"015f46a9a182620380e71fc52321aaafab4a2b645dba8d7679f4a7ffa31d7a4b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1832}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3e58a25024d7e18c4dcd778822c4847f5f8df65dd1f14666fb6dd14fb3986f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1900}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7fc21af5d7fb634e12bf9cf833a7c9a09faa006525498b5916393e72cebd36"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"c075b80f24d1b160911ff74b087f98b8220c32f007d59062cf03f145aa42aeaf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1908}}}],"partialFingerprints":{"codehealthFindingId/v1":"d817ca761593c871d56c141afba174abf09080a90d554cf88fcddcf9ecfb9edf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(data, \u0026cfg); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1914}}}],"partialFingerprints":{"codehealthFindingId/v1":"82faba63d6110477e53a41adca72669c74b57fc6c94792eaf670027598d1d215"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(raw, \u0026discord); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1927}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb5db8fa3a0a83b66e8ec9fd9a58e3f30a78de1b29685f5bf009d40725fc567"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matches, _ := filepath.Glob(pattern)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060matches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"26356c776ceabbb79a45110e2055f1dc1679997aa271d3cb61210dd0c2603716"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1987}}}],"partialFingerprints":{"codehealthFindingId/v1":"e944fc2ce91f3b7ef34e4bf40dccb92bc124799b3d84c0485b06cd5fb8af599d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1997}}}],"partialFingerprints":{"codehealthFindingId/v1":"560fca5b99b1fc035b4edea1e254dc4fa034922ea8896541d49a406dc460a95c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"c607fc9d8c5c4991a9941673f74389b95b1f91fd827408f6978a0229492eeacd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2014}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebee097b6d33a09a80dd323c88a465a805cf5291c2d111bd764a6dc0460b8f76"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a6c112a3714b7b373723c490cc4abeff236d318d506d56037b9773ab54a74c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := os.Stat(filepath.Join(pluginDir, \u0022 \u0022)); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2244}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc81ee414712758234ca4f9f2a53276d4efdb434f402c0bb15541c05668801d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if _, err := os.Stat(filepath.Join(pluginDir, \u0022 \u0022)); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2247}}}],"partialFingerprints":{"codehealthFindingId/v1":"070a25bfc21d0d2a237495315ce84d6a8cf476630a7389d33c14f8158ddad5b4"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060root, _ := gitRevParseTopLevelAt(workDir)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060root\u0060 as if the call succeeded. When \u0060gitRevParseTopLevelAt\u0060 fails, \u0060root\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060root\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32eef369bf9508f3f00fe8077673193ea90457d7358047106d021d58acd217f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07df833ef1977d4987c8d6a7e90ac838ae44c15ac53498b4feb87fa82a64804"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook_approval.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b76e7c811dfc63009b18fc6d72af7af9be3992e7cd6cc3ed431123458e0fa55"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060encoded, _ := json.Marshal(typed)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060encoded\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060encoded\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060encoded\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ac5dd84bbbc8c235930168e1d8a87428f1b2f742594ae0249cb86b177ea7bdc"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060encoded, _ := json.Marshal(value)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060encoded\u0060 as if the call succeeded. When \u0060json.Marshal\u0060 fails, \u0060encoded\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060encoded\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook_copilot.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf26fca1ca90b7430726bdaaca15a3dbb9c6972c6026423c32fc0467434af51"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060workingDir, _ := os.Getwd()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060workingDir\u0060 as if the call succeeded. When \u0060os.Getwd\u0060 fails, \u0060workingDir\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060workingDir\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/integration_driver.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20f6c28fda2eb4d30c405a3d548eb061a24be82fa8500b9b89aa6185e4a4018"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if infoErr != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/inventory.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ed03592142d18d3f08ba855494649f5f973ebc94787dfc888490832d39f67f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/inventory.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6c345a4bc6046ff5b04fc257bb84092ea8bd51764245e59bc8cd31dff21916"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := decoder.Decode(\u0026raw); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/openclaw_output.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec9532d14e4c9712db9b2c8aa9c00fd0b6e17fdf391aa02a790cb6375a87e19"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b451d2a19cc6492c4627a7dcf8276ff66f904d08a06d626e2b7ff11f905f00"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060req, _ := http.NewRequestWithContext(cmd.Context(), \u0022GET\u0022, serveURL\u002B\u0022/v1/policies\u0022, nil)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060req\u0060 as if the call succeeded. When \u0060http.NewRequestWithContext\u0060 fails, \u0060req\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060req\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50f202613620c4820eb76c8ea7d4445b352c9507163be7b58f512a76bd139f2"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"8268b7af303a8f325bc45c0300c13cb100d01923b9da227aaf3d152688d773d1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/policy_suggest.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a1bef904a3c84ee0aad018886ba1ac65691f11309c1b916288f11c42bd8c03"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/report.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"db664b59ceba2ca38123cad7147ba12eec0ae39e8bb688cce8b7e3b8275ed533"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060absPath, _ := filepath.Abs(outPath)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060absPath\u0060 as if the call succeeded. When \u0060filepath.Abs\u0060 fails, \u0060absPath\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060absPath\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/report.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0edf625ba19c8e131d8238b670d069f64c0bd7f5987ab6d626f9e0608cedd3"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060gPath, _ := custompolicy.GlobalCustomPath()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060gPath\u0060 as if the call succeeded. When \u0060custompolicy.GlobalCustomPath\u0060 fails, \u0060gPath\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060gPath\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"831cea094087699bb11ad12639baf91a3b5852d71b9b6ea43a42e5207dbe1e07"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060reloaded, _ := reloadPolicy(cmd, resolvedAddr, resolvedToken)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060reloaded\u0060 as if the call succeeded. When \u0060reloadPolicy\u0060 fails, \u0060reloaded\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060reloaded\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"a057862b2d1f8a2aab4470fdd704fb25875a4ce7c6641a70b0dbd344ff4a8c25"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060reloaded, _ := reloadPolicy(cmd, resolvedAddr, resolvedToken)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060reloaded\u0060 as if the call succeeded. When \u0060reloadPolicy\u0060 fails, \u0060reloaded\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060reloaded\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6edc4af308436d6237e8a8c6eeb7be0ec2b968dab451878a50491f36bccbe2a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"e87bfb92bf89fce366c22a103132158db64bc17e210b140f279ca292217fd591"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve.go"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"8abb099f62b5858e5cb2952824308e64d9b3cd01930cc53e51322588c96adced"}},{"ruleId":"X3","level":"warning","message":{"text":"Lost error (reports an error that is nil on this path): \u0060if tokenStorePath, tsErr := token.DefaultStorePath(); tsErr == nil\u0060 reports \u0060tsErr\u0060 on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on \u0060tsErr.Error()\u0060) is reported in its place. Test \u0060tsErr != nil\u0060 here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83cdbe1e9a94040b51c9ac5c48f5d11fc571efa72c78ebeac4344d768b1841a"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a03a1762cfa98b3815f1865ddc2d67b58ced5be28ecf59e466dd82f4e182682"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ba85aceb4f3e98596a6f3d0d57aa302476cce17cb4c3a9efbaa16a271da0e1"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060homeDir, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060homeDir\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060homeDir\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060homeDir\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_install.go"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ba09b9dfdb820a43e5b5c005a128d84e18ae01496c80ac1a29d434e22f4baa"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060executable, _ := os.Executable()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060executable\u0060 as if the call succeeded. When \u0060os.Executable\u0060 fails, \u0060executable\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060executable\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce0c7fc829783b314b27b9f3ac7ff637d102f29634456fcc2e77a313fec76fa"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060executable, _ = filepath.Abs(executable)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060executable\u0060 as if the call succeeded. When \u0060filepath.Abs\u0060 fails, \u0060executable\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060executable\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde040205ffb4aeb6e326d0fe283663437d4d112be067f1a1944c924d8a4438c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ee732ebaecf8867ec116e779363f996baee0f37e5f1b4e591759208b0cdd739"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d592e1b4c731270d4779960cabcc9a6df5ee4477eb4b88f4d596a4e8882387"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2fa4239b9bdc3e577a524cb19a81cd6cb0575340ead0869d496662cc3ab1fbb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc4e6b383ffb3896dcf7770baf83b01da7ce903dcc27b2506f8933279a25305f"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1381}}}],"partialFingerprints":{"codehealthFindingId/v1":"2150ad5f44d815af9c909f28bb3ead806ccd7fa08b1d50aac44eccf9c2dbe529"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37b8346ab91277c8aba1627558c180e8728e1eed1bbc376b1dc7550273c6d49"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1508}}}],"partialFingerprints":{"codehealthFindingId/v1":"f299b556a472c340f17678697a46b1911f89105c59cfeee1b821715cd134930c"}},{"ruleId":"X3","level":"warning","message":{"text":"Lost error (reports an error that is nil on this path): \u0060if grepContent, err := os.ReadFile(grepFile); err == nil\u0060 reports \u0060err\u0060 on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on \u0060err.Error()\u0060) is reported in its place. Test \u0060err != nil\u0060 here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4e177b4b720cda8fd2cfd0ad4adae15fe3e46a547390112f0de4f648aead4c"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060home, _ := os.UserHomeDir()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060home\u0060 as if the call succeeded. When \u0060os.UserHomeDir\u0060 fails, \u0060home\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060home\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f55277b84ea3441b1a978e8662b4cb14016783e243598cc2d515068845982ef"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060authMatches, _ := filepath.Glob(filepath.Join(d, \u0022auth-profiles-*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060authMatches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060authMatches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060authMatches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1721}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ddee3de758e5c7ff3216f59abe2460a69154f0f8aa8af6fe5ccbd2a9c2f5de"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matches, _ := filepath.Glob(filepath.Join(distDir, \u0022pi-embedded-*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060matches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1749}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c4d4d3386b4c2d660cdeefdcb43566994e2318acf3bb29d588365d6749e58d"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060allJS, _ := filepath.Glob(filepath.Join(distDir, \u0022*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060allJS\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060allJS\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060allJS\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1854}}}],"partialFingerprints":{"codehealthFindingId/v1":"695be77dd737de353cd16ff617f1eaebe2b9a5bba6e785695844e0df83ca06f8"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060allJS, _ := filepath.Glob(filepath.Join(distDir, \u0022*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060allJS\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060allJS\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060allJS\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":1928}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d2858c6bc896c82e9b76732154e667cd31be3819b94836d1b8d5e878471dcd3"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060allJS, _ := filepath.Glob(filepath.Join(distDir, \u0022*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060allJS\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060allJS\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060allJS\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup.go"},"region":{"startLine":2013}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b640644cc5744e02ce987d474259c934cd15bddb5e89da9822632c80eaa048"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26c611889d6433c817fb151f5594a909d337fa85fe6088a0f8a059021dc1b3b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_antigravity.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"174d8edb9fdea9d4ff9ba295957cea74406ecd4dde69b61d98ea22c43b549802"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_claude_failure.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79fcc7962a3b400e2c97a6169dca4d2fbdffa7e262fb15ebf550e7f41eedf55"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := decodeUserJSON(data, \u0026settings); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_claude_failure.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"036b9e55ffa52461b00b55ed4fe541845246266128dabbb4ca940bef981ea32b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_claude_failure.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1fe902bffe2ab20a4bd3a10fa2b99d28898585a46a996e6cd88023ab79135a3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"e855ae1b25bc2060f2cb96214b77ea8011cb9c6336202d35e38e9632533f975c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_codex.go"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d9a4ab4fccdc9459040f7e5fa189bbe2f7931513f7c503744067c0dfa28278"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_copilot.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"90191a20ebe0f28c297a373186e7f565a3306930535d0192e7e7df3790c891c9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_gemini.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"37b7c35d313544f50cd228e30bfacbb94dce319b2013e91819890dc098a8c8ca"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060matches, _ := filepath.Glob(filepath.Join(cacheDir, pattern))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060matches\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060matches\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060matches\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_hermes_remove.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d1ea376d2ae997d467441f166884f5d05428e996df63676725ab08cf76681ae"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ff3b99db8a06ee7091d1a8adb9423b70579eb88580ab9e41f54ebc4fec17fb4"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060allJS, _ := filepath.Glob(filepath.Join(distDir, \u0022*.js\u0022))\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060allJS\u0060 as if the call succeeded. When \u0060filepath.Glob\u0060 fails, \u0060allJS\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060allJS\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"4116a39f6df2d8b6624c3c8a8751a2ec1c157d34a0fbecfc431464b9df6b678c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1662}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e7304fca9990c7d34e7a26678cfa741f88661e7d1a4772136bd01fca37fce4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1703}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e34d22f0c2c1a1b0112aa1fbed5de927ea37e579ed79e58b44a183a1f4fe16"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1782}}}],"partialFingerprints":{"codehealthFindingId/v1":"b433291cde93eb68ae007210c7f48442ba558e845630bc121fcffb09002b4e55"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1917}}}],"partialFingerprints":{"codehealthFindingId/v1":"158cfa2ff8614555a5531c96a06a228974ff550413a0b66c188ed0e05710f7c2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d01bd7607c510c75b31102f935e4a4e2636e9a42f50f5d7adc2d6a141b8c08"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0ecbbcff00cd672a06b72d949a1ff8945d744f27ddea8e453967e6da9a1a96"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := json.Unmarshal(data, \u0026cfg); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"64732a4d5a16fb0d5f53b64c1e43a47e5b98fdaee0f24f1f146e0c1c9cc00644"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7fe1972f3aa0897a027a6c1662fb2fe09a398ec96e6ba9ab2d2e16f3105ad5f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"85945735bedd8fa55af13e84f83e9a84a8214823b91c2f64b9ce1fe1b7f9f9d0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ea50dd80d19af6bc4b7fc8d6040ac270dc5bc90de97e50208ff44bcdef312c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/terminal.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07a76c135435aff04ef2c8223225a7f51bffa650716caf8999f3664820bcb03"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"11996292745907970950b9dc672abb5041e9f9ea30043ffd0e7d14d396d3a5f9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/uninstall.go"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3b6efe4e91c97075c57e12f60114736114f5dffbf7108168a3b178c78de2f51"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/uninstall_integrations.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeae423cfa1ba3de66b92163d5643aee23d12b68071899dc5fcbc18d002b69b1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/uninstall_integrations.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b78d2db75e76de862dd5a15b0bfc93d8d0870b329466f77d79dc2a96ed22eb47"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11ffc36e780603b8a9d133dc7351f0c5cf37629bd9fde84fa6b0ac3daf052ac"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"555c1e06161d2a78ce0fe4f53ecaba82b999132b4cf9fab9fa8d83805069ee19"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"160ee4c38eeeeb37dcb715f2fd690f3c1521ceafdd1c36b83d70ca9f03641f3f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a65c9968d1cf8ab602812fdd97e1e7c909dfc5455953caf472bf4f5f0844f2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := yaml.Unmarshal(data, \u0026raw); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1808}}}],"partialFingerprints":{"codehealthFindingId/v1":"152ec36566f1aacb0b2535f8caf1772dfe7210916ff367525e51db932ddda279"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060preState, _ := inspectClineDestination(filepath.Join(legacyBase, \u0022PreToolUse\u0022), \u0022PreToolUse\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060preState\u0060 as if the call succeeded. When \u0060inspectClineDestination\u0060 fails, \u0060preState\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060preState\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a7545ddc052cdd30533bd02d6370d2445768c10724fd9109767d665a628bec"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060postState, _ := inspectClineDestination(filepath.Join(legacyBase, \u0022PostToolUse\u0022), \u0022PostToolUse\u0022)\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060postState\u0060 as if the call succeeded. When \u0060inspectClineDestination\u0060 fails, \u0060postState\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060postState\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ca9064f875afc94b53ddf0af3db35495358af810b6ae9915e2bc0c2813a23e"}},{"ruleId":"X3","level":"warning","message":{"text":"Discarded error (assigned to \u0060_\u0060, then its result used): \u0060cwd, _ := os.Getwd()\u0060 writes the call\u0027s error to \u0060_\u0060 and then uses \u0060cwd\u0060 as if the call succeeded. When \u0060os.Getwd\u0060 fails, \u0060cwd\u0060 is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using \u0060cwd\u0060 (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2535c928c94124bf8ccd843abe83abaa6685456f39720725aa86b740194250a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b00bff29a4ba0ca20340da5fc7688e8e69f7c056fb81e4a0205dbf3674d50ff"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err := decodeOpenClawJSON(output, \u0026payload); err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/verify.go"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"6544e9534f5cd7946e05cd8bd256bf235437ae6701fc5a0069a6713ea6af9c3c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if err != nil\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/watch.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1578cc258595731e6e1e008765de6eaf8abf0ac5373b2ab8d8dd70796ee1c09"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_load_hermes_plugin_config\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/__init__.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a084ff2583c2d2c7254b1c193e0f82b69ecd6b3d3c18651a5227c6f678bf1b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorHookBinary\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d61a1cd1e2204fae310374b22d98e03de8cd4d9d0d8920db4b23e0a9f27b1e9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorPolicies\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"77bbac006557563383a6cafdab5f4df372ff2eff7e215cda024a5090f711238e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorHooks\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0, 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"266d41c0863bd1e690eb3d618acf909516b5bf904676761a4c912e86d90ddb86"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorFileToolPatches\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca67c4c1863aa8ccc9f0b65ded3027d9b69e8a5dd6087003f07d9f841e3a80fb"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorOpenClawApprovalHardening\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":1832}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f1be3059b55b793546a947d4aca595cd668cfc90739943211f68ff0be5c552"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060doctorHermesIntegration\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/doctor.go"},"region":{"startLine":2109}}}],"partialFingerprints":{"codehealthFindingId/v1":"8901edc35149e5f80f6a73afe105502961eed27e1c371bf6e06b4897449867dd"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060sessionStateDir\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/hook.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"64085a8b1ef91eb621d5e4aa2bffb44de5075c6c25990e73f05ddf60f5f3ac29"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060collectTodayAuditCounts\u0060 turns a non-nil \u0060err\u0060 into \u0060return inventoryAuditEventCount{}\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/inventory.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"2456a88e755cb0b56a8ec40a45092bed0bd283e85c7da6180ba71af6913185fe"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060countStandardRules\u0060 turns a non-nil \u0060err\u0060 into \u0060return 0\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/rules.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c472a6a7b4a374d907add794dd52893811c1217068e0a830c508b804246704"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060serveExecutableForPID\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/serve_state.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2494ad25f80e488f756b3a4ca7e8c1161b05c82ed4799dccc71f475eeb318d0"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060getOpenClawPluginState\u0060 turns a non-nil \u0060err\u0060 into \u0060return openClawPluginState{}\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/setup_openclaw_plugin.go"},"region":{"startLine":1573}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea82f71f02bd8e685d216208cfec16d44d9adb7fb05611f5c8e7225cca8c65a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060detectHermesPluginState\u0060 turns a non-nil \u0060err\u0060 into \u0060return hermesPluginState{}\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b20051899e317c6ef1abca4a414840e126b9f6709b640c92c4aa9977fe557d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060detectPolicyDefault\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022unknown\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/status.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bee40ae1ce96b14cac54ede8589d243c92be7e54c874f2311e1371d9c7a9eeb"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060detectActiveSystemdService\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rampart/cli/upgrade.go"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1c160ad545841683553abae4267dc7fbe3a6235842ce06a8b3498ec0ca6e0b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060dedupKey\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/approval/store.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e5a55561d2bf9054ca01958aa7836334c879526a3499a46709fef6d6480ae9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060Version\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022unknown\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/hermes/embed.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac60e44f6c04d4fa485e43022c18e7044bd4a14311ff0ea0ccdc4bc3756ed43"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060Version\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022unknown\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugin/openclaw/embed.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7803e0dca228a635b7b0962b3ee9e1a00623be378c4f16998bec0532f28c285"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on error: \u0060generateReportNonce\u0060 turns a non-nil \u0060err\u0060 into \u0060return \u0022report-fallback-nonce\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 \u0060if\u0060 or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/report/html.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"e976a59f83e667f0ddf419780c79becec7767e5161abbb8e9ce0102383f8de8d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060credentialFreeURLSetting\u0060 swallows every exception into \u0060return \u0027\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/compat-process-env.mjs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5919af04034b30fde778d7cdafb818d6dc990240fabac1cee4b61f313404673d"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060strings.Contains(f.Message, \u0022command_match\u0022)\u0060 can never decide this \u0060\u0026\u0026\u0060 \u2014 every value satisfying \u0060strings.Contains(f.Message, \u0022command_matches\u0022)\u0060 also satisfies \u0060strings.Contains(f.Message, \u0022command_match\u0022)\u0060, so the \u0060\u0026\u0026\u0060 chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/lint_test.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"74907873d3a08b344d092d94dd717a73a6bb646212b7c66ce8422be8e5702e10"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060strings.HasPrefix(tok, \u0022--unset=\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060strings.HasPrefix(tok, \u0022--unset=\u0022)\u0060 also satisfies \u0060strings.HasPrefix(tok, \u0022-\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":"internal/engine/matcher.go"},"region":{"startLine":2513}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e4c3d9dc9e5078893a67c794b78c293d368d36e59a4832784fb80b3d50f8289"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"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-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-242","guid":"5c147e5c-be37-b051-9928-764ef5a8f3d3","name":"CWE-242","shortDescription":{"text":"CWE-242"},"helpUri":"https://cwe.mitre.org/data/definitions/242.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-330","guid":"f811ddf9-2e54-865b-9c76-f97905849790","name":"Use of Insufficiently Random Values","shortDescription":{"text":"Use of Insufficiently Random Values"},"helpUri":"https://cwe.mitre.org/data/definitions/330.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-391","guid":"d9ef5687-8d79-9b51-b509-b83411fbcdc3","name":"Unchecked Error Condition","shortDescription":{"text":"Unchecked Error Condition"},"helpUri":"https://cwe.mitre.org/data/definitions/391.html"},{"id":"CWE-415","guid":"5d94f4b3-d3aa-0c5c-a4f9-897bc66edcd7","name":"CWE-415","shortDescription":{"text":"CWE-415"},"helpUri":"https://cwe.mitre.org/data/definitions/415.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-703","guid":"fa730aa9-95e4-845e-83fa-8169f2cf339e","name":"Improper Check or Handling of Exceptional Conditions","shortDescription":{"text":"Improper Check or Handling of Exceptional Conditions"},"helpUri":"https://cwe.mitre.org/data/definitions/703.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-772","guid":"821a8ddc-8663-7d5c-a3da-6863c4ebe4ba","name":"CWE-772","shortDescription":{"text":"CWE-772"},"helpUri":"https://cwe.mitre.org/data/definitions/772.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-835","guid":"4d510828-22d0-5353-ad86-51ed0cae0b37","name":"CWE-835","shortDescription":{"text":"CWE-835"},"helpUri":"https://cwe.mitre.org/data/definitions/835.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_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/"},{"id":"A10:2025","guid":"9ca3ab55-ca61-fd5e-b9ab-3dad2efa59d0","name":"Mishandling of Exceptional Conditions","shortDescription":{"text":"Mishandling of Exceptional Conditions"},"helpUri":"https://top10.owasp.org/2025/A10_2025-Mishandling_of_Exceptional_Conditions/"}]},{"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-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":26,"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."]}]}