{"$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":"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":"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":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"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":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X31","name":"Test-only surface in a production module","shortDescription":{"text":"Test-only surface in a production module"},"helpUri":"https://codehealth.canine.dev/dimensions/X31"},{"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":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"leveled_penciller.handle_call (cyclomatic 75): leveled_penciller.handle_call has cyclomatic complexity 75 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_penciller.erl"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb5db4be34bd3ddd139634f36221c5e94987cf89155b2f22177934af54876d0"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_inker.handle_call (cyclomatic 68): leveled_inker.handle_call has cyclomatic complexity 68 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ad54653fc8715804fea7e7f011a01db3442c991e6758bfbc592e0abebd15c9"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_monitor.handle_cast (cyclomatic 61): leveled_monitor.handle_cast has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_monitor.erl"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f1ec49edc16da945f4b096e7d221f6820bfd2914b3f07f584fce742d2af804"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_bookie.handle_call (cyclomatic 53): leveled_bookie.handle_call has cyclomatic complexity 53 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f093157666dbecab3366c6d3d78eee094c9f7e0a70ae0f954f70b2d87cdf3d8"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_penciller.handle_cast (cyclomatic 50): leveled_penciller.handle_cast has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_penciller.erl"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca547cb2b3dcd1273bdac672cad0bb9870f8d29ae9987813188abd2a31d49f00"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_filter.apply_filter (cyclomatic 47): leveled_filter.apply_filter has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_filter.erl"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"362bd84d20660b34bc5a704b48e562e2ca248a11b2b3bdf66918b32a61d7035e"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_eval.apply_eval (cyclomatic 36): leveled_eval.apply_eval has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_eval.erl"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"761b6551a907de08d4431c339672af8a5530c3c0bc70c349af6a7473a190286d"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_inker.handle_cast (cyclomatic 29): leveled_inker.handle_cast has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd8320087098d47b163f09580c5ca6f038f6960aea35c6d1bc1ab6775249ef5"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_cdb.writer (cyclomatic 20): leveled_cdb.writer has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This is NOT this file\u0027s highest cyclomatic complexity: leveled_cdb.delete_pending (cyclomatic 25) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_cdb.erl"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e89873bc53305e8711726ca7f93b1b9729a34b9b3108585a911c66bd303014"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_codec.read_v3_value (cyclomatic 20): leveled_codec.read_v3_value has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_codec.erl"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f933b76a6a6b910e44a2bc3ad16aa6b8ca27a9117a2335e4e9e0fef0462fe0"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_sstblock.serialise_block (cyclomatic 18): leveled_sstblock.serialise_block has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3efee449bee5f126344eee047a583b63964394e235b5df09f3212c953868cf1"}},{"ruleId":"D1","level":"warning","message":{"text":"leveled_penciller.find_nextkeys (cyclomatic 17): leveled_penciller.find_nextkeys has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: leveled_penciller.start_from_file (cyclomatic 19) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_penciller.erl"},"region":{"startLine":2026}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd948f9cb6d75f24d8b60ea8a0e4a978d7b631ef3464d0f50cd6a18a9d361e01"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_eval.apply_eval (cognitive 40): leveled_eval.apply_eval has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 31 (37 pts), boolean chains 3 (nesting depth added 6). 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":"src/leveled_eval.erl"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"69626b0d7119a4150bc65779552701e79ce7d2c216bd8b7de426082389334f11"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_bookie.handle_call (cognitive 36): leveled_bookie.handle_call has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 23 (34 pts), boolean chains 2 (nesting depth added 11). 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":"src/leveled_bookie.erl"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4ebade54d393f7cd5871413ffcb71282cf8674ed5be2a90b2ae0b604314af3"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_filter.apply_filter (cognitive 36): leveled_filter.apply_filter has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 30 (33 pts), boolean chains 3 (nesting depth added 3). 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":"src/leveled_filter.erl"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c45ed766244a519b1baf194c5d7adcca07778f8ebb8f48da3e6658edfe21f7"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_penciller.handle_call (cognitive 33): leveled_penciller.handle_call has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 23 (28 pts), boolean chains 5 (nesting depth added 5). 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":"src/leveled_penciller.erl"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"2237360bfc189748352b13cd11e72243988e093b730e831980871104acdc6330"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_penciller.handle_cast (cognitive 17): leveled_penciller.handle_cast has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 10 (14 pts), boolean chains 3 (nesting depth added 4). 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":"src/leveled_penciller.erl"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"415747ff9a9b93d375b98d3e5837b4c2ba2429e8b7020b475d984e497ada67fa"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_sst.fetch (cognitive 17): leveled_sst.fetch has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (17 pts) (nesting depth added 8). 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":"src/leveled_sst.erl"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42b233573114efd1240935ed5dab70be338c653cf70557d94b1315a73f0556f"}},{"ruleId":"D2","level":"warning","message":{"text":"leveled_sstblock.serialise_block (cognitive 16): leveled_sstblock.serialise_block has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, match/switch 8. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95ec335d42462a9746c93aaaf906adb89fae19efd0236d217739afddb1c94e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_sst.erl: FileTooLong \u2014 4989 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 134 functions. The bar is 500 significant lines; this is 4489 over it, 9.98\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sst.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3971ab1a67843558a7b84a98f1f6be545085d16cb908bee67751dbf97f79732"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_bookie.erl: FileTooLong \u2014 2887 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 90 functions. The bar is 500 significant lines; this is 2387 over it, 5.77\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3717744b49a40d54b9f61786fe74f2d152e7fb6b95697a0b2c2298eda73d8a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_cdb.erl: FileTooLong \u2014 2433 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 104 functions. The bar is 500 significant lines; this is 1933 over it, 4.87\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_cdb.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"640e13d2fbaf73d020df10155aaf492ad00d829b7d829d70ae8f0b6d9f6f75e1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_penciller.erl: FileTooLong \u2014 2151 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 58 functions. The bar is 500 significant lines; this is 1651 over it, 4.30\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_penciller.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d18a93e6bd543bc46897509b03c7f49f6c2849ac3ae7eb0a704bc5cc6cdb1b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_inker.erl: FileTooLong \u2014 1418 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 58 functions. The bar is 500 significant lines; this is 918 over it, 2.84\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"801a502314feb3193ae936010fef4e27d7349624dbe81512bb118180a734624b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_pmanifest.erl: FileTooLong \u2014 1374 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 58 functions. The bar is 500 significant lines; this is 874 over it, 2.75\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_pmanifest.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4396f287159671877da73334df1a983b413924c165e68a6b35e8ac4308fe66e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_iclerk.erl: FileTooLong \u2014 1163 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 35 functions. The bar is 500 significant lines; this is 663 over it, 2.33\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_iclerk.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"180afe060b5c648f45e7ab9a5aa1b484b051d38a8d71ea75776892c575af9855"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_codec.erl: FileTooLong \u2014 1123 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 57 functions. The bar is 500 significant lines; this is 623 over it, 2.25\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_codec.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"744701b54fa9d70d03bd196886cc1b99e0af445cc74050b3e2cbe34f589c0314"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_eval.erl: FileTooLong \u2014 903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 403 over it, 1.81\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_eval.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f9b09637cf3ad562d0200c8d9a776cd5eb1f8010f9a2d3894024bf33df0697"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_tictac.erl: FileTooLong \u2014 789 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 35 functions. The bar is 500 significant lines; this is 289 over it, 1.58\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_tictac.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e165150b380d495ac3bf77669c7841108d75cc247952a80314f726979b96d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_monitor.erl: FileTooLong \u2014 740 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 240 over it, 1.48\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_monitor.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e58142e1bfa2a7636d02ac54cce3e5b2d6c1b759b85a791ee210350b1d170b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_sstblock.erl: FileTooLong \u2014 669 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 169 over it, 1.34\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ffd7e552c210bfba759c47b7f1317d2cf75da9de0e78aa70888519364d0e5d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_tree.erl: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_tree.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15ea450d4afc2f77f21f463dbea55b4f1bf6d2f58a27d4cca8fe17b3d092671"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_runner.erl: FileTooLong \u2014 658 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 158 over it, 1.32\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_runner.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0964ff158c471944f9c21d6eec0691e35aee43ff79d2537eff7d280a305864f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_pclerk.erl: FileTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 102 over it, 1.20\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_pclerk.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3a5df5414e7f33d3e7fc2dbd286808eaebe1b7a8cec41e58a62fa7924e26c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_filter.erl: FileTooLong \u2014 601 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 101 over it, 1.20\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_filter.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd1a8dc861a30bec203215ce84b365faa63622148970686c0dd1d23373ef55c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/leveled_log.erl: FileTooLong \u2014 521 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 21 over it, 1.04\u00D7 the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_log.erl"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d6456170e213a3c630f4cca2af7096e25b4422c1a24f5941d945ad5cf6a81f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (39 shared lines): src/leveled_sst.erl:816-968 | src/leveled_sst.erl:970-1073 \u2014 These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sst.erl"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"aadba90e32fa1d28b109681b5b659096e3c1aae7dbf289acbf36212e4a910635"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (23 shared lines): src/leveled_sstblock.erl:401-507 | src/leveled_sstblock.erl:562-656 \u2014 These two members are variants of one another: 23 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f48661b1f74f1f4518e643dc61372a13c8c2d1361abe38594468c4d6f5b85ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): src/leveled_pmanifest.erl:390-420 | src/leveled_pmanifest.erl:448-476 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_pmanifest.erl"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"c965212ec4c1512d5c3dd647a4191c1df68b0e46b8e2da7c3531d0fe4a9c74f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): src/leveled_sst.erl:3005-3023 | src/leveled_sst.erl:3025-3043 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sst.erl"},"region":{"startLine":3005}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e78485e47515dcd453bbce28b732dd09bf422b80193d6fa372fb2ca1b512b54"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): src/leveled_sst.erl:2400-2431 | src/leveled_sst.erl:2446-2480 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sst.erl"},"region":{"startLine":2400}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d66c8fdb894a063514e0d17311b441a04e41bc03c75d3b7a719209b1e8ba88"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): src/leveled_codec.erl:268-287 | src/leveled_codec.erl:297-315 | src/leveled_codec.erl:359-378 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_codec.erl"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d2ac421f6434e11823d6f00d3941f9a66a915394cc0344de28df3ae61e464b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): src/leveled_tree.erl:106-115 | src/leveled_tree.erl:120-135 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_tree.erl"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"55643beff9b2f60c750ba89e140ac91a644a5fc46246dfa1ea724e231a631ad7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): src/leveled_runner.erl:77-91 | src/leveled_runner.erl:186-206 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_runner.erl"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae69e3e604e0dde2bb0f918beaad7505705bf41b31935286df1b7d138ba295a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): src/leveled_log.erl:476-485 | src/leveled_log.erl:528-538 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_log.erl"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c7cd50c500c982a6d985c44b339dae5203a0a2c74875ea343180d1a86a30d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): src/leveled_bookie.erl:2879-2886 | src/leveled_bookie.erl:2904-2912 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":2879}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5e436f9598fd2c6441e435c1fca05ac2021003012b7329605ec96a8bf0272c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): src/leveled_eval.erl:18-29 | src/leveled_filter.erl:24-36 | src/leveled_setop.erl:19-30 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_eval.erl"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"d180a4d2ee978368167bd18facf97cff115d9bd639d410654114a01464f10285"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): src/leveled_eval.erl:35-43 | src/leveled_filter.erl:218-226 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_eval.erl"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fab74033b82d1273d69f051647c287e2535a4724819f34102c3826e90715188"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): src/leveled_runner.erl:315-335 | src/leveled_runner.erl:509-521 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_runner.erl"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed5651de45e765a5511959e65737d1df4714266243b8dc93a9741e8f2fbef2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): src/leveled_bookie.erl:3061-3073 | src/leveled_cdb.erl:1759-1768 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":3061}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba0104955ce9d5b4bc8260716f59e0215b9cf1b859ad17395bff2941a7522d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): src/leveled_bookie.erl:1834-1841 | src/leveled_inker.erl:943-953 | src/leveled_penciller.erl:1426-1435 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":1834}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d364dcde3c1b2cad9f1c8a21f9d0bc3afd3c5b09bd6a27e58bf816bc4bd834"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): src/leveled_inker.erl:955-958 | src/leveled_penciller.erl:1437-1440 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":955}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a07a23211d2db57f8badf6c5896e9e253c509278d3f4af8f4a4744a3ab22a43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 4\u002B corresponding lines): src/leveled_iclerk.erl:180-187 | src/leveled_inker.erl:206-211 | src/leveled_monitor.erl:289-294 | src/leveled_penciller.erl:346-349 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_iclerk.erl"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"eda0076151bfca763e066197f5aa42c2d1a9da6fa347a2029cb87a055ed5af4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): src/leveled_inker.erl:216-221 | src/leveled_penciller.erl:354-357 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e00c8439a5ef018046079812b91d5ccc3fb9efebaa998504b0f4c0f16cc1a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): src/leveled_bookie.erl:579-584 | src/leveled_inker.erl:238-243 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"812ac4fa85bbf3c86fe07322bcce8fcd9bf87ba8884015f819615445ac288dab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): src/leveled_sstblock.erl:90-110 | src/leveled_sstblock.erl:131-151 \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 \u0060src/leveled_sstblock.erl:90\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":"src/leveled_sstblock.erl"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbd184554a3a49177bb13a6c2a23cfb1c341e34764566bc7aea6426a8f0a600"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src/leveled_eval.erl:52-67 | src/leveled_eval.erl:98-113 \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 \u0060src/leveled_eval.erl:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_eval.erl"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9a0999c948156c83eeefe52c4046620ca2fa08c67363f1a81e247636658db0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src/leveled_sst.erl:870-885 | src/leveled_sst.erl:999-1014 \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 \u0060src/leveled_sst.erl:870\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":"src/leveled_sst.erl"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a54e1f33e7ebabd78dd4a89a411d8b6bef727cfcf07ef8a0d05e02417ea3517"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src/leveled_pmanifest.erl:397-411 | src/leveled_pmanifest.erl:455-469 \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 \u0060src/leveled_pmanifest.erl:397\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, \u0060src/leveled_pmanifest.erl:412\u0060 calls \u0060max\u0060 and \u0060src/leveled_pmanifest.erl:470\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_pmanifest.erl"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"2398b18f59e300ae032d39191ced452a64bfb4c857e0eedfb5ea19dd4633cf6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/leveled_cdb.erl:536-549 | src/leveled_cdb.erl:680-693 \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 \u0060src/leveled_cdb.erl:536\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":"src/leveled_cdb.erl"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ccb04bdf1872e8eaf8d902945fbb2c6aaf3a72d92d7179ea197b9b0cbc75037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): src/leveled_inker.erl:906-917 | src/leveled_penciller.erl:1392-1405 \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 \u0060src/leveled_inker.erl:906\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_inker.erl"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61f279519ea5594a1364990408a1b925bfea1594140b4cbb7ca588d9110a0a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/leveled_cdb.erl:522-534 | src/leveled_cdb.erl:666-678 \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 \u0060src/leveled_cdb.erl:522\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":"src/leveled_cdb.erl"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"25308c68f697ea842fd50ea50e9378ddc467c08201ddbc81f49d1f0d306667e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/leveled_cdb.erl:749-760 | src/leveled_cdb.erl:851-862 \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 \u0060src/leveled_cdb.erl:749\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":"src/leveled_cdb.erl"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"2600b893861f9c6ab03699dffe0733a818af9c3613bcaf6d1841aaa0247ff141"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/leveled_sst.erl:830-841 | src/leveled_sst.erl:976-987 \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 \u0060src/leveled_sst.erl:830\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":"src/leveled_sst.erl"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02cafcfcc672f2b95f2a6640fbf014b2d4d9d67c5c85d450f7262e8452ed9d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/leveled_sst.erl:2305-2315 | src/leveled_sst.erl:2316-2327 \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 \u0060src/leveled_sst.erl:2305\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":"src/leveled_sst.erl"},"region":{"startLine":2305}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf215fa734bcf881a2044ed341253b8ee522e7860c3b0c6834aeef5f1274bad1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/leveled_sst.erl:888-898 | src/leveled_sst.erl:1017-1027 \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 \u0060src/leveled_sst.erl:888\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":"src/leveled_sst.erl"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"194d1c3ed45c33e28193cd34d7c5b0950b5df2c9caee3c80a2641ba477f66cf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/leveled_sstblock.erl:612-622 | src/leveled_sstblock.erl:636-646 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"979552e6fd3cf2a8188e0c2b720c3d79a03b5fece7b990ad824232bcffd39ee7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/leveled_bookie.erl:3020-3029 | src/leveled_runner.erl:377-386 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_bookie.erl"},"region":{"startLine":3020}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b3415fffb222e45ddd7e5ca691b4e206a763cc7226087d694d7c5788ab66c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src/leveled_sst.erl:1037-1045 | src/leveled_sst.erl:1049-1057 \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 \u0060src/leveled_sst.erl:1037\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":"src/leveled_sst.erl"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"286eba5634b82d34fb4da646954a06c9cb381d5e4a73460d87528867ea086225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/leveled_sstblock.erl:421-428 | src/leveled_sstblock.erl:583-591 \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 \u0060src/leveled_sstblock.erl:583\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/leveled_sstblock.erl:418\u0060 calls \u0060binary_to_term\u0060, \u0060fun\u0060 and \u0060src/leveled_sstblock.erl:582\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":"src/leveled_sstblock.erl"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e11357464cee72230589d3c51a0f191d340808a7a863416e397ff0580ed24e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): src/leveled_sstblock.erl:447-453 | src/leveled_sstblock.erl:463-469 | src/leveled_sstblock.erl:479-485 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/leveled_sstblock.erl:447\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":"src/leveled_sstblock.erl"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ce3fbc1d185a6353a2b9ef206067bf0fe7c2705aa1f19a5806d4230207d982"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src/leveled_sst.erl:2298-2303 | src/leveled_sst.erl:2309-2314 | src/leveled_sst.erl:2321-2326 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/leveled_sst.erl:2298\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/leveled_sst.erl:2308\u0060 calls \u0060split\u0060 and \u0060src/leveled_sst.erl:2297\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sst.erl"},"region":{"startLine":2298}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92c51e16a5a6ec0206f4fc409212ae2251d53a19e2d0dab10554d5df0c48bae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 7): src/leveled_sstblock.erl:447-453 | src/leveled_sstblock.erl:463-469 | src/leveled_sstblock.erl:479-485 | src/leveled_sstblock.erl:591-595 | src/leveled_sstblock.erl:598-602 | src/leveled_sstblock.erl:648-648 | src/leveled_sstblock.erl:650-653 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/leveled_sstblock.erl:447\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060src/leveled_sstblock.erl:648\u0060 calls \u0060binary_to_term\u0060 and \u0060src/leveled_sstblock.erl:469\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":"src/leveled_sstblock.erl"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d8e10be2b7501068fbfeda298f1b425aeee7e2deb78c2ed705cad3f7b47ff6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/leveled_sstblock.erl:81-85 | src/leveled_sstblock.erl:122-126 \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 \u0060src/leveled_sstblock.erl:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_sstblock.erl"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"44621e2094aa3f351a6162b25a7f9dc635843c57832e95456a8af2c2261d5022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/leveled_sstblock.erl:606-610 | src/leveled_sstblock.erl:628-634 \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 \u0060src/leveled_sstblock.erl:606\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":"src/leveled_sstblock.erl"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43f4f7a0936786af4dc5755f0b7b298a2c92c518d46c0f2e14282e7f335dc68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/leveled_sst.erl:2840-2845 | src/leveled_sst.erl:2884-2889 \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. 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":"src/leveled_sst.erl"},"region":{"startLine":2840}}}],"partialFingerprints":{"codehealthFindingId/v1":"861daceddb2de8319a64959381825d141282d8f19675844614a0ea688d2e0baa"}},{"ruleId":"D12","level":"warning","message":{"text":"No dependency lockfile committed (rebar.config): rebar.config declares 3 dependencies but no lockfile (rebar.lock or mix.lock) is committed beside it, so \u0060rebar3 compile\u0060 resolves versions afresh on every machine and every CI run \u2014 two builds of this commit are not guaranteed to be the same build. Run \u0060rebar3 compile\u0060 and commit the resulting \u0060rebar.lock\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8167d684e70969326978dc347dd61843dfe24c2c826307dbb1edecc8ff726c1c"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating source dependency: lz4: Runtime dependency \u0060lz4\u0060 is fetched from source in rebar.config and tracks branch \u0060openriak-3.4\u0060 \u2014 the declaration pins no immutable revision, so \u0060rebar3 upgrade\u0060 moves this dependency to code nobody reviewed. Pin it with \u0060{tag, \u0022v1.2.3\u0022}\u0060 or \u0060{ref, \u0022\u003Cfull commit SHA\u003E\u0022}\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0dcc94637981fa2d0f19e1db15f76f32217f10a5cb768af89c9e0026ed21c0c8"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating source dependency: zstd: Runtime dependency \u0060zstd\u0060 is fetched from source in rebar.config and tracks branch \u0060openriak-3.2\u0060 \u2014 the declaration pins no immutable revision, so \u0060rebar3 upgrade\u0060 moves this dependency to code nobody reviewed. Pin it with \u0060{tag, \u0022v1.2.3\u0022}\u0060 or \u0060{ref, \u0022\u003Cfull commit SHA\u003E\u0022}\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f9b19967bbaf0a9137f59da9bee8d0047c730bb15915d82dd8a5d49f08202ba1"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating source dependency: eqwalizer_support: Runtime dependency \u0060eqwalizer_support\u0060 is fetched from source in rebar.config and tracks branch \u0060openriak-3.4\u0060 \u2014 the declaration pins no immutable revision, so \u0060rebar3 upgrade\u0060 moves this dependency to code nobody reviewed. Pin it with \u0060{tag, \u0022v1.2.3\u0022}\u0060 or \u0060{ref, \u0022\u003Cfull commit SHA\u003E\u0022}\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e3ec5cc6e79243250560507614d0ba1cc5eff2a1c526aaac7fb2858f7d0c7583"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/leveled_bookie.erl: src/leveled_bookie.erl changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in leveled_bookie.handle_call at line 1468. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-05..2026-09-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-05 12:14:17 \u002B01:00\u0027 --until=\u00272026-09-03 12:14:17 \u002B01:00\u0027 --full-history --no-merges -- src/leveled_bookie.erl\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":"src/leveled_bookie.erl"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb2ce5d0d09c876973949ff573aad7bd5e4f1f5417ce87096acf87061a92f3c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/leveled_codec.erl: src/leveled_codec.erl changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in leveled_codec.read_v3_value at line 1139. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-05..2026-09-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-05 12:14:17 \u002B01:00\u0027 --until=\u00272026-09-03 12:14:17 \u002B01:00\u0027 --full-history --no-merges -- src/leveled_codec.erl\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":"src/leveled_codec.erl"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"e74eb4ae45db1ea0a14c492bc350767f7929b088bba782566389b3267564f1f3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/leveled_penciller.erl: src/leveled_penciller.erl changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in leveled_penciller.handle_call at line 734. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-05..2026-09-03, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-05 12:14:17 \u002B01:00\u0027 --until=\u00272026-09-03 12:14:17 \u002B01:00\u0027 --full-history --no-merges -- src/leveled_penciller.erl\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":"src/leveled_penciller.erl"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3f4a327cf950c3ff55f9ce0ca59f20ffe253e32448590287a7637b4f8b384d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: %% TODO ct:pal not working?  even with rebar3 ct --verbose? \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":"test/end_to_end/perf_SUITE.erl"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0dc07fe6150a42aae13bbd50fb294b940118249dd8782c15585451902b0fa3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: % TODO: Some sort of split root path to allow for mixed classes of \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":"src/leveled_bookie.erl"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f17eebdb8cc2d60f2981e5a54e99048d66c30002a079747b6ee47585525bad"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: %% TODO: timestamps for delayed reaping \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":"src/leveled_codec.erl"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f5a2350d76c0872b52d6641af64350d5ba37a0f80069236df194df183f50440"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: %% TODO: This should support a CRC check, but issues with making the CRC \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":"src/leveled_imanifest.erl"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eaa5d51d4d8693a71750761bb89d180b08d3a0f2aa6a110dffe7740965dc2e1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: %% TODO: how to instruct the files to close is tbd \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":"src/leveled_inker.erl"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac420135fc5e501b19b14b8b4ed98a0961389aae1c9e13756af8a961799b9f6"}},{"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":"a66d9315fb0ff4f78a6acdca7095c75f7988a058a5261b7803e0bd2a74f72635"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8e73875d441879a5de52ab0cf3555be257029fead30edac543f828af5692d0bb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D36","level":"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":"5e5d30d33b29569962e5449d58b4d9e235a9c4e1c3e4ab13e478fc7621fa351a"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"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":"X31","level":"note","message":{"text":"Test-only surface in a production module: \u0060leveled_head:riak_metadata_to_binary/2\u0060 is exported unconditionally, and the comment directly above the \u0060-export\u0060 on this line says the exports below it are for testing. Erlang has no visibility below \u0060-export\u0060, so this is part of the module\u0027s public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in \u0060-ifdef(TEST). \u2026 -endif.\u0060 keeps the test\u0027s access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build \u2014 delete the comment and document the function as part of the module\u0027s API."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_head.erl"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c728a97cbc3403b481cad05cde14e8b3849134b70c60d94c068df416c498886b"}},{"ruleId":"X31","level":"note","message":{"text":"Test-only surface in a production module: \u0060leveled_head:riak_extract_metadata/2\u0060 is exported unconditionally, and the comment directly above the \u0060-export\u0060 on this line says the exports below it are for testing. Erlang has no visibility below \u0060-export\u0060, so this is part of the module\u0027s public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in \u0060-ifdef(TEST). \u2026 -endif.\u0060 keeps the test\u0027s access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build \u2014 delete the comment and document the function as part of the module\u0027s API."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_head.erl"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf25e4226d5959942b3429b920952e9a0327271bc7de10ae6ac301dae087407"}},{"ruleId":"X31","level":"note","message":{"text":"Test-only surface in a production module: \u0060leveled_head:get_indexes_from_siblingmetabin/2\u0060 is exported unconditionally, and the comment directly above the \u0060-export\u0060 on this line says the exports below it are for testing. Erlang has no visibility below \u0060-export\u0060, so this is part of the module\u0027s public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in \u0060-ifdef(TEST). \u2026 -endif.\u0060 keeps the test\u0027s access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build \u2014 delete the comment and document the function as part of the module\u0027s API."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/leveled_head.erl"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8fa9cd0fd44e9bcb0d0307b9d9fd7057f3e1543895299ee9abb07dd929db1a"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"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/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"}]}],"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":3,"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."]}]}