{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"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":"D23","name":"Boundary Type-Coupling","shortDescription":{"text":"Boundary Type-Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D23"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"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":"AC5","name":"ARIA correctness","shortDescription":{"text":"ARIA correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/AC5"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"id":"AC7","name":"A11y enforcement","shortDescription":{"text":"A11y enforcement"},"helpUri":"https://codehealth.canine.dev/dimensions/AC7"},{"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":"ED1","name":"Handler temporal coupling","shortDescription":{"text":"Handler temporal coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/ED1"},{"id":"ED2","name":"Event/command shape","shortDescription":{"text":"Event/command shape"},"helpUri":"https://codehealth.canine.dev/dimensions/ED2"},{"id":"ED3","name":"Event naming","shortDescription":{"text":"Event naming"},"helpUri":"https://codehealth.canine.dev/dimensions/ED3"},{"id":"ED4","name":"Outbox / dual-write","shortDescription":{"text":"Outbox / dual-write"},"helpUri":"https://codehealth.canine.dev/dimensions/ED4"},{"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":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P8","name":"Schema migrations","shortDescription":{"text":"Schema migrations"},"helpUri":"https://codehealth.canine.dev/dimensions/P8"},{"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":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"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":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"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":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"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":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"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":"Workflow.Run (cyclomatic 30): Workflow.Run 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":"workflow/workflow.go"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"b597233e75611ff6c99d824d4bf2d1a7917154ea013f5ad4fb298fb47885528d"}},{"ruleId":"D1","level":"warning","message":{"text":"app.drainRequests (cyclomatic 30): app.drainRequests 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":"workflow/monitor/assets/app.js"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"013c0c070b8a0e5fcfa01867757e6fa7ee6914bbb8072b39f0b1549279d9e66c"}},{"ruleId":"D1","level":"warning","message":{"text":"AsyncQueue.Handle (cyclomatic 29): AsyncQueue.Handle 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":"workflow/queue_async.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"6660d263fe847cb9100acbec5162fe1c719e05daa6b70fda5a0f3580a469e9ff"}},{"ruleId":"D1","level":"warning","message":{"text":"Memory.subscribeToAllEvents (cyclomatic 28): Memory.subscribeToAllEvents has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement 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":"eventlog/memory.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"e936c35580115f8bf23e0609e4ca29cacce984339ef52ab185b5cc48e14b33fd"}},{"ruleId":"D1","level":"warning","message":{"text":"Inspector.List (cyclomatic 27): Inspector.List has cyclomatic complexity 27 (threshold 15). Of this number, 26 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":"workflow/inspection.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc240a1185427869141b57889175ee2ffdcc00c349dd3f5063b537df4019cbc"}},{"ruleId":"D1","level":"warning","message":{"text":"renderPage (cyclomatic 26): renderPage 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":"workflow/monitor/assets/app.js"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c7718af27c408fe492176e2f294580113bd21d4036c5dae063510b2792e212"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkflowInstance.Apply (cyclomatic 25): WorkflowInstance.Apply 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":"workflow/workflow.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"8239ad4939c0f7ab879e8274e6607a849576044b711d3fa9b3d8483f86975115"}},{"ruleId":"D1","level":"warning","message":{"text":"workflow.WaitForEvent (cyclomatic 19): workflow.WaitForEvent 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":"workflow/workflow_events.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"380b0a75fc2d824794f33b756042033e648f756c486a220e45b387d25b5edf4f"}},{"ruleId":"D1","level":"warning","message":{"text":"SyncQueue.processEvent (cyclomatic 19): SyncQueue.processEvent 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":"workflow/queue_sync.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"2464848ffde3597f70b1efbf50f7d6e3a83a5b7042f5e8d54d774ef71b24ca49"}},{"ruleId":"D1","level":"warning","message":{"text":"Workflow.Start (cyclomatic 19): Workflow.Start 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":"workflow/workflow.go"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc873f33a905b30b04836a5528dfbb84b80e25d5b5e7981d83e2b32981b3338"}},{"ruleId":"D1","level":"warning","message":{"text":"NATS.AppendInTx (cyclomatic 18): NATS.AppendInTx 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":"eventlog/nats.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9ef06f2daf09121acf87236c929ed9a4fad3e8e4e1b6fbdfc7cf0060e90d05"}},{"ruleId":"D1","level":"warning","message":{"text":"migrations.RunMigrationsContext (cyclomatic 18): migrations.RunMigrationsContext 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":"pkg/migrations/migrations.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"98cf2c57f2eca1d762cb0e975839c9c91be0ff457ce8e4163c42f53d212e56b1"}},{"ruleId":"D1","level":"warning","message":{"text":"instanceView.applyMetadata (cyclomatic 18): instanceView.applyMetadata has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case\u0027s concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases \u2014 they stay explicit and reviewable."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/inspection_view.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca85402f62b62a583109affeb7e57f377f47f71a032987f724d6620154049743"}},{"ruleId":"D1","level":"warning","message":{"text":"app.renderSteps (cyclomatic 18): app.renderSteps 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":"workflow/monitor/assets/app.js"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc6a7f1282f246adc316503c1ed0476ebd7645eee1b0884d61cfb9a22ba5f44"}},{"ruleId":"D1","level":"warning","message":{"text":"workflow.Step (cyclomatic 16): workflow.Step 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":"workflow/workflow.go"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc43b6ec758c33ead688403891537a9e775a4a738e95b545a2d4ecc53cb16cc1"}},{"ruleId":"D1","level":"warning","message":{"text":"workflow.resumeEventWait (cyclomatic 16): workflow.resumeEventWait 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":"workflow/workflow_events.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ba275ea9652c4d41cadfacf8e773e48befc30d138cd4f421e0a927921172e9"}},{"ruleId":"D2","level":"warning","message":{"text":"app.drainRequests (cognitive 56): app.drainRequests has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 4 (11 pts), boolean chains 9, loops 2 (4 pts), error handling 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":"workflow/monitor/assets/app.js"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ef5c9c578b480289a16f2a23cda6bf9ae2396765f18dae4745b9b7fa48d09f"}},{"ruleId":"D2","level":"warning","message":{"text":"Memory.subscribeToAllEvents (cognitive 54): Memory.subscribeToAllEvents has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 9 (19 pts), boolean chains 5 (nesting depth added 27). None of this is in the body itself: all 54 points belong 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":"eventlog/memory.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e66dcf70c34341c84073d97ff3188f174ecc120cf05d95996d05e4ab537685e"}},{"ruleId":"D2","level":"warning","message":{"text":"Workflow.Run (cognitive 45): Workflow.Run has cognitive complexity 45 (threshold 15). Drivers by points: if/else 29 (45 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":"workflow/workflow.go"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b7c001123f14de0e955d932dc11c51a6f5b98eb6f4e6f01f6542a9290407eaf"}},{"ruleId":"D2","level":"warning","message":{"text":"AsyncQueue.Handle (cognitive 43): AsyncQueue.Handle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 2, match/switch 1 (nesting depth added 21). 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":"workflow/queue_async.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b12c7a144afb0af1afcb9659c1775928d8890a9b5331e877dfaf679ff549acd"}},{"ruleId":"D2","level":"warning","message":{"text":"app.renderSteps (cognitive 37): app.renderSteps has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 4 (10 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/monitor/assets/app.js"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5657c818adc5bde5cd726c6066f9b8aaa17ff7bc5c9770274e1a81bb082a59b"}},{"ruleId":"D2","level":"warning","message":{"text":"app.renderPage (cognitive 34): app.renderPage has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 6 (9 pts), boolean chains 5, loops 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":"workflow/monitor/assets/app.js"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc461bcae856ac213019bb488e87981e61e126cda1b95b83544730ffbd44bf3"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkflowInstance.Apply (cognitive 32): WorkflowInstance.Apply has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 1 (nesting depth added 17). 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":"workflow/workflow.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cded61254c0601b3b83196de32da7c46ec4d6a6145e9f92283f9a7387022336"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.WaitForEvent (cognitive 27): workflow.WaitForEvent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (26 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":"workflow/workflow_events.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"aec1f5812d22ef086d5d8ee234df9376ee69915d0564b7f264f52840e8b9a6a8"}},{"ruleId":"D2","level":"warning","message":{"text":"Inspector.List (cognitive 27): Inspector.List has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, loops 2 (nesting depth added 8). Of this number, 26 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":"workflow/inspection.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"20acf7182128182e911e771d3b60bedfdb5f1b94baf7feb4c92bec2bc6f0bb15"}},{"ruleId":"D2","level":"warning","message":{"text":"Runner.runWorker (cognitive 25): Runner.runWorker has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (24 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":"workflow/worker.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c69f6bfb5c6d509a32ee924ec29103bc2d023bacbc37e934106cf653f0b9f03"}},{"ruleId":"D2","level":"warning","message":{"text":"NATS.ReadEvents (cognitive 24): NATS.ReadEvents has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1, loops 1 (nesting depth added 10). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 195). 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":"eventlog/nats.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce3d17a20a33d71cbd3f7db67e26ae6e5fc2ae123a423e3bc94bb81699a4beb4"}},{"ruleId":"D2","level":"warning","message":{"text":"NATS.AppendInTx (cognitive 24): NATS.AppendInTx has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 2 (nesting depth added 7). 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":"eventlog/nats.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e2cc0004b1a69e14a64bf53fdff77264755d1678d3b524f6ed425d344882ba"}},{"ruleId":"D2","level":"warning","message":{"text":"Workflow.Start (cognitive 22): Workflow.Start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/workflow.go"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca4d4beeb16c03321313d8803ae555ec549ba64a0ac3f6f42f05cc8a80219f68"}},{"ruleId":"D2","level":"warning","message":{"text":"migrations.RunMigrationsContext (cognitive 21): migrations.RunMigrationsContext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/migrations/migrations.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"b12adf7f7cfafa7930181b57b42895a96eba7218c5b24f8c531d5bef825781a0"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.resumeEventWait (cognitive 20): workflow.resumeEventWait has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (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":"workflow/workflow_events.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"91df33baf1b4f795309f25ba4537d24486138385428b6b66a7d37e3b4d0ac479"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.Step (cognitive 18): workflow.Step has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 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":"workflow/workflow.go"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc50452981c48a9b581332e967c1ce5df658cbad65e8f8145c2f0f3980f7f7c"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.Sleep (cognitive 17): workflow.Sleep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 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":"workflow/workflow_sleep.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d0c7c9697026870efdaf6a19d71641f762cec40fdd8ca1104bb798667feb12c"}},{"ruleId":"D2","level":"warning","message":{"text":"instanceView.completeStep (cognitive 17): instanceView.completeStep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (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":"workflow/inspection_view.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c204f15a254c5711aa06af71d9be7ef7d7f7495319d7c2dc0b73d8e806876b0"}},{"ruleId":"D2","level":"warning","message":{"text":"monitor.parseListOptions (cognitive 17): monitor.parseListOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 1 (2 pts), 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":"workflow/monitor/handler.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"5753e960b1341c7cd1aa6dc9955ab3d27169248c4d56804a0af7e518c0bb7e36"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncQueue.processEvent (cognitive 17): SyncQueue.processEvent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/queue_sync.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"068f3c345b838f37677d63edd1608d2d90609df3fb73c9311e72f185174dc544"}},{"ruleId":"D2","level":"warning","message":{"text":"AsyncProjectionRunner.readAndProcess (cognitive 16): AsyncProjectionRunner.readAndProcess 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":"event/projection.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab52245b683c2c216dce54596c1de7b6816a298182997ee84350009caf2002d0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: workflow/workflow.go: FileTooLong \u2014 670 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"workflow/workflow.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6d169fe945c8ca7a69541a7c0e4c563abcc27368092efec533039fa1fafd00"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Workflow.Run: MethodTooLong \u2014 Run runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\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":"workflow/workflow.go"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1f53108c250c9823724ee89b6ebb03fd4404a5aea3d540dbe484458348ae34b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): eventlog/postgres.go:336-377 | eventlog/sqlite.go:314-355 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/postgres.go:336\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 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":"eventlog/postgres.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"beddc2bcfa3a14f38f79416461617cf4485fc0de9cedde2ad2136e357ee6b2f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): eventlog/postgres.go:278-314 | eventlog/sqlite.go:256-292 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/postgres.go:278\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 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":"eventlog/postgres.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e56313b47f46f9e0b18871f023646749766e1a64e0f5118aaddf718c60c623"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): eventlog/postgres.go:189-220 | eventlog/sqlite.go:168-198 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/postgres.go:189\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. 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":"eventlog/postgres.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bf6e4b5d352ffc13200b0ba047af7e22f650a646675dfdfde25a3e1dc6412a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): workflow/queue_async.go:87-112 | workflow/queue_sync.go:87-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 \u0060workflow/queue_async.go:87\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060workflow/queue_async.go:86\u0060 calls \u0060ensureWorkflowNames\u0060 and \u0060workflow/queue_sync.go:86\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":"workflow/queue_async.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a331dcf53f4d0f515305067f554ae4ace33efe98eab1c020231f796c3ba7ba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): aggregate/repository_transactional.go:64-83 | aggregate/repository_transactional.go:114-132 \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 \u0060aggregate/repository_transactional.go:64\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":"aggregate/repository_transactional.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"886c71a29aaa317df42cd1f42246e31ec16fe86573068579e28073ed1ae4a896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): eventlog/postgres.go:68-87 | snapshotstore/postgres.go:65-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/postgres.go:68\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":"eventlog/postgres.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"247d09fdf05266849c996d0bb0c2a6250ea6e20700ae697f7db7a31435db96d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): eventlog/memory.go:285-303 | eventlog/memory.go:334-352 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/memory.go:285\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"eventlog/memory.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"6443e8664fe3c4be1c199746801751e43fadb7d8af0ce714275576f9636f9946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): eventlog/memory.go:341-358 | eventlog/memory.go:416-433 \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 \u0060eventlog/memory.go:341\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":"eventlog/memory.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc3dac663efbe0252e947ee876694c2f77f7330bfad8fd2cecb5cf3a8a7f7d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): eventlog/postgres.go:239-256 | eventlog/sqlite.go:217-234 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"eventlog/postgres.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b390f3deb73a00e6ff08777d892e4e7243742277b5dbc832f2b2992ccac359b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): workflow/queue_async.go:62-79 | workflow/queue_sync.go:65-82 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060workflow/queue_async.go:62\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":"workflow/queue_async.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fcee631da2263278e6a63394cb3e33b63c05e334db32ff93dbf8d3e21a18647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): eventlog/postgres.go:67-82 | eventlog/sqlite.go:73-88 | snapshotstore/postgres.go:64-79 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/postgres.go:67\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":"eventlog/postgres.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89412e47bea0d03dfa51ff7b5493c774f76dc1ad07b5baedef2d05ae10555ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/testutils/eventlogs.go:61-74 | internal/testutils/eventlogs.go:116-129 | internal/testutils/eventlogs.go:150-163 \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/testutils/eventlogs.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc93c17debc5d878b0bcbe39c5db79696c0178964e431cc3a2c60eb6f717d0b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): eventlog/postgres.go:115-127 | eventlog/sqlite.go:121-133 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"eventlog/postgres.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc9487c915cfe87b87e86ba307327833124eb6ff25193dbde00c17b7b892ad6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): eventlog/memory.go:86-98 | eventlog/postgres.go:118-129 | eventlog/sqlite.go:124-135 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060eventlog/memory.go:86\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":"eventlog/memory.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb20f1f184e026c80f4cd63b4d3ca5458c975d7125bb624f6bd11fc7e5ec24f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): eventlog/memory.go:272-283 | eventlog/memory.go:321-332 \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 \u0060eventlog/memory.go:272\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":"eventlog/memory.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8c04f5ca5142977d9052e1217ece9198416ffb49205ec5c9e7cbfffb5dc113"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): eventlog/postgres.go:147-157 | eventlog/sqlite.go:152-163 \u2014 before extracting anything, compare \u0060eventlog/postgres.go\u0060 and \u0060eventlog/sqlite.go\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"eventlog/postgres.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a53f77e57ab6887d39a17f4d5f92f9e914e3af0bb989a1ac7aed440ecdb34d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): workflow/queue_memory.go:142-153 | workflow/queue_memory.go:189-199 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060workflow/queue_memory.go:189\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. 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":"workflow/queue_memory.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"09047bf5729aa9585602a268a76ef37ae66b894c117e401c1ea1f62b105d7c7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): workflow/wait_store_persistent.go:88-96 | workflow/wait_store_postgres.go:117-124 \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 \u0060workflow/wait_store_persistent.go:88\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":"workflow/wait_store_persistent.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e04935a419170081a3bd3488be61574758926550e3a16fbfc5b7ce2a6a1d352"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): aggregate/aggregate.go:394-402 | aggregate/aggregate.go:444-451 \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 \u0060aggregate/aggregate.go:394\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":"aggregate/aggregate.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0652662de9abe95d639c1f915ad737ce1ea0d455c343f8a38d077c2c54b588"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): workflow/workflow.go:360-367 | workflow/workflow.go:473-478 \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":"workflow/workflow.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"4697ea8e30c98efec97331ce23f2b17214a7d948185d969a9fd25a255cd3d5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): aggregate/repository.go:175-186 | aggregate/repository_transactional.go:174-185 \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 \u0060aggregate/repository.go:175\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":"aggregate/repository.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a7dc6e9566d1ccfd62a895e6f2a5fc5e960bea77ab2378ac40a2376b404981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): aggregate/repository.go:199-208 | aggregate/repository_transactional.go:195-204 \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 \u0060aggregate/repository.go:199\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":"aggregate/repository.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59a965b1251fe82269d4ca0bfa91c846e8eb6d73b236e89aabd32abc313b850"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): workflow/queue_async.go:250-257 | workflow/queue_postgres.go:98-105 | workflow/queue_sync.go:138-145 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/queue_async.go"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d227fa3bf34e01fa91685bd47790455e6b97c9daac6580c4e4084f5a3a06a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): workflow/queue_async.go:265-273 | workflow/queue_postgres.go:150-158 | workflow/queue_sync.go:153-161 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/queue_async.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2492083b4ae2e1d1256cb667c36430691b3159b0a5d65731213e9d75cc01dae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): workflow/queue_async.go:283-289 | workflow/queue_sync.go:171-177 \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 \u0060workflow/queue_async.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":"workflow/queue_async.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be9bb46a871c5fcf1532d74a40459949f53fdd11d5e9979fea64bc9fd3d25de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): aggregate/aggregate.go:360-368 | event/event_records.go:30-38 \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":"aggregate/aggregate.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9e4a97f55420b30bb1f1cf4746a917b052dd0e8611f3062ff1666fb5705fb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): event/projection.go:198-203 | event/projection.go:311-316 \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 \u0060event/projection.go:198\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, \u0060event/projection.go:206\u0060 calls \u0060Err\u0060 and \u0060event/projection.go:317\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":"event/projection.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7fba4f5d32da3719906be4f30fc41d8102b7ec43c2ce9163aa42a08b9af0702"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201322 lines \u00D7 2): examples/3_snapshots/main.go:43-64 | examples/5_event_metadata/main.go:58-72 \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":"examples/3_snapshots/main.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d28de169357677db17a465997ae9e764b0d175f000ef28a4f5c890c9c0b6e4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): examples/6_projections/main.go:54-68 | examples/7_outbox/main.go:152-165 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/7_outbox/main.go:167\u0060 calls \u0060Println\u0060 and \u0060examples/6_projections/main.go:69\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":"examples/6_projections/main.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2fb259eb3351f5822eb5a613b9ca1625db6938a7fa54524bda868b7c3d64e14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): examples/internal/account/account.go:71-85 | examples/internal/accountv2/account.go:83-97 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/internal/account/account.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a11f10e16df695e61c4978c696a31969f0981d450ad0ec22d1c6b79134df581d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): examples/6_projections/main.go:48-60 | examples/8_unique_constraint/main.go:95-107 \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 \u0060examples/6_projections/main.go:48\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/6_projections/main.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82ff56eaf55d505f826c48acb4ec938e06216189eddccb063743bc7c0a0957b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): examples/internal/account/account.go:62-68 | examples/internal/accountv2/account.go:74-80 \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":"examples/internal/account/account.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f78f60466f1461ab4f0ef668b823043436fb0b48b170f63efe2b21eadc753c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): examples/internal/account/account_snapshot.go:29-37 | examples/internal/accountv2/account_snapshot.go:32-40 \u2014 \u0060examples/internal/account/account_snapshot.go\u0060 and \u0060examples/internal/accountv2/account_snapshot.go\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 1 separate duplicated blocks between them, totalling at least 9 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/internal/account/account_snapshot.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"328a03294b6a1475b32f02436970ca2c340059c8b44ad4e23d4c44fcddb79838"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/3_snapshots/main.go:34-45 | examples/4_transformers_crypto/main.go:25-36 \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 \u0060examples/3_snapshots/main.go:34\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, \u0060examples/3_snapshots/main.go:47\u0060 calls \u0060DepositMoney\u0060 and \u0060examples/4_transformers_crypto/main.go:39\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":"examples/3_snapshots/main.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfdc0924f0cd27930d7d34df39cb8c864f5f33420ab4467d582503a9766687ae"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: workflow/workflow.go: workflow/workflow.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Workflow.Run at line 727. 1 of those changes was a fix/bug commit, and the other 1 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-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-12 18:45:23 \u002B03:00\u0027 --until=\u00272026-10-10 18:45:23 \u002B03:00\u0027 --full-history --no-merges -- workflow/workflow.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":"workflow/workflow.go"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2080fcc706bf9538a81f46ee96819d67b72a0ede48e7a92c327f610e8172429"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: workflow/queue_async.go: workflow/queue_async.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AsyncQueue.Handle at line 138. 1 of those changes was a fix/bug commit, and the other 1 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-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-12 18:45:23 \u002B03:00\u0027 --until=\u00272026-10-10 18:45:23 \u002B03:00\u0027 --full-history --no-merges -- workflow/queue_async.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":"workflow/queue_async.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"a72bf58a3729554dbcb92aa6ad4722c1848c510f0c346613ae017f04ce39b06f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: workflow/workflow_events.go: workflow/workflow_events.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in workflow.WaitForEvent at line 90. 1 of those changes was a fix/bug commit, and the other 1 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-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-12 18:45:23 \u002B03:00\u0027 --until=\u00272026-10-10 18:45:23 \u002B03:00\u0027 --full-history --no-merges -- workflow/workflow_events.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":"workflow/workflow_events.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4a6c872e9b36b5d9d2aa372480ac5daf27c58ff8f7d21eb2d981f8ab5291a8b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: update docs to reflect slice change, add upcasting example \u002B tests \u002B efficiency \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"event/event_transformer.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6804162b3b08e5bd702d9fd7515fe484992e313f5420df84731d60d34e9a39"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (14459 LoC, 196 module-visible types across 29 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"054bc1cb917db58b8ff9aa2df1f06214df737f5e682bf7b4007aa8df5e962861"},"taxa":[{"id":"CWE-89","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":"88705e41751141f332b246e44e5480fe4505acd821ceb2007739e3342bbe0f04"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","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":"58520b7977a5873bc333ffd7e5f56dc442b6df40404b9a2bc0254d7376d652c7"},"properties":{"dependency":{"package":"golang.org/x/crypto","version":"0.42.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","GO-2025-4116","GO-2025-4134","GO-2025-4135","GO-2026-5005","GO-2026-5006","GO-2026-5013","GO-2026-5014","GO-2026-5015","GO-2026-5016","GO-2026-5017","GO-2026-5018","GO-2026-5019","GO-2026-5020","GO-2026-5021","GO-2026-5023","GO-2026-5033","GO-2026-5932","GO-2026-6303","GO-2026-6354","GO-2026-6355"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"8e2c38ac86a572f8aaa6c724ff8ffb9a57b839fbf8ec6d98882a5a89de096479"},"properties":{"dependency":{"package":"github.com/jackc/pgx/v5","version":"5.7.5","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","GO-2026-4771","GO-2026-4772","GO-2026-5004"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"b9c7de190231d3b97dc0f1a0317bc61d7e63d7af55c350df48ddbea24eb5d370"},"properties":{"dependency":{"package":"google.golang.org/grpc","version":"1.73.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","GO-2026-4762","GO-2026-6061","GO-2026-6348","GO-2026-6441","GO-2026-6443"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"09d83cf1d0f97fb21e6cc781377d3d61bfc43d363dc125d15eb4381d49f261a1"},"properties":{"dependency":{"package":"github.com/klauspost/compress","version":"1.18.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]","GO-2026-5841","GO-2026-6865"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"bd42a5abc7579713f8f572c75ed14bc0207c89e4a503c6a5ec01d01b3267fde5"},"properties":{"dependency":{"package":"go.opentelemetry.io/otel/sdk","version":"1.35.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","GO-2026-4394","GO-2026-5426","GO-2026-6505"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"ae687499ce4a41640aa78167968808607bf7462275a4d500498acaaacfa9c0fc"},"properties":{"dependency":{"package":"github.com/moby/go-archive","version":"0.1.0","advisory":"[GHSA redacted]","aliases":["BIT-docker-cli-2026-17106","[CVE redacted]","GO-2026-6253"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"ad0bd71ae7282f15b769d343a836a6037be85836c7b6c96011de0c633319a068"},"properties":{"dependency":{"package":"go.opentelemetry.io/otel","version":"1.37.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","GO-2026-5506"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"c5f05b1f5c2971e396d88d2d218ac6c1efca96970c0e03a36b09a3a12cff0b43"},"properties":{"dependency":{"package":"github.com/docker/docker","version":"28.2.2\u002Bincompatible","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","GO-2025-3830","GO-2026-4883","GO-2026-4887","GO-2026-5617","GO-2026-5668","GO-2026-5746"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"54a6e8c46cc40c16a4db28ace71087568139f16b2a87a98fc94e559e2970b3f3"},"properties":{"dependency":{"package":"github.com/moby/sys/user","version":"0.4.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","GO-2026-6686"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d94222fa9934edd47ba3a0ef99e3a7d85a9c2a0dac93507e5359a1abb9d5d840"},"properties":{"dependency":{"package":"stdlib","version":"1.25.0","advisory":"GO-2025-3955","aliases":["BIT-golang-2025-47910","BIT-golang-2025-47912","BIT-golang-2025-58183","BIT-golang-2025-58185","BIT-golang-2025-58186","BIT-golang-2025-58187","BIT-golang-2025-58188","BIT-golang-2025-58189","BIT-golang-2025-61723","BIT-golang-2025-61724","BIT-golang-2025-61725","BIT-golang-2025-61726","BIT-golang-2025-61727","BIT-golang-2025-61728","BIT-golang-2025-61729","BIT-golang-2025-61730","BIT-golang-2025-68121","BIT-golang-2026-111943","BIT-golang-2026-25679","BIT-golang-2026-27139","BIT-golang-2026-27142","BIT-golang-2026-27145","BIT-golang-2026-32280","BIT-golang-2026-32281","BIT-golang-2026-32282","BIT-golang-2026-32283","BIT-golang-2026-32288","BIT-golang-2026-32289","BIT-golang-2026-33811","BIT-golang-2026-33814","BIT-golang-2026-33818","BIT-golang-2026-39820","BIT-golang-2026-39822","BIT-golang-2026-39823","BIT-golang-2026-39825","BIT-golang-2026-39826","BIT-golang-2026-39836","BIT-golang-2026-42499","BIT-golang-2026-42504","BIT-golang-2026-42505","BIT-golang-2026-42507","BIT-golang-2026-56853","BIT-golang-2026-56857","BIT-golang-2026-56858","BIT-golang-2026-56859","BIT-golang-2026-56860","BIT-golang-2026-56862","BIT-golang-2026-56866","BIT-golang-2026-78659","BIT-golang-2026-78660","BIT-golang-2026-78663","BIT-golang-2026-78667","BIT-golang-2026-78669","BIT-golang-2026-94439","BIT-golang-2026-94440","BIT-golang-2026-94448","BIT-golang-2026-97030","BIT-golang-2026-97031","BIT-golang-2026-97032","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","GO-2025-4006","GO-2025-4007","GO-2025-4008","GO-2025-4009","GO-2025-4010","GO-2025-4011","GO-2025-4012","GO-2025-4013","GO-2025-4014","GO-2025-4015","GO-2025-4155","GO-2025-4175","GO-2026-4337","GO-2026-4340","GO-2026-4341","GO-2026-4342","GO-2026-4601","GO-2026-4602","GO-2026-4603","GO-2026-4864","GO-2026-4865","GO-2026-4869","GO-2026-4870","GO-2026-4918","GO-2026-4946","GO-2026-4947","GO-2026-4970","GO-2026-4971","GO-2026-4976","GO-2026-4977","GO-2026-4980","GO-2026-4981","GO-2026-4982","GO-2026-4986","GO-2026-5026","GO-2026-5037","GO-2026-5038","GO-2026-5039","GO-2026-5856","GO-2026-5972","GO-2026-6088","GO-2026-6089","GO-2026-6090","GO-2026-6091","GO-2026-6218","GO-2026-6599","GO-2026-6600","GO-2026-6603","GO-2026-6604","GO-2026-6605","GO-2026-6607","GO-2026-6608","GO-2026-6609","GO-2026-6610","GO-2026-6611","GO-2026-6612","GO-2026-6613","GO-2026-6617","GO-2026-6809","RUSTSEC-2026-0381","RUSTSEC-2026-0382","RUSTSEC-2026-0383"],"reachability":{"kind":"production","file":"examples/10_workflow_monitor/main.go","line":86,"symbol":"http.NotFound"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"362d19fbc20680c130f6d3f829465778e97203407075f4ceb76a4cf0cc41a027"},"properties":{"dependency":{"package":"golang.org/x/sys","version":"0.36.0","advisory":"GO-2026-5024","aliases":["[CVE redacted]"],"reachability":{"kind":"production","file":"pkg/migrations/sqlite_lock_windows.go","line":9}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"76d999f7f0da1c7805a61d7a77ca6e9d78cdf7e7d953cafe7b73d81759ae1a99"},"properties":{"dependency":{"package":"golang.org/x/text","version":"0.29.0","advisory":"GO-2026-5970","aliases":["[CVE redacted]","[CVE redacted]","GO-2026-6629"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a859f1fe485f52c587222c5e5690bdd9a679a96161f86bc451bef0dd5c04bbc6"},"properties":{"dependency":{"package":"go.opentelemetry.io/otel/exporters/otlp/otlptrace","version":"1.19.0","advisory":"GO-2026-6505","aliases":["[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 48 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; 48 of the 70 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: eventlog/nats.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":"eventlog/nats.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98717bd515136899af1904d3d20f40f2c3f8bb7f53ef75f6dda49ed1dd9b8a8"}},{"ruleId":"AC7","level":"warning","message":{"text":"Accessibility enforcement below the top rung: No accessibility enforcement found \u2014 no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository\u0027s test and CI files \u2014 matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d46019b86eff5ddad9db289e6802ac158899e980df54c34f67722442787ead62"}},{"ruleId":"ED3","level":"note","message":{"text":"Event not named in past tense: workflowWaiting: \u0060workflowWaiting\u0060 reads as an instruction, not a fact that happened. Events describe something that already occurred \u2014 name them in the past tense (e.g. \u0060OrderPlaced\u0060, \u0060PaymentCaptured\u0060) so the ubiquitous language stays clear."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"workflow/workflow_events.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9402c23ab5ee5baba7dd5a238e167c6355252e2232e57d80de32e78e9d9abbc4"}},{"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":"M4","level":"note","message":{"text":"README/code drift: docs/custom-event-log/README.md links to \u0060../eventlog/postgres.go\u0060, but \u0060docs/eventlog/postgres.go\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/custom-event-log/README.md"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee8201a055bec35bdc2428728390bf66ce6b6f1080a3cf09a121f056811fe54"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: docs/custom-event-log/README.md links to \u0060../eventlog/sqlite.go\u0060, but \u0060docs/eventlog/sqlite.go\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/custom-event-log/README.md"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e55c3d4d79dbd1c0bd172591e4b21fbc93267a351446c583c3710235463458f"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: docs/event-deletion/README.md links to \u0060../aggregate/aggregate_deletion_test.go\u0060, but \u0060docs/aggregate/aggregate_deletion_test.go\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/event-deletion/README.md"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"338119567f794abd16b2d2189811927613a2c256c358bbe327117c716ae5ce38"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"PF1","level":"note","message":{"text":"Benchmarks don\u0027t track allocations: A Go testing.B suite exists but nothing turns on its allocation measurement \u2014 allocations (the main way hot code pressures a garbage collector or allocator) aren\u0027t being measured."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"eventlog/eventlog_benchmark_test.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3af7fd5e66897923eed6186316e71369ac77da9ec44c71e8c5e87989fc209262"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060if parseErr != 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":"eventlog/nats.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10fbfbe440ccf0c2f552a462058ed8eb7186e0d34c8031751898236228bf9ba"}},{"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":"event/event_log.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"539716d01bdb7eb853eed2958e5d085a19400123ad9b8aea652ab5e46af7d315"}},{"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":"event/event_log.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9e67f16ff6a90763617ae1a513702d92663d7338cc751a38f531cc60a4b978"}}],"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-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]}],"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":15,"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."]}]}