{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AC1","name":"Text alternatives","shortDescription":{"text":"Text alternatives"},"helpUri":"https://codehealth.canine.dev/dimensions/AC1"},{"id":"AC2","name":"Forms \u0026 labels","shortDescription":{"text":"Forms \u0026 labels"},"helpUri":"https://codehealth.canine.dev/dimensions/AC2"},{"id":"AC4","name":"Keyboard semantics","shortDescription":{"text":"Keyboard semantics"},"helpUri":"https://codehealth.canine.dev/dimensions/AC4"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX2","name":"Stateful singletons","shortDescription":{"text":"Stateful singletons"},"helpUri":"https://codehealth.canine.dev/dimensions/AX2"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"C2","name":"Access Controls","shortDescription":{"text":"Access Controls"},"helpUri":"https://codehealth.canine.dev/dimensions/C2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X2","name":"Cancellation propagation","shortDescription":{"text":"Cancellation propagation"},"helpUri":"https://codehealth.canine.dev/dimensions/X2"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"wrapper.wrap_moe_layers_with_kt_wrapper (cyclomatic 184): wrapper.wrap_moe_layers_with_kt_wrapper has cyclomatic complexity 184 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"8332761b8e4d641ede9efc5a2150a359b17255e695c6f5c51be5672989d3608d"}},{"ruleId":"D1","level":"warning","message":{"text":"KTConfig.__post_init__ (cyclomatic 116): KTConfig.__post_init__ has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"201fedc26a316d4ee01fb2971c2133b377024efa0ddb98ee36a13b0b57cb1461"}},{"ruleId":"D1","level":"warning","message":{"text":"model.list_models (cyclomatic 93): model.list_models has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04a5ae6e92a9fa8c55e942c1ba937dc51aca55fefc94db447c44981b94ae67c"}},{"ruleId":"D1","level":"warning","message":{"text":"model.edit_model (cyclomatic 92): model.edit_model has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a6f20380b920ddbbbce43e1732b62e350aeaa3fe08cec23b28225359f94cbe"}},{"ruleId":"D1","level":"warning","message":{"text":"CMakeBuild._build_single_variant_impl (cyclomatic 66): CMakeBuild._build_single_variant_impl has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"1465030788262792ae98795419bcafb71b22f2217d3ec0b45a3511b6933c12a7"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.doctor (cyclomatic 63): doctor.doctor has cyclomatic complexity 63 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/doctor.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb2c1dc0888ba054165f709a4e8c86a768ba3cee8a1b459f4f177af7ab3cf57"}},{"ruleId":"D1","level":"warning","message":{"text":"model.verify_model (cyclomatic 62): model.verify_model has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb46531459db79e223dcb47dd90abaf24414bf24e6d5890d3b946a909c854a18"}},{"ruleId":"D1","level":"warning","message":{"text":"KDeepseekV2Model.forward (cyclomatic 61): KDeepseekV2Model.forward has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a612beecec05f91198c0dcb2f391a1930b280efe0011cb03e3379034897accb"}},{"ruleId":"D1","level":"warning","message":{"text":"KDeepseekV2Model.forward (cyclomatic 56): KDeepseekV2Model.forward has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4a4505bbe43bfba31fb64978a277180db3337e2af5759b8d74dafb8d857277"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoELayerWrapper._submit_and_compute_gpu (cyclomatic 54): KTMoELayerWrapper._submit_and_compute_gpu has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ee27644acb66672a6c0da4fc3c69761bee129bf370ca7b2b4215972d43e477"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoEFunction.backward (cyclomatic 53): KTMoEFunction.backward has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"75fdba7740272edb1507f0fb880d75f10247dc1906176a96f573fa176385ef53"}},{"ruleId":"D1","level":"warning","message":{"text":"KQwen2MoeModel.forward (cyclomatic 52): KQwen2MoeModel.forward has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c27bc0f6b636f1de6dad555676ab867ed11b8e0272e4d47926c2a8439b3acd"}},{"ruleId":"D1","level":"warning","message":{"text":"KQwen2MoeModel.forward (cyclomatic 52): KQwen2MoeModel.forward has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ba6b0fc48fb7287b4277174903333c00a746177a15be73fb6176c41cccf2f8"}},{"ruleId":"D1","level":"warning","message":{"text":"model.download (cyclomatic 52): model.download has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"756e3bf44348e0d2fdb1269d5ce10fb7b25479d0a4436d78f9fe4006b366ac23"}},{"ruleId":"D1","level":"warning","message":{"text":"quant.quant (cyclomatic 50): quant.quant has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8898a52da27fa23778ba58575f2c64a8b469c75839d1c481fbc34d807ab0765b"}},{"ruleId":"D1","level":"warning","message":{"text":"lora.kt_adapt_peft_lora (cyclomatic 50): lora.kt_adapt_peft_lora has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bfe1124bedcca289920bcdfb3c37f8b54d54e897ff314c7f9b5cc3502ab1e6"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat.local_chat (cyclomatic 49): local_chat.local_chat has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d46ce983b3639a0eb96ae4f5b208838e64bb6b6d5df066e9bd197beae72ea4"}},{"ruleId":"D1","level":"warning","message":{"text":"export_dsv4_sglang_adapter.export (cyclomatic 47): export_dsv4_sglang_adapter.export has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/export_dsv4_sglang_adapter.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc21b1210ee1c9bfd92ea0d3265f8d61641882c96ed60df91d994b2d08e1008"}},{"ruleId":"D1","level":"warning","message":{"text":"AMXSFTMoEWrapper.__init__ (cyclomatic 46): AMXSFTMoEWrapper.__init__ has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55d48682999c85f6c418b873063619633eabcea70de766a08f8bfc54607c988"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.prefill_and_generate (cyclomatic 43): utils.prefill_and_generate has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"60223bf768062de8191161546b1e8b312a8d35bf254c52ef272a3a5c939aaf15"}},{"ruleId":"D1","level":"warning","message":{"text":"chat.chat_completion (cyclomatic 41): chat.chat_completion has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e34d871af9c0ba15ec3551230ebea57a4f3254d9a2d28ae031c4caad46a6f3"}},{"ruleId":"D1","level":"warning","message":{"text":"chat.chat_completion (cyclomatic 41): chat.chat_completion has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7871952de0d94f6afedc8a97e798d92363ba6e63e75c74eb740c1a7731d349e"}},{"ruleId":"D1","level":"warning","message":{"text":"weight_manifest._validate_layer (cyclomatic 41): weight_manifest._validate_layer has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weight_manifest.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"11553f67ad5e12f4e89f590f2a024034e450015bc176058fd65a9a99fb3827b4"}},{"ruleId":"D1","level":"warning","message":{"text":"run._run_impl (cyclomatic 40): run._run_impl has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5fa27d2703c5685dbd53229595f61bb32aa045e123c96bff43ba1f54f614ef7"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeMoEWrapper.load_weights (cyclomatic 39): NativeMoEWrapper.load_weights has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96cacfb3ae686b8e34376dfef699ec5e890a083bec75f8ba6613185b42f1b09"}},{"ruleId":"D1","level":"warning","message":{"text":"KQwen3MoeModel.forward (cyclomatic 38): KQwen3MoeModel.forward has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"491c425689c61136448bf3563d91c17cbb50b1b4c8f77fd3a501dd70bce3494d"}},{"ruleId":"D1","level":"warning","message":{"text":"KTrainer.create_accelerator_and_postprocess (cyclomatic 35): KTrainer.create_accelerator_and_postprocess has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53d90a9a17e70478a90ac305fbc69ab2786568b407d4a4d0bdfe1bb9b494e17"}},{"ruleId":"D1","level":"warning","message":{"text":"local_chat.local_chat (cyclomatic 35): local_chat.local_chat has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/local_chat.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f986aae41d63131f30b6f69455f73a70d09d9492babce9bb3a3041d8441e173"}},{"ruleId":"D1","level":"warning","message":{"text":"wrapper.load_kt_model (cyclomatic 35): wrapper.load_kt_model has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb066054d2094a381f1d439870fd0c600b7ab1cfa30642c6ff33709e74fd5e30"}},{"ruleId":"D1","level":"warning","message":{"text":"main._show_first_run_setup (cyclomatic 34): main._show_first_run_setup has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/main.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7dd6d54808e7dd699784ea752e456efa02a8c1cf5b3cb6fd85f4f2d3811822e"}},{"ruleId":"D1","level":"warning","message":{"text":"AMXSFTMoEWrapper.load_weights (cyclomatic 34): AMXSFTMoEWrapper.load_weights has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f27ebf9d769e6dd6329afabd3676763a756ed189320d663316c07bc81ead3d"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeModel.forward (cyclomatic 33): Qwen2MoeModel.forward has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1115}}}],"partialFingerprints":{"codehealthFindingId/v1":"be44a6ca84b574cfcd5c65342faf4c6d066bb26c6b6ab87a02fb0bfba383c67b"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeModel.forward (cyclomatic 33): Qwen2MoeModel.forward has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c168c1473a3a2b12e1125945fd90ee39b7d5457882b7ee060b57f6dd53874f2"}},{"ruleId":"D1","level":"warning","message":{"text":"CMakeBuild.detect_cpu_info (cyclomatic 33): CMakeBuild.detect_cpu_info has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6548a36ae460daf274d4a0557a6e19d4af0e4f72551be1a6f375ce3a9b688e"}},{"ruleId":"D1","level":"warning","message":{"text":"verify_mxfp4_gguf._set_main (cyclomatic 33): verify_mxfp4_gguf._set_main has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f734db065a46cbf4640603c522c72f6f5cc4c2aab19fe81dcd181ea3dd1bf5"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2Model.forward (cyclomatic 32): DeepseekV2Model.forward has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"54013fc4b8faf2c27e884231b489081bec816484177891134002e9055d2ea655"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralModel.forward (cyclomatic 32): MixtralModel.forward has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c70f9d5dd85981deeff0f8be0f22324de293a4f21d43c9710dd10945a2e2444"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2Model.forward (cyclomatic 32): DeepseekV2Model.forward has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1423}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c5db1632503e9407a5f7f5aefdbc3b1c42ffd5bb456439980c0510b1e86d08"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralModel.forward (cyclomatic 32): MixtralModel.forward has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ea0f89b6674f3ad6af186a813371e55d66bbb353235dc926fac49fd172451d"}},{"ruleId":"D1","level":"warning","message":{"text":"PeftModel.from_pretrained (cyclomatic 31): PeftModel.from_pretrained has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa7e5494b2d44f3b6d3a0ce9b138c4ad7ba50455287562fa01343fb40c5faf4"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.__init__ (cyclomatic 31): Engine.__init__ has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b97e2a854032d43798a8dd86c5f755bd35fec14de0d9a786190d9150d72f733"}},{"ruleId":"D1","level":"warning","message":{"text":"model_verifier.pre_operation_verification (cyclomatic 31): model_verifier.pre_operation_verification has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78b1006083b99faa24731d282b94c521b3d75f6b09bd1654380e36eaede18c5"}},{"ruleId":"D1","level":"warning","message":{"text":"OnlineQuantConverter._convert_layer_experts (cyclomatic 31): OnlineQuantConverter._convert_layer_experts has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"552d66c94e302e8117335883acf01664dcb5fbbe5912fc73434e2caf5c4b2b75"}},{"ruleId":"D1","level":"warning","message":{"text":"OnlineQuantConverter._convert_layer_experts (cyclomatic 31): OnlineQuantConverter._convert_layer_experts has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb41618e3e7df3a312c436a973c3a8cf60ad3408382797524f07297125b3dd2a"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._inspect_cache_tensors (cyclomatic 30): artifacts._inspect_cache_tensors has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c26cf798e594c5bd3e699f4a92ef68170a407d7eab7118885b77e22881ce254"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoELayerWrapper._forward_routed (cyclomatic 30): KTMoELayerWrapper._forward_routed has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f325a6534042fbf9a48f33ac8d17e5bf84ba6ed9179f51fd3937300d7f2a1a"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3Model.forward (cyclomatic 29): DeepseekV3Model.forward has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1390}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c4e6459d793ce52c298f6b705d26b30c7af6261077e34de2dd6802ba5bfea8"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3Model.forward (cyclomatic 29): DeepseekV3Model.forward has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"7814ec46d687086ba49228ac0d35b819f5ce9b34066274c3401f25fcae58d570"}},{"ruleId":"D1","level":"warning","message":{"text":"model_verifier.verify_model_integrity_with_progress (cyclomatic 29): model_verifier.verify_model_integrity_with_progress has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d6e1bce88b36459f6ba22fe5073e7d598067fe54bd7b4afbd7b5b596c10533"}},{"ruleId":"D1","level":"warning","message":{"text":"tuna_engine.test_config (cyclomatic 29): tuna_engine.test_config has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/tuna_engine.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec5ef87e3dbbd44bd640689842e600c52756140b29fd5bff87c77d0ab626de9"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaModel.forward (cyclomatic 28): LlamaModel.forward has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b18b7286851a2b46806a41e37beb04593abbea9546432b011c6cceb774c3f7"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaModel.forward (cyclomatic 28): LlamaModel.forward has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68509d0aba8de1a077f2d68358dacd6f7e28379d59ada3091f33569c13a02c1"}},{"ruleId":"D1","level":"warning","message":{"text":"CMakeBuild.build_extension (cyclomatic 28): CMakeBuild.build_extension has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"a226e2efe72944d77c6bb77433efa68657f22617d980334bf54c44579ffa51cd"}},{"ruleId":"D1","level":"warning","message":{"text":"chat.chat (cyclomatic 28): chat.chat has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/chat.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aed365624bec0944f300be4fa9215088f1c5cf6a4dc62da7a394cb499e96bff"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._validate_non_expert_cache (cyclomatic 28): artifacts._validate_non_expert_cache has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"7722bf85a5198d8df86a05516eab29cc425a59695e97d4a31599c87e0f10f05a"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeMoEWrapper.__init__ (cyclomatic 28): NativeMoEWrapper.__init__ has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"46d5e205fd042218f81c89805a43b3162fb04c4186daff94ca2a5dd9c993386a"}},{"ruleId":"D1","level":"warning","message":{"text":"CMakeBuild.build_extension (cyclomatic 27): CMakeBuild.build_extension has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"88c8756b523bbd1016097767b50d41574320e18ffd22782eacf9a530bd7185d6"}},{"ruleId":"D1","level":"warning","message":{"text":"SmallthinkerModel.forward (cyclomatic 27): SmallthinkerModel.forward has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"66293f36c91ac6cb8a5cf829b7afb683ba52afa3d3ea9d242b9aa8b8150ff522"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._validate_adapter_manifest (cyclomatic 26): artifacts._validate_adapter_manifest has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1973}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d18b6f0cec24c4828217850a1ef943fab41c30ca851fa3915667941243fe76"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoELayerWrapper.__init__ (cyclomatic 26): KTMoELayerWrapper.__init__ has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c37adaef75ae121eeac075eda2b9a4cd75af4f15f49cf0995cafe275c79ef44e"}},{"ruleId":"D1","level":"warning","message":{"text":"PeftModel.save_pretrained (cyclomatic 25): PeftModel.save_pretrained has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cef1b6e0b13408c2614d2c897c8f68a73596d175103960c56868bfaeefe2815"}},{"ruleId":"D1","level":"warning","message":{"text":"environment.detect_cpu_info (cyclomatic 25): environment.detect_cpu_info has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8741a0d8899735dd3bc7698bf55a0499a719922b616e582000c7fce0df400d2"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoEFunction.forward (cyclomatic 25): KTMoEFunction.forward has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"099da0fe6bf5608cb60ea0273c353012cf6032614e9ad9dee92f4df0a94112d0"}},{"ruleId":"D1","level":"warning","message":{"text":"deepseek_v4.inspect_native_checkpoint (cyclomatic 25): deepseek_v4.inspect_native_checkpoint has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ad864ed0538a23b151eb3c9bd0481a1717147fcc88c3536d27d009d5a02ad4"}},{"ruleId":"D1","level":"warning","message":{"text":"FP8SafeTensorLoader._detect_format (cyclomatic 25): FP8SafeTensorLoader._detect_format has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"c368630b86fabe1c2e8e84364efd40ce0cc4b4e2bcfde3df2906eb6857befdc2"}},{"ruleId":"D1","level":"warning","message":{"text":"optimize.gen_optimize_config (cyclomatic 24): optimize.gen_optimize_config has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/optimize/optimize.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55d1e1261d84c03824be8b3a8e53b416bf0dac344cef62601859a03e3a12fc0"}},{"ruleId":"D1","level":"warning","message":{"text":"sglang_checker.check_sglang_installation (cyclomatic 24): sglang_checker.check_sglang_installation has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/sglang_checker.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"71973aca26605e0cb5db1901a0c7f5baa25bca40a498bdf7a482a77d9e873ebc"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts.validate_kt_pretrained_load (cyclomatic 24): artifacts.validate_kt_pretrained_load has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b9ecb056b401fdbe75c52e457f568fdf0d469217ebce14f5efaea71ff306f97"}},{"ruleId":"D1","level":"warning","message":{"text":"KTrainer.training_step (cyclomatic 23): KTrainer.training_step has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c25386b233edfe49dda33b977c3f8bd766ff48046ceb93874466b3c97b159d"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.load_cur_state_dict (cyclomatic 23): utils.load_cur_state_dict has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef4b484c65408d0eaf5ff8df94b0c8c274d8bb0abc234e2336612237e32a9726"}},{"ruleId":"D1","level":"warning","message":{"text":"model_scanner.find_model_roots_from_paths (cyclomatic 23): model_scanner.find_model_roots_from_paths has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe80d0b50ecd3b99ef48739b820e64b5586387f94e20259c64517839498ef81c"}},{"ruleId":"D1","level":"warning","message":{"text":"model_table_builder.build_amx_table (cyclomatic 23): model_table_builder.build_amx_table has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0917f91fc323de10ac2a8e2fb5aa1452d3ec3ec1fde35db97f6c7934e8c3e6"}},{"ruleId":"D1","level":"warning","message":{"text":"weight_manifest.validate_persistent_int8_weights (cyclomatic 23): weight_manifest.validate_persistent_int8_weights has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weight_manifest.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"54aab69b523982bb3b0360965d01272d01e32c2511e25dd1538e4f88e455152d"}},{"ruleId":"D1","level":"warning","message":{"text":"weights.load_block_fp8_experts_from_checkpoint_files (cyclomatic 23): weights.load_block_fp8_experts_from_checkpoint_files has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c226c0b58941a06d2317a387fa27fd0c929f20a5e786b1554c756500d53406"}},{"ruleId":"D1","level":"warning","message":{"text":"weights.load_experts_from_checkpoint_files (cyclomatic 23): weights.load_experts_from_checkpoint_files has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"db260ded25fb075610209ba20907bfc7b113f21f1d7c17b14a4e663b1e04b486"}},{"ruleId":"D1","level":"warning","message":{"text":"_cpu_detect.detect_cpu_features (cyclomatic 22): _cpu_detect.detect_cpu_features has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/_cpu_detect.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"073a7f8b859d296444fb45c5f5e4b251692f0d16d14e7e8c239a29c390798ffc"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts.validate_kt_prequantized_loading_info (cyclomatic 22): artifacts.validate_kt_prequantized_loading_info has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe3f4c7b3a2a41bedcf075c17817a78e2326fcdbfd6daf7ba80d548bfc75fda"}},{"ruleId":"D1","level":"warning","message":{"text":"ConverterBase._find_expert_layers (cyclomatic 22): ConverterBase._find_expert_layers has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab4895dacaefc0c9b5c9e3c77912bb9819aa1140e97f00ab416e40cc03efe313"}},{"ruleId":"D1","level":"warning","message":{"text":"ConverterBase.convert (cyclomatic 22): ConverterBase.convert has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a91589c57a0062b35dc80c036a51b172f606fb43573b687a8544b55c0547109"}},{"ruleId":"D1","level":"warning","message":{"text":"manual_promote.check_attestation (cyclomatic 21): manual_promote.check_attestation has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/manual_promote.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3a140adc0ce8eb55038ce9cf7aef70920d3c00c99b0161989718b15aa9bec1f"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel.forward_chunk (cyclomatic 21): KLlamaModel.forward_chunk has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a81e2ad1f08d8c9f46074feeaca6e5666b70b0985e00c6fce77fd75c78d57c3"}},{"ruleId":"D1","level":"warning","message":{"text":"optimize.gen_optimize_config (cyclomatic 21): optimize.gen_optimize_config has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05e785e40a37f97a8ca71e3223b2cf753e1b29b4d94c7ee37d08fb7c5682552"}},{"ruleId":"D1","level":"warning","message":{"text":"PeftModel._setup_prompt_encoder (cyclomatic 21): PeftModel._setup_prompt_encoder has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"386ecbf47619da07bfaef11300b3463bf1e97f120cf279e75a21320087f13e93"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.prefill_and_generate (cyclomatic 21): utils.prefill_and_generate has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eda985e4e5569442a8fc048036b77a96d07ae07f1c17115bff2cb297aaf23c2"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel.forward_chunk (cyclomatic 21): KLlamaModel.forward_chunk has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"595d5c3018bd965021611695c28f49eba9271cbe1c378fa6457272f420445210"}},{"ruleId":"D1","level":"warning","message":{"text":"repo_detector.extract_repo_from_frontmatter (cyclomatic 21): repo_detector.extract_repo_from_frontmatter has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"968bde48863de19c213a947f75fdd734943cdf76052cff50f993d53c46b3d2db"}},{"ruleId":"D1","level":"warning","message":{"text":"KTConfig._from_object (cyclomatic 21): KTConfig._from_object has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ee3d65bfb32a779537ee9481f676db975191a58f42ea0804375e595c9ff96f6"}},{"ruleId":"D1","level":"warning","message":{"text":"KTMoELayerWrapper._compute_routing (cyclomatic 21): KTMoELayerWrapper._compute_routing has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a66f695ae5222c391a7490a53977b8951d84e65415e16fb858c96d03759baff"}},{"ruleId":"D1","level":"warning","message":{"text":"convert_gpu_weights.main (cyclomatic 21): convert_gpu_weights.main has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_gpu_weights.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"2880050a63274c3626d468883c411ed6abd0ab2ca245a7a35e1aa56a953128ce"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.prefill_and_generate_capture (cyclomatic 20): utils.prefill_and_generate_capture has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8150b0fdafca8a8195e618c327786bd2e6cd5606a8fb184391b2b424cc2461f"}},{"ruleId":"D1","level":"warning","message":{"text":"KExpertsCPU.load (cyclomatic 20): KExpertsCPU.load has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/experts.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"64bcb96d30ccd50283142ec2f88434ce59f4d5c3017be60d30d3a1e0793aeeba"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.move_non_experts_to_gpu (cyclomatic 20): arch.move_non_experts_to_gpu has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"72871bf022508e242228cd317037d886c9181e336570ad85fcafc1461a05d42a"}},{"ruleId":"D1","level":"warning","message":{"text":"checkpoint.save_full_weight_checkpoint (cyclomatic 20): checkpoint.save_full_weight_checkpoint has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/checkpoint.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8976b58202060102aaa9a8247d6adac624879967ed7898258cb19df53f971f"}},{"ruleId":"D1","level":"warning","message":{"text":"EphemeralKTWeightStore.cleanup (cyclomatic 20): EphemeralKTWeightStore.cleanup has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"918edde385b40488f7076953465ff4188364a81fb9111f3257bd883f1684d841"}},{"ruleId":"D1","level":"warning","message":{"text":"weights.get_kt_expert_placeholders (cyclomatic 20): weights.get_kt_expert_placeholders has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e4c8726ff67337dd4cde5374c152dfc3ab93a594f1c8d7ced5a5fee74664341"}},{"ruleId":"D1","level":"warning","message":{"text":"ConverterBase.convert (cyclomatic 20): ConverterBase.convert has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae41bd12bc4eb3359b4f79efd32c85ec6b04ff9a97a46e80be4bc93beeee39b4"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2ForCausalLM.prepare_inputs_for_generation (cyclomatic 19): DeepseekV2ForCausalLM.prepare_inputs_for_generation has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1777}}}],"partialFingerprints":{"codehealthFindingId/v1":"6508a5315e48f9baf857d96142d74e5819de4efaf6d36c0b5d9376e6571fe230"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2ForSequenceClassification.forward (cyclomatic 19): DeepseekV2ForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"17039d5d534ce23cd9e1c115916d9c0d0dc1c1effa4b41cabb4fe5813273008a"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3ForSequenceClassification.forward (cyclomatic 19): DeepseekV3ForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1844}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeacd7fb10e1c78a4f99c8a959cc094e0a1bda4d976647a78468a5c9746c0715"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaForSequenceClassification.forward (cyclomatic 19): LlamaForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50af4d5e737139e34070b57fbea1a1e0f2fdaf66f22668b513cf0b51ff28761"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralForSequenceClassification.forward (cyclomatic 19): MixtralForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"de7f5c2cd25e04974792c90159a9bc4a7a0cd39e92aa831aff0289a8786942ef"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeForCausalLM.prepare_inputs_for_generation (cyclomatic 19): Qwen2MoeForCausalLM.prepare_inputs_for_generation has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1473}}}],"partialFingerprints":{"codehealthFindingId/v1":"01574abb83270eaebdc1d2462f0c22874282a19fe59663224da08b0e2ecb2d60"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeForSequenceClassification.forward (cyclomatic 19): Qwen2MoeForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f33e88e4f931a2af6ce54355a4af05fd9886d068cc3f85ff2ef903e1b9ff1d7"}},{"ruleId":"D1","level":"warning","message":{"text":"merge_safetensor_gguf.write_combined_tensor (cyclomatic 19): merge_safetensor_gguf.write_combined_tensor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"531604ecda2c1d93c7a8f1b54a0f4d5527603f270a2b226f560c528454e97ee1"}},{"ruleId":"D1","level":"warning","message":{"text":"StaticCache.__init__ (cyclomatic 19): StaticCache.__init__ has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"496f0846dff3b2a2923f8c5c39711f73a31934421dc91d52e827b96008bf2f91"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2ForCausalLM.prepare_inputs_for_generation (cyclomatic 19): DeepseekV2ForCausalLM.prepare_inputs_for_generation has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1773}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddffc7128957eb0731d67d52a452f351965e2864ef19ecbd083d5afd668de51"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2ForSequenceClassification.forward (cyclomatic 19): DeepseekV2ForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5541fbb039181c2a03e008e193505de546c8e654b252891fa3aa170af0ee9b3"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3ForSequenceClassification.forward (cyclomatic 19): DeepseekV3ForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1858}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fc3ddeee71c710db6f012c85fef4a81a5a2cd7035b9a4b45e02693901726da"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaForSequenceClassification.forward (cyclomatic 19): LlamaForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8561d1c89b0ea97b980c3f779a7635e2d30568ab241c0867451080a81821625"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralForSequenceClassification.forward (cyclomatic 19): MixtralForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1562}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c10b368e93445a0a9d5c2ce8b04c996df581643c61ce55eadf0fcbea024438"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeForCausalLM.prepare_inputs_for_generation (cyclomatic 19): Qwen2MoeForCausalLM.prepare_inputs_for_generation has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1472}}}],"partialFingerprints":{"codehealthFindingId/v1":"3700295a37268dcf327413e8b06e473baec46e57a0f3093bafd580993cb83497"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeForSequenceClassification.forward (cyclomatic 19): Qwen2MoeForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3151cf3ea9591ca4d629020cdfbd789ea602193e8961c004c98c0847cf40ca"}},{"ruleId":"D1","level":"warning","message":{"text":"SmallthinkerModel._update_causal_mask (cyclomatic 19): SmallthinkerModel._update_causal_mask has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"0022681aa4a7007c7844ccece24b2b5e674e011499856dc4233fe4bb3199dd07"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.loop (cyclomatic 19): Engine.loop has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"522de4eecdbeef7bb5f60b498ea13f1c925d211d7564b30f884e3fb3231b9a79"}},{"ruleId":"D1","level":"warning","message":{"text":"merge_safetensor_gguf.write_combined_tensor (cyclomatic 19): merge_safetensor_gguf.write_combined_tensor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e4e61d346ff353d269e6ac63b03be39c327c5085f534664fe31962b7916b0ee"}},{"ruleId":"D1","level":"warning","message":{"text":"merge_safetensor_gguf_for_qwen3.write_combined_tensor (cyclomatic 19): merge_safetensor_gguf_for_qwen3.write_combined_tensor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd706902c4c54ca8cb6afa93ea9382ac46da393570c2568a45ed04bcd64ce55"}},{"ruleId":"D1","level":"warning","message":{"text":"model.info_model (cyclomatic 19): model.info_model has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1800}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e8ad799eb5d098288aa371d4ffeac843832383cd2ffd7c9caaa06e8c6183c1"}},{"ruleId":"D1","level":"warning","message":{"text":"run._build_sglang_command (cyclomatic 19): run._build_sglang_command has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"008922a470ebfdf62f8483911d64ac7942a54e86f6b3ef3b64ed98a5614b6472"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts.resolve_kt_pretrained_artifacts (cyclomatic 19): artifacts.resolve_kt_pretrained_artifacts has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"f050df075ca3dd9f0db6c2652170180309c6b1b00eaa6f63b12dac4cf130f85e"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._adapter_provenance (cyclomatic 19): artifacts._adapter_provenance has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1833}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9a5bc5b153f5102e3bc1cda684ea66cc4a47a6e9be8247e4bb67a9a25e19e5"}},{"ruleId":"D1","level":"warning","message":{"text":"deepseek_v4._validate_non_expert_cache (cyclomatic 19): deepseek_v4._validate_non_expert_cache has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"af67931de767a0124a401c8c94f73558286176d6928674226081f5c00a966fb8"}},{"ruleId":"D1","level":"warning","message":{"text":"deepseek_v4._ensure_non_expert_cache (cyclomatic 19): deepseek_v4._ensure_non_expert_cache has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d93880008065eae92c5713160da4533e90a88b6905492db1314556d90640270"}},{"ruleId":"D1","level":"warning","message":{"text":"lora.get_kt_named_trainable_params (cyclomatic 19): lora.get_kt_named_trainable_params has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b0298bb8063771ea98f73e0b63d2d9705f78c883c0df920d55deba6e381abd"}},{"ruleId":"D1","level":"warning","message":{"text":"GGUFLoader.get_model_config (cyclomatic 19): GGUFLoader.get_model_config has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c1030f02735c821afd321888669950cbcd918aba834c9b098483eb2d1e5946"}},{"ruleId":"D1","level":"warning","message":{"text":"check_cpu_features.main (cyclomatic 19): check_cpu_features.main has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/check_cpu_features.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"2497028952c42f181f217ec8cd46eccb1747ae0f0b6e00951d0c38959f9fc0eb"}},{"ruleId":"D1","level":"warning","message":{"text":"carriers.assemble (cyclomatic 18): carriers.assemble has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/carriers.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b740585ce87dfd3c8380a74bf22fed77f5f76f448288355b12594985d350c7d"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel.forward (cyclomatic 18): KLlamaModel.forward has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"146bd481bb6f7d225b04b90e74c9c3f00f5de0260201d979115dd3f3eed5e3f1"}},{"ruleId":"D1","level":"warning","message":{"text":"TransformersInterface.tf_logits_warper (cyclomatic 18): TransformersInterface.tf_logits_warper has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"9889405eb74a1b3109fc4e787abbe2065d6e317d55d6e830464d3c16a3deddb6"}},{"ruleId":"D1","level":"warning","message":{"text":"PeftModelForCausalLM.prepare_inputs_for_generation (cyclomatic 18): PeftModelForCausalLM.prepare_inputs_for_generation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a07d2ce3fdec9430e8ec3f1195922b2da78afc2d6045dd833b5374ed4850215"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.tf_logits_warper (cyclomatic 18): utils.tf_logits_warper has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"2325e00375d466b4d0d0cb93b0b5228b48b641e4172c6396359557f7e1535517"}},{"ruleId":"D1","level":"warning","message":{"text":"KDeepseekV2AttentionW8A8A2Serve.forward (cyclomatic 18): KDeepseekV2AttentionW8A8A2Serve.forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b48fd9c1e5ab3b10205cab02dfca0267711fe2fd3cc57a6e25d57a5a570b64"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel.forward (cyclomatic 18): KLlamaModel.forward has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e83d9ecc06217c0c2a6e853513ec79c860674ae6800170a2a0d19615a3c0086"}},{"ruleId":"D1","level":"warning","message":{"text":"TransformersInterface.tf_logits_warper (cyclomatic 18): TransformersInterface.tf_logits_warper has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c095b8bb38c71543d8b226f11216eae099c88849a24bec0abf9e9c4183db4ee"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.tf_logits_warper (cyclomatic 18): utils.tf_logits_warper has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"34585964beaaaca07a1f6f98b0819f813a08e43ebf8350755b7fbca5ea8dcdd1"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._validate_rawint4_base_identity (cyclomatic 18): artifacts._validate_rawint4_base_identity has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"046f7f00d168969498e221ec9bcbe7cded5a2eb332f4fa3c9d4a25fc895ca3e1"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._runtime_expert_weight_format (cyclomatic 18): artifacts._runtime_expert_weight_format has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"dffa63d2f6f5c314231915d32130710a52590c51a845ad9f6fed843fbc0df40b"}},{"ruleId":"D1","level":"warning","message":{"text":"lora.sync_kt_lora_gradients (cyclomatic 18): lora.sync_kt_lora_gradients has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"504280235672ad6a289e886602451d8e876fc83305688649c1eb0164f81234c8"}},{"ruleId":"D1","level":"warning","message":{"text":"ConverterBase._find_expert_layers (cyclomatic 18): ConverterBase._find_expert_layers has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"de391fcd243fcf0290ab3bf7e8661527379b00159c519a45cec99fdc98dbebed"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2Model._update_causal_mask (cyclomatic 17): DeepseekV2Model._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a00a69a3bd4eeb2a7dc43454be1ff10d294215b104196280e7a9cc3e7e5b07"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3Model._update_causal_mask (cyclomatic 17): DeepseekV3Model._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0e0b6535d11b3979c2fdc71a544a4096a2e250f4f0e72bdc1da10bad4f092a"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaModel._update_causal_mask (cyclomatic 17): LlamaModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"714fccb8c051007fdd80157cb6f70a934b017de20d368f3376c2f7ebea7c13ee"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralFlashAttention2.forward (cyclomatic 17): MixtralFlashAttention2.forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"594eee5276a56e3c9c215a0e188ccd7905ec645782d1c8ef4c359743c381cfca"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralModel._update_causal_mask (cyclomatic 17): MixtralModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1257}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0db9f024b0f7e62118ad9fc3b539c143104929cd375c733bf676b70d04e5056"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeFlashAttention2.forward (cyclomatic 17): Qwen2MoeFlashAttention2.forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"0edb8131e60ec31444878c13b9ff7e341c62cd0640c49f564514258bcd5138da"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeModel._update_causal_mask (cyclomatic 17): Qwen2MoeModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"51463888502cfb9245a9c8b09d5b9ac6b83538dc36cfda35eda3560585bc8d2b"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel._update_causal_mask (cyclomatic 17): KLlamaModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"21bea737ee980f7f7bf606630bf6a942e0681c0742eabdbe62914c46d86caf30"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.__init__ (cyclomatic 17): Engine.__init__ has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d9b0acaf428aab937648e2761f7111496c41ef5fc1da96ba1a01d6fa0b5cd8"}},{"ruleId":"D1","level":"warning","message":{"text":"peft_model.get_layer_status (cyclomatic 17): peft_model.get_layer_status has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1662}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3fd1fcadc66d4aa2074b49f3cd9906937a3810fd672e57dbca53f0327ffb66"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV2Model._update_causal_mask (cyclomatic 17): DeepseekV2Model._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e70f606944b67f7b2ba491b891ea9cfddd05314192a195b5e8cf0f0083f5281"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekV3Model._update_causal_mask (cyclomatic 17): DeepseekV3Model._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e63964b42661ca70f019a5f6323047c0c5c9f2b82efc9ebffb94b0a75cba43"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaModel._update_causal_mask (cyclomatic 17): LlamaModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"384e4733f59ab40d89496ccb6c8a46e7a66c76a46d8abef5699d58c6a88496a8"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralFlashAttention2.forward (cyclomatic 17): MixtralFlashAttention2.forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"013ed12d11ebaf75c63a7a65f32c9856515df2bfe0589b5a4ed059d95ce45504"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralModel._update_causal_mask (cyclomatic 17): MixtralModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"23025850968994864a2f6f2cd98b9c3dd57a6b237fc413bc36e3742f289ba147"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeFlashAttention2.forward (cyclomatic 17): Qwen2MoeFlashAttention2.forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"da28861ad1f4a10097881ebb39884be746e747d0cde78c71ad6634dae99c9a2f"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2MoeModel._update_causal_mask (cyclomatic 17): Qwen2MoeModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2de8a39e75fa81b3c6f70a74b13cf535d8460c6242dd70a14eb417140e66d81"}},{"ruleId":"D1","level":"warning","message":{"text":"KLinearTorchW8A8A2.load (cyclomatic 17): KLinearTorchW8A8A2.load has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_linear.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b3a7b65646c8bfd0c74a5b407f7866fcfee43f7325d4f12873bb75a59b5455f"}},{"ruleId":"D1","level":"warning","message":{"text":"KLlamaModel._update_causal_mask (cyclomatic 17): KLlamaModel._update_causal_mask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae28e692ef14ece4b21c52044171ef8afc9e5bee5cebb7bca84da69c6d2347a"}},{"ruleId":"D1","level":"warning","message":{"text":"VersionInfo.get_cpu_instruct (cyclomatic 17): VersionInfo.get_cpu_instruct has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0350e75ae8515605a64538c3409b043409ba8aec0107a38b354adb541f00ed4"}},{"ruleId":"D1","level":"warning","message":{"text":"environment.detect_cpu_build_features (cyclomatic 17): environment.detect_cpu_build_features has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"5db0d11242c5968e454961caecdbabf6151fc939ef63c88a37f1c64869715fbc"}},{"ruleId":"D1","level":"warning","message":{"text":"model_verifier.verify_model_integrity (cyclomatic 17): model_verifier.verify_model_integrity has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"39cbca6a75fad7373c1a8868ab77f9e4d8c022c53e9c53bec73410e555cb2335"}},{"ruleId":"D1","level":"warning","message":{"text":"run_interactive.select_model (cyclomatic 17): run_interactive.select_model has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb6b41f97164a1ea7707653c3eeb9e54a2958d740ad745d3c901b072b7e6c4f"}},{"ruleId":"D1","level":"warning","message":{"text":"AMXSFTMoEWrapper.init_lora_weights (cyclomatic 17): AMXSFTMoEWrapper.init_lora_weights has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"829946295ae61f69400455098ea3bdf56ddd95ee7ac718ddaa832b97970cc542"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts._runtime_rawint4_quantization (cyclomatic 17): artifacts._runtime_rawint4_quantization has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae0235bf7e3ad56e62ee76d7e6eabda70ee494815ebd62397146e95731ba597"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts.save_kt_adapter_artifacts (cyclomatic 17): artifacts.save_kt_adapter_artifacts has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1901}}}],"partialFingerprints":{"codehealthFindingId/v1":"79b1773feca1a03cb7a5a7580824ada953080ce05c1fdf352def4d7033012ba3"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.get_rawint4_checkpoint_contract (cyclomatic 17): backend.get_rawint4_checkpoint_contract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/backend.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14bd8ad8d079cd0d9b07bd11707f457f37d1d1967457636824e5aa2fb6b3d30"}},{"ruleId":"D1","level":"warning","message":{"text":"checkpoint._inspect_layer_shard (cyclomatic 17): checkpoint._inspect_layer_shard has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/checkpoint.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e51f853a485e8286d921b0249d7c39d35b9a959300c557d1c78a6af2ff42ff"}},{"ruleId":"D1","level":"warning","message":{"text":"lora.load_lora_experts_from_adapter (cyclomatic 17): lora.load_lora_experts_from_adapter has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c31669b76b4861dda507456350a6d717b65ebd8ce6800aebd91bcd368e47dd"}},{"ruleId":"D1","level":"warning","message":{"text":"convert_mxfp4_gguf._batch_main (cyclomatic 17): convert_mxfp4_gguf._batch_main has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b4c428a9966586360dd27e05b86b5fc1cf63664d0c8dba3ee155ea03641ef3"}},{"ruleId":"D1","level":"warning","message":{"text":"four_main.audit_wheels (cyclomatic 16): four_main.audit_wheels has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/four_main.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"0712e024e4b6b96021e20fefbfb1214c5fd4f47e2d8faafd104ce60f342256ca"}},{"ruleId":"D1","level":"warning","message":{"text":"KExpertsCPU.load (cyclomatic 16): KExpertsCPU.load has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"088cb72618a5739e4a29ee197a9fa43f3c044af07fe6c4c8f97b60f03f804858"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoaderFactory.create_loader (cyclomatic 16): ModelLoaderFactory.create_loader has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0327162d7a2a153bbe3e7a5c3f9dadf8e60368eeaa3154ef4408875ffd373e"}},{"ruleId":"D1","level":"warning","message":{"text":"VersionInfo.get_cpu_instruct (cyclomatic 16): VersionInfo.get_cpu_instruct has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02b173a70f8389abddef1ae7d0114c191a3fc1c0ab168cd98fc7bccd60bea58"}},{"ruleId":"D1","level":"warning","message":{"text":"KQwen3MoeSparseMoeBlockW8A8.forward (cyclomatic 16): KQwen3MoeSparseMoeBlockW8A8.forward has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_experts.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"498db8aa59e4f10d0e760d94dc59aeedaa01bb4886fe220bd99d0b77d57b35f2"}},{"ruleId":"D1","level":"warning","message":{"text":"KTransformersInterface.prefill (cyclomatic 16): KTransformersInterface.prefill has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"d33db7910f25c1c1e63b4558a37c78f65064a3029f65938aa1200684e451f07b"}},{"ruleId":"D1","level":"warning","message":{"text":"TransformersInterface.inference (cyclomatic 16): TransformersInterface.inference has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b7bf7aa88afd1e92e1d8f2b55ba2d432f57fab454bdeb5b9763d57212d73198"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoaderFactory.create_loader (cyclomatic 16): ModelLoaderFactory.create_loader has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5d452c47af084c35851e11ad43e0fa11472a804b22fd7bc215d8795312cc4f"}},{"ruleId":"D1","level":"warning","message":{"text":"model.remove_model (cyclomatic 16): model.remove_model has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1920}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c7e54f5d69e18cc68ac479d37ff260559b062fd9b575912cbe1be7ff07fbca"}},{"ruleId":"D1","level":"warning","message":{"text":"environment._parse_dmidecode_memory (cyclomatic 16): environment._parse_dmidecode_memory has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5e643c84846e6211f19659ec3250a49182309d092bc8385ace163f491af710"}},{"ruleId":"D1","level":"warning","message":{"text":"environment.scan_storage_locations (cyclomatic 16): environment.scan_storage_locations has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f9d2a9072c12ffccd494730fb5418b706f5fd687d582af6582516a47b1138eb"}},{"ruleId":"D1","level":"warning","message":{"text":"environment._detect_model_in_directory (cyclomatic 16): environment._detect_model_in_directory has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":929}}}],"partialFingerprints":{"codehealthFindingId/v1":"e192876ceb8431375081e2aa8c87ef34b00fad1e1310afd6237a3496cda21933"}},{"ruleId":"D1","level":"warning","message":{"text":"input_validators.prompt_int_list_with_retry (cyclomatic 16): input_validators.prompt_int_list_with_retry has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/input_validators.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2a74e7745616b0c3b9ae316a4bc988f08a3de4190c1ec7ac14ab4484f99ea9"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelRegistry.find_local_models (cyclomatic 16): ModelRegistry.find_local_models has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_registry.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"457e6368e554bd8707aca557e71fd1ced96e41702c62bf214cd350125ac85913"}},{"ruleId":"D1","level":"warning","message":{"text":"AMXSFTMoEWrapper._make_backward_task (cyclomatic 16): AMXSFTMoEWrapper._make_backward_task has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ef6d2dde02753768ebefa0847eb1a4f60186f0cee466ad929df7a8c33e0d6e0"}},{"ruleId":"D1","level":"warning","message":{"text":"lora._load_fused_expert_lora (cyclomatic 16): lora._load_fused_expert_lora has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1029}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f5a39e5a642fd62a263caecaed7c12163ea0d6258360747f7de3aae71da052"}},{"ruleId":"D1","level":"warning","message":{"text":"amx._select_gptq_int4_backend (cyclomatic 16): amx._select_gptq_int4_backend has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c204da8ef0c19251eae58819b3d74ebd6a5381094801f9299152f8f49eaaaa6"}},{"ruleId":"D2","level":"warning","message":{"text":"model.list_models (cognitive 320): model.list_models has cognitive complexity 320 (threshold 15). Drivers by points: if/else 63 (193 pts), loops 18 (58 pts), ternaries 9 (35 pts), error handling 7 (26 pts), boolean chains 8 (nesting depth added 215). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1a37f7b118ccdc301c79e16b2deefcc1af6074685feff17560bf45b72d6640d"}},{"ruleId":"D2","level":"warning","message":{"text":"wrapper.wrap_moe_layers_with_kt_wrapper (cognitive 282): wrapper.wrap_moe_layers_with_kt_wrapper has cognitive complexity 282 (threshold 15). Drivers by points: if/else 99 (163 pts), boolean chains 45, ternaries 16 (37 pts), error handling 13 (35 pts), loops 2 (nesting depth added 107). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"998c6bfe2223588e7c89af9311c848cb87071193844200b828d5fc0fd2c99dcd"}},{"ruleId":"D2","level":"warning","message":{"text":"model.edit_model (cognitive 271): model.edit_model has cognitive complexity 271 (threshold 15). Drivers by points: if/else 60 (164 pts), ternaries 13 (51 pts), loops 9 (30 pts), boolean chains 16, error handling 2 (10 pts) (nesting depth added 171). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1638b58093b4d8ad381b5c4e87bfba10b3e4e78a9ef43b5a731ee87cebf51b2"}},{"ruleId":"D2","level":"warning","message":{"text":"model.verify_model (cognitive 184): model.verify_model has cognitive complexity 184 (threshold 15). Drivers by points: if/else 44 (121 pts), error handling 6 (33 pts), loops 7 (20 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 120). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c62ddb7c628d235078713a7ee4d544aad63c23d1f57314d6a6fd4d9f48117f"}},{"ruleId":"D2","level":"warning","message":{"text":"KTConfig.__post_init__ (cognitive 156): KTConfig.__post_init__ has cognitive complexity 156 (threshold 15). Drivers by points: if/else 85 (126 pts), boolean chains 24, ternaries 3 (6 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"2370f22ae61dd3da3d5066982fd8c307c2e10ca98a758872d9399762778fc5fc"}},{"ruleId":"D2","level":"warning","message":{"text":"lora.kt_adapt_peft_lora (cognitive 128): lora.kt_adapt_peft_lora has cognitive complexity 128 (threshold 15). Drivers by points: if/else 26 (79 pts), loops 8 (21 pts), ternaries 3 (14 pts), boolean chains 10, error handling 1 (4 pts) (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4a61b5c88718e91a0fb463f37184bcfebdcd6413a7fd30331b845db444d4265"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoELayerWrapper._submit_and_compute_gpu (cognitive 124): KTMoELayerWrapper._submit_and_compute_gpu has cognitive complexity 124 (threshold 15). Drivers by points: if/else 31 (80 pts), error handling 9 (27 pts), ternaries 4 (9 pts), boolean chains 8 (nesting depth added 72). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"377ef85fd261211df9deb65c2280bd014296ad94bace2c6592f6f43a4ff3acd8"}},{"ruleId":"D2","level":"warning","message":{"text":"CMakeBuild._build_single_variant_impl (cognitive 106): CMakeBuild._build_single_variant_impl has cognitive complexity 106 (threshold 15). Drivers by points: if/else 51 (77 pts), ternaries 5 (13 pts), boolean chains 12, loops 3 (4 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"998522cd9031f5627d09fcc2bce0571f8ce5bd8e073043f76b6c6fe96d91cf5a"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat.local_chat (cognitive 97): local_chat.local_chat has cognitive complexity 97 (threshold 15). Drivers by points: if/else 44 (73 pts), error handling 3 (9 pts), loops 4 (9 pts), boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a2c8dcfc0e716d0027bd498f1594327dde7f84893bf873773aadbf371962de"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoEFunction.backward (cognitive 96): KTMoEFunction.backward has cognitive complexity 96 (threshold 15). Drivers by points: if/else 27 (51 pts), error handling 11 (29 pts), boolean chains 15, ternaries 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"277e086fdb10b881e87323fa5ff20a6d9d21b4834de9ce79600b18659b403549"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2Model.forward (cognitive 94): KDeepseekV2Model.forward has cognitive complexity 94 (threshold 15). Drivers by points: if/else 36 (56 pts), ternaries 13 (23 pts), boolean chains 10, loops 3 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4e2f9c2018f9a8fc3ab5ce3d68a58c964a1a9a870701f6a29dcc3fb7a077d7"}},{"ruleId":"D2","level":"warning","message":{"text":"main._show_first_run_setup (cognitive 91): main._show_first_run_setup has cognitive complexity 91 (threshold 15). Drivers by points: if/else 36 (70 pts), loops 4 (11 pts), error handling 3 (8 pts), ternaries 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/main.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2e7d39d4b32ef506afbb7215b7c3cb20baec2894cd22bc036e36a589f97671"}},{"ruleId":"D2","level":"warning","message":{"text":"quant.quant (cognitive 87): quant.quant has cognitive complexity 87 (threshold 15). Drivers by points: if/else 34 (60 pts), boolean chains 11, error handling 6 (9 pts), loops 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb461aa093472c6d9569d02ef5542136afd023404c476c97079c7971f4ed489"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.doctor (cognitive 86): doctor.doctor has cognitive complexity 86 (threshold 15). Drivers by points: if/else 38 (51 pts), ternaries 18 (24 pts), boolean chains 8, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/doctor.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"9313ea42dc62af74bb3943b41d1ae3a3bc0a5a83458a9fbc79f0daa54d911b3a"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2Model.forward (cognitive 85): KDeepseekV2Model.forward has cognitive complexity 85 (threshold 15). Drivers by points: if/else 32 (48 pts), ternaries 13 (23 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"873b2792af4fe08f74e2203c7f28c36f804299cff3cb49a5fa11a88894263848"}},{"ruleId":"D2","level":"warning","message":{"text":"KQwen2MoeModel.forward (cognitive 84): KQwen2MoeModel.forward has cognitive complexity 84 (threshold 15). Drivers by points: if/else 30 (45 pts), ternaries 15 (26 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c09a80acc0e1c8058e182b7cbdda7d679d12e75df0b049684f26f8f7374338a"}},{"ruleId":"D2","level":"warning","message":{"text":"KQwen2MoeModel.forward (cognitive 84): KQwen2MoeModel.forward has cognitive complexity 84 (threshold 15). Drivers by points: if/else 30 (45 pts), ternaries 15 (26 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"90246149508fb81ae52232c84b49c02b7df347c1cbc325296a657f5f77bac5e5"}},{"ruleId":"D2","level":"warning","message":{"text":"local_chat.local_chat (cognitive 83): local_chat.local_chat has cognitive complexity 83 (threshold 15). Drivers by points: if/else 30 (59 pts), ternaries 5 (11 pts), loops 3 (7 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/local_chat.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"6152160e648cb166adeaf42ad381eea139cdbfce0d52ac09940fbbf7c74c89b0"}},{"ruleId":"D2","level":"warning","message":{"text":"chat.chat_completion (cognitive 81): chat.chat_completion has cognitive complexity 81 (threshold 15). Drivers by points: if/else 25 (60 pts), boolean chains 11, loops 3 (6 pts), ternaries 2 (4 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed940a7fc31659dc920b74fd54d60dbc7766b753f241282847edd14ab5e597ca"}},{"ruleId":"D2","level":"warning","message":{"text":"chat.chat_completion (cognitive 81): chat.chat_completion has cognitive complexity 81 (threshold 15). Drivers by points: if/else 25 (60 pts), boolean chains 11, loops 3 (6 pts), ternaries 2 (4 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f838a7388d46ed043c5f164cb9ec9d323e65a38f4af463db6c85ecc1bd9d54d"}},{"ruleId":"D2","level":"warning","message":{"text":"model.download (cognitive 79): model.download has cognitive complexity 79 (threshold 15). Drivers by points: if/else 34 (55 pts), ternaries 4 (8 pts), boolean chains 6, error handling 5 (6 pts), loops 3 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e885182730a8ac915f61103e5a7a87e22959dc1458f016b7c57b3bb41f76b4a"}},{"ruleId":"D2","level":"warning","message":{"text":"run._run_impl (cognitive 76): run._run_impl has cognitive complexity 76 (threshold 15). Drivers by points: if/else 35 (62 pts), boolean chains 5, loops 1 (5 pts), error handling 2, ternaries 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"405fcf57666cc2cf7e0ef31ab08466c7b05e42720c1bd2e974747c564a711e54"}},{"ruleId":"D2","level":"warning","message":{"text":"OnlineQuantConverter._convert_layer_experts (cognitive 75): OnlineQuantConverter._convert_layer_experts has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (61 pts), loops 5 (13 pts), ternaries 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"9091985d18602006c38094e7f2b252424ffeae36c050d13ea9c244344bb0bbef"}},{"ruleId":"D2","level":"warning","message":{"text":"OnlineQuantConverter._convert_layer_experts (cognitive 73): OnlineQuantConverter._convert_layer_experts has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (56 pts), loops 6 (16 pts), ternaries 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f1e227378250cc7d9f11e09afdd25cb6aeccfd2b53a66e0a2be77ccd04e010"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.prefill_and_generate (cognitive 70): utils.prefill_and_generate has cognitive complexity 70 (threshold 15). Drivers by points: if/else 33 (48 pts), boolean chains 10, ternaries 4 (8 pts), loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b72cf6c7034d3c4595ac606ae663951d35845e74da6bc54c3e1b9739d742d9f"}},{"ruleId":"D2","level":"warning","message":{"text":"export_dsv4_sglang_adapter.export (cognitive 69): export_dsv4_sglang_adapter.export has cognitive complexity 69 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 14, loops 6 (7 pts), ternaries 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/export_dsv4_sglang_adapter.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"709d8f8ac59be24154b448abf4ddc32d748e4ceb6398a0a640479b50a3854021"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper.__init__ (cognitive 67): AMXSFTMoEWrapper.__init__ has cognitive complexity 67 (threshold 15). Drivers by points: if/else 31 (53 pts), boolean chains 14 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8866b21c469f53c986b3495b7285a0765601b41adbe688d6cc59e38282f39c5"}},{"ruleId":"D2","level":"warning","message":{"text":"weight_manifest._validate_layer (cognitive 65): weight_manifest._validate_layer has cognitive complexity 65 (threshold 15). Drivers by points: if/else 30 (54 pts), boolean chains 7, loops 3 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weight_manifest.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2ca13569a55c43fd90dca34deef6bcdf2d4f2f66fca9fbe7682208eb8c5e06"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.loop (cognitive 64): Engine.loop has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (41 pts), ternaries 2 (11 pts), loops 3 (8 pts), error handling 1 (4 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e3944ee508abb5c21bd4b51f71c197aa535c20715e23ed83f7f8f070252887"}},{"ruleId":"D2","level":"warning","message":{"text":"CMakeBuild.detect_cpu_info (cognitive 63): CMakeBuild.detect_cpu_info has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (55 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"7400c9b3e595f49c4fea613fb3e7ea761ce6058f24b2fa4da32a6e854ab5e832"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel.save_pretrained (cognitive 59): PeftModel.save_pretrained has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 4 (11 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad7b65bfcf196df9685b2abc49563f5d1381aed9a7409687b102b592b174acb"}},{"ruleId":"D2","level":"warning","message":{"text":"optimize.gen_optimize_config (cognitive 59): optimize.gen_optimize_config has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (32 pts), ternaries 6 (23 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/optimize/optimize.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90457134663b4f60f930db562461876e3853a052d8f0c84cf9152605c809b96"}},{"ruleId":"D2","level":"warning","message":{"text":"verify_mxfp4_gguf._set_main (cognitive 58): verify_mxfp4_gguf._set_main has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (37 pts), loops 4 (10 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d8bf4f60de2cc0760b0f71de5081fedce9d97bb83a466a033cfefe8c2210ca9"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.load_cur_state_dict (cognitive 57): utils.load_cur_state_dict has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 3 (8 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d09f4e13f67163027ad43a3e5372554f571d71879c5e0d98e4dd0d3b10429e"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelRegistry.find_local_models (cognitive 56): ModelRegistry.find_local_models has cognitive complexity 56 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 6 (19 pts), ternaries 2 (9 pts), boolean chains 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_registry.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d51d500dd74942ba822057a65f414642f1e4a2f79e8b98a2f6cb06771e55084"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.detect_cpu_info (cognitive 55): environment.detect_cpu_info has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 4 (9 pts), error handling 2 (7 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"858e77c547e58361c146e071ddf19b7b3bd8eb0b5673be2310ca83bc1f9ee754"}},{"ruleId":"D2","level":"warning","message":{"text":"KQwen3MoeModel.forward (cognitive 52): KQwen3MoeModel.forward has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (31 pts), ternaries 10 (11 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbb5542501d80abfad6a5493e52a99a1b401bb24c972ebda626ba98f3554f40c"}},{"ruleId":"D2","level":"warning","message":{"text":"optimize.gen_optimize_config (cognitive 52): optimize.gen_optimize_config has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (31 pts), ternaries 4 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bee3d8b6373cad2677d1850fac4315d4c8dfce6a9d35f4710675a81a90d4d4e"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel.from_pretrained (cognitive 52): PeftModel.from_pretrained has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (38 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1f75e92b686471c90f08731844e90ffbe5404e672ce47c2f0e2a67fae25482"}},{"ruleId":"D2","level":"warning","message":{"text":"model_table_builder.build_amx_table (cognitive 52): model_table_builder.build_amx_table has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (12 pts), ternaries 4 (8 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"66249109191f39e85e47cd2b79b2deb2419bc95e95a4bd442aa26e9868564bda"}},{"ruleId":"D2","level":"warning","message":{"text":"model_verifier.pre_operation_verification (cognitive 51): model_verifier.pre_operation_verification has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (36 pts), loops 4 (9 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5bf4e8472d1bb75a5bda6245bac6233201ac8cfbc2b36d4da0a353648cdd02f"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._inspect_cache_tensors (cognitive 51): artifacts._inspect_cache_tensors has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 8, loops 4 (7 pts), ternaries 3 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"9766a388127c34175eb0547866f1038a5fd88ea6b8cd29793795b2fbae2ee2cd"}},{"ruleId":"D2","level":"warning","message":{"text":"KTrainer.create_accelerator_and_postprocess (cognitive 50): KTrainer.create_accelerator_and_postprocess has cognitive complexity 50 (threshold 15). Drivers by points: if/else 27 (36 pts), boolean chains 9, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d29e0bb3fdbfe2fe87a0af079751c1f3c79c1846c9ccc0a6f279448cd715cfe"}},{"ruleId":"D2","level":"warning","message":{"text":"model_verifier.verify_model_integrity_with_progress (cognitive 50): model_verifier.verify_model_integrity_with_progress has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (36 pts), loops 4 (7 pts), boolean chains 3, error handling 2, ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08ee4689080fd3cb9980fd39405ebd1aa2c45589ffdd9192b33484a76580371"}},{"ruleId":"D2","level":"warning","message":{"text":"tuna_engine.test_config (cognitive 50): tuna_engine.test_config has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (30 pts), error handling 10 (18 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/tuna_engine.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"272cd096e194a67c361555d597aba816576b5576e0f035b06de79f6cae0f6004"}},{"ruleId":"D2","level":"warning","message":{"text":"chat.chat (cognitive 48): chat.chat has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (34 pts), error handling 5 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/chat.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc8bc3cb94c8594140594cb2e0797afc71cda2ae326401822f225883d39780c"}},{"ruleId":"D2","level":"warning","message":{"text":"sglang_checker.check_sglang_installation (cognitive 48): sglang_checker.check_sglang_installation has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 2 (6 pts), error handling 3 (5 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/sglang_checker.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e65e1fd5910e9edf1861ff58afa37d15ce6e2b2f0147951be0e69daec63a81"}},{"ruleId":"D2","level":"warning","message":{"text":"OnlineQuantConverter._load_layer_tensors_from_disk (cognitive 48): OnlineQuantConverter._load_layer_tensors_from_disk has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 4 (9 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"42dd15a26e3026339f1f880461eab0ac4f6d581cc1f8eaaf1e1f36852ace65c9"}},{"ruleId":"D2","level":"warning","message":{"text":"OnlineQuantConverter._load_layer_tensors_from_disk (cognitive 48): OnlineQuantConverter._load_layer_tensors_from_disk has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 4 (9 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"9546fb55a25aa31549a6d3f5f3bba583b747c33f0bf40b285cd0435fa3d185e5"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoELayerWrapper._forward_routed (cognitive 46): KTMoELayerWrapper._forward_routed has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 14, loops 2 (7 pts), ternaries 3 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"898c06f57a3c89f3805896998be89a899ae742b1336193df739db3806c8fd499"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticCache.__init__ (cognitive 45): StaticCache.__init__ has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 4 (13 pts), ternaries 4 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"c185841a779936d2ef10eefd100bc138481b808d5894cc2056a58230184534eb"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeModel.forward (cognitive 44): Qwen2MoeModel.forward has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 11 (15 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1115}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2a10d0b175fc952df44c65fa2d12dcb67f711f03c81cf2d504ec51a7d5e71d"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel._update_offload (cognitive 44): PeftModel._update_offload has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 7 (19 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"824729082a797df0ba6c2faf284b9043bb59e0905b2bb57a3ed51c4eb0b73761"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeModel.forward (cognitive 44): Qwen2MoeModel.forward has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 11 (15 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cee2c2badca6d1a71560c6de503a1fceddcfc99f3bc427edb13f3d4f86503de"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf_for_qwen3.write_combined_tensor (cognitive 44): merge_safetensor_gguf_for_qwen3.write_combined_tensor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 4 (6 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"2892b8533306c2bcb034a9d1db862756eeee7a2db65c85cfbfe9e2d0109d64b0"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoEFunction.forward (cognitive 44): KTMoEFunction.forward has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 5, error handling 2 (5 pts), ternaries 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d376cd8884528c9cfdfcf98a213300cf38091be63f7ae80e6904ecbfaf4491"}},{"ruleId":"D2","level":"warning","message":{"text":"wrapper.load_kt_model (cognitive 44): wrapper.load_kt_model has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 12, loops 1 (2 pts), ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd985f7e9cc4d837bb52f348e20e06ad7bf44e3d4d9c9f9636a34746b1bab1bc"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeMoEWrapper.load_weights (cognitive 44): NativeMoEWrapper.load_weights has cognitive complexity 44 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60d145ec26562ed61dddb87e8ee960bf40394457366167c188cad3e44eb440b"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralModel.forward (cognitive 43): MixtralModel.forward has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 11 (15 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06e11ffb43a1f6677b0b0e9cd8af4e0a9053a7b0d0f3073d4b299387415994f"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralModel.forward (cognitive 43): MixtralModel.forward has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 11 (15 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05cd2f13007e58abc5afb65e1b9692b1062b8b05cd216ca9877147db4c590e7"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2Model.forward (cognitive 42): DeepseekV2Model.forward has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fa76ebce7e35264c3db71e4bc44be5850de37d2bbed0182baf6e4ee2cf31305"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf.write_combined_tensor (cognitive 42): merge_safetensor_gguf.write_combined_tensor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 3 (9 pts), loops 4 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a526b3b0e2862611361229827d52fe1de32a5bd244aa8319297f2e60ff440fb"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2Model.forward (cognitive 42): DeepseekV2Model.forward has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1423}}}],"partialFingerprints":{"codehealthFindingId/v1":"476b568df6c2c21eaef5c3ec168805c2b55b3e6c357a2100451bb1649a8cc847"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf.write_combined_tensor (cognitive 42): merge_safetensor_gguf.write_combined_tensor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 3 (9 pts), loops 4 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"152891202f67e1eefbbae7d9a87531d49c08ec4dc82bdd035362831e19bd8201"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper.load_weights (cognitive 42): AMXSFTMoEWrapper.load_weights has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (33 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a03758f772ac7b9b5c4a27c11c12d8a71a496808a6421221ff76503cbec2e6"}},{"ruleId":"D2","level":"warning","message":{"text":"FP8SafeTensorLoader._detect_format (cognitive 42): FP8SafeTensorLoader._detect_format has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 7, ternaries 2 (6 pts), loops 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"814cde957743ad2d84cac9251cef78b7cead2c85f3b428b1fe66a7670e2d7c5c"}},{"ruleId":"D2","level":"warning","message":{"text":"GGUFLoader.get_model_config (cognitive 42): GGUFLoader.get_model_config has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (26 pts), ternaries 4 (12 pts), loops 4 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f89cbdcee61fd9390b771064d71094475d5fb788c0c77630cbb3d539e3476e4"}},{"ruleId":"D2","level":"warning","message":{"text":"_cpu_detect.detect_cpu_features (cognitive 41): _cpu_detect.detect_cpu_features has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 4 (6 pts), error handling 3 (4 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/_cpu_detect.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d812944ae66d26f8580ee5959d7da745936c7472fb145156db59f066d252fe"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpoint.save_full_weight_checkpoint (cognitive 41): checkpoint.save_full_weight_checkpoint has cognitive complexity 41 (threshold 15). Drivers by points: error handling 7 (20 pts), if/else 8 (14 pts), loops 4 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/checkpoint.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a87d4149e8a9f348db67e520069675f685206693bdfadb0b8d83511b598eacd"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.__init__ (cognitive 40): Engine.__init__ has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f88a7461553fe349392b0e1f240818cf2e0a5ad4e615ce3fd7288933b39d56e"}},{"ruleId":"D2","level":"warning","message":{"text":"model_scanner.find_model_roots_from_paths (cognitive 40): model_scanner.find_model_roots_from_paths has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 8 (10 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"b65b72132166a73688128d7a00cfcab9426889fe7f5fb7df8ab67315eb430b89"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase._find_expert_layers (cognitive 40): ConverterBase._find_expert_layers has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 9 (14 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2e0c3df5691c4489bfb19111696b4e08818def0226c65ce2962252ccce4a53"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase.convert (cognitive 40): ConverterBase.convert has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 6 (13 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9195f61dfdb0f3f3dc084a75e722005c3569e6a69c71b44ec4715614edba64f"}},{"ruleId":"D2","level":"warning","message":{"text":"peft_model.get_layer_status (cognitive 39): peft_model.get_layer_status has cognitive complexity 39 (threshold 15). Drivers by points: loops 8 (26 pts), if/else 7 (12 pts), boolean chains 1 (nesting depth added 23). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1662}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba4bebe6b33e864468876a57caf40e959e598b85fd1190428367de17e5662e3c"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoELayerWrapper.__init__ (cognitive 39): KTMoELayerWrapper.__init__ has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, ternaries 3 (6 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"56bf913489008999dbae93e99c3140c58b3755ed26f174fe6fefb1ef73785914"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase.convert (cognitive 39): ConverterBase.convert has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 6 (13 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"c376669f6fce87494c033133cb5710f600aef7ac5b66c17390a31299b10fdf67"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Model.forward (cognitive 38): DeepseekV3Model.forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1390}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fbbe8facc894a5060330e21b5e58f710887032c47e90009adade571f5f5c66"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Model.forward (cognitive 38): DeepseekV3Model.forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f9a1802f4d3c7945c3fee1baf52bfcf730ebb88e4a104c41fe7e31a4484a61"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoELayerWrapper._compute_routing (cognitive 38): KTMoELayerWrapper._compute_routing has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 4, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"729427a795aac1fead2e7141b9754296732ebad83c3c234702584bd6c2d68622"}},{"ruleId":"D2","level":"warning","message":{"text":"weights.load_experts_from_checkpoint_files (cognitive 38): weights.load_experts_from_checkpoint_files has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a92642df51fe6640c244db04d95a61461cef159f5d658ee7a7f7929f2eb580"}},{"ruleId":"D2","level":"warning","message":{"text":"SmallthinkerModel.forward (cognitive 37): SmallthinkerModel.forward has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 10 (15 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"acaab087b17c6ee43e8cf2135ba83fb947f3028e2abb8a1910147efa734436f0"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV3MoEW8A8.forward (cognitive 37): KDeepseekV3MoEW8A8.forward has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 4 (13 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_experts.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"67bc6b1f263bec4e7783aa2706178488241364a7573cd727276a84975d5b466f"}},{"ruleId":"D2","level":"warning","message":{"text":"optimize.inject (cognitive 37): optimize.inject has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 3 (16 pts), loops 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/optimize/optimize.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51a4f80c91fe3dda582ec2cc1c226782c9422ed104381e0b0e2b94513195a32"}},{"ruleId":"D2","level":"warning","message":{"text":"model.info_model (cognitive 37): model.info_model has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 4 (9 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1800}}}],"partialFingerprints":{"codehealthFindingId/v1":"488ba0c8e03909251072636ca3d9d71b1774f029cdd05c68868ba233f3e68ba3"}},{"ruleId":"D2","level":"warning","message":{"text":"lora.sync_kt_lora_gradients (cognitive 37): lora.sync_kt_lora_gradients has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f2de57eaa3ae13ae5f217708d63bb0bc76099e4f480324b8278a58b89785cf"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaModel.forward (cognitive 36): LlamaModel.forward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"d955792844438e658b0c4de50fd3ac7c0b77382b03ffb8f07ed3d5c59ea121f0"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaModel.forward (cognitive 36): LlamaModel.forward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c094de997237babfcfc497ebc3d53dc837ca788ef462922d9605b1b3e1b2a9"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_gpu_weights.main (cognitive 36): convert_gpu_weights.main has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_gpu_weights.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8ce83a22005a54e11dca890de11853a4723c5e8358d54b7e9654d6b929654d"}},{"ruleId":"D2","level":"warning","message":{"text":"Linear.merge (cognitive 35): Linear.merge has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (KTransformersLinearLora.merge) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1f5ecd00fcc94b06d68747de5a812b452f55886e28370ed3ed145f204ed73f"}},{"ruleId":"D2","level":"warning","message":{"text":"KTransformersLinearLora.merge (cognitive 35): KTransformersLinearLora.merge has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (Linear.merge) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"16da0a89ae7e5bfd6ce26f9ab94710579cb0f7c90f221177fa2f30fef34b0fe7"}},{"ruleId":"D2","level":"warning","message":{"text":"run_interactive.select_model (cognitive 35): run_interactive.select_model has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 4 (9 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"16459285769c8aefae9303b19b8e01becdf8c5243d697174515db190a4fabe8e"}},{"ruleId":"D2","level":"warning","message":{"text":"EphemeralKTWeightStore.cleanup (cognitive 35): EphemeralKTWeightStore.cleanup has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 3 (8 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"623cbc26a549a6108127fbc08cd5abaaef41244337053e953354a255933eed05"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase._find_expert_layers (cognitive 35): ConverterBase._find_expert_layers has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 6 (8 pts), boolean chains 3 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"325facd10334a4f3d677fc479edf3a3846e51b87489441c615fcace13bbdb7d5"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2AttentionW8A8A2Serve.forward (cognitive 34): KDeepseekV2AttentionW8A8A2Serve.forward has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"702b511e2894681ef4b8aac082cc80ef5f6105667373a87f5ed859588d43167a"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.detect_cpu_build_features (cognitive 34): environment.detect_cpu_build_features has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"140a0646b26356b8496a1ddaa63446c5d3b2dfc34467b373a08e266f38757fc7"}},{"ruleId":"D2","level":"warning","message":{"text":"KTConfig._from_object (cognitive 34): KTConfig._from_object has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 4 (8 pts), boolean chains 2, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dee372d127558b71ecb5d15994f16000609b4c69b0be20d9bb2c3bdc8f7a7b3"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_v4.inspect_native_checkpoint (cognitive 34): deepseek_v4.inspect_native_checkpoint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 9, loops 5 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f499991be945895c75bac29e39343de703f647191549e608199cb09101e7f0b"}},{"ruleId":"D2","level":"warning","message":{"text":"weights.load_block_fp8_experts_from_checkpoint_files (cognitive 34): weights.load_block_fp8_experts_from_checkpoint_files has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 7 (10 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"f714053cb857e40138de7d9bc2c3c8a3902a81dab705d7e790b3affb8a9e6b24"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.move_non_experts_to_gpu (cognitive 33): arch.move_non_experts_to_gpu has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcf4963cb0d71d5886c5f86d29b8b5ae790c25f98b0d118175932319621a023"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCoordinator.broadcast_tensor_dict (cognitive 32): GroupCoordinator.broadcast_tensor_dict has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 16). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0fbca60cb5d2aeabbeb2060488e31c1470a0a17d826ee05fd3aa5e2094c38f"}},{"ruleId":"D2","level":"warning","message":{"text":"CMakeBuild.build_extension (cognitive 32): CMakeBuild.build_extension has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 3, ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5aa6e922c54a135dcd6d7a05b0d34d9c6992a559058e00e371a429786f44e7b"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCoordinator.broadcast_tensor_dict (cognitive 32): GroupCoordinator.broadcast_tensor_dict has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 16). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"e698bd98232c1720843b777b33c15799ea2f5ca7707fa6eda651352ec2422396"}},{"ruleId":"D2","level":"warning","message":{"text":"CMakeBuild.build_extension (cognitive 32): CMakeBuild.build_extension has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 3, ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ae5cf93ffa57f97dbc43578bc5e26a06c395e69c078592fba13d069b1b5ce4"}},{"ruleId":"D2","level":"warning","message":{"text":"SafeTensorLoader._load_tensor_file_map (cognitive 31): SafeTensorLoader._load_tensor_file_map has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (9 pts), loops 3 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"024a4c65c3a0efe458ae13b8106bb815d5af107524ddf8db347ee7507d9e241f"}},{"ruleId":"D2","level":"warning","message":{"text":"KQwen3MoeSparseMoeBlockW8A8.forward (cognitive 31): KQwen3MoeSparseMoeBlockW8A8.forward has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 3, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_experts.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b9226b960bf38277e75f4735a253c2580fdf48247edb6676eb0a2a43ec7b87"}},{"ruleId":"D2","level":"warning","message":{"text":"SafeTensorLoader._load_tensor_file_map (cognitive 31): SafeTensorLoader._load_tensor_file_map has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (9 pts), loops 3 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/weight_loader.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"693db24936b85119baaf43f884c72a74c12688ffd852f21172c05e9fa1a51352"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.scan_storage_locations (cognitive 31): environment.scan_storage_locations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), error handling 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b50b9ef1d02e81b79c8bd33e10d6926ca73bfa312fde2f8bcfdf57c757cbf52"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._validate_non_expert_cache (cognitive 31): artifacts._validate_non_expert_cache has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"14148dabd1004cd455a59c1be26f0468343bc9f939dfd7bf0a4c75a0be36e01e"}},{"ruleId":"D2","level":"warning","message":{"text":"SafeTensorLoader.__load_tensor_file_map (cognitive 31): SafeTensorLoader.__load_tensor_file_map has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (9 pts), loops 3 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"42aed6d0ccc78aa5f33db9765645845e4ef6b2ccc18fe8abe234c2ec70427820"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticCache.__init__ (cognitive 30): StaticCache.__init__ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3 (7 pts), ternaries 4 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c094ac91e69ee921e8fec31088c4179836ad0a5fcf8426601b55867faadd30bc"}},{"ruleId":"D2","level":"warning","message":{"text":"LoraModel._replace_module (cognitive 30): LoraModel._replace_module has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (12 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"5970412b2b1924001a5f01fd74934b9d5f713eda502a877e7e3451e7136d4e83"}},{"ruleId":"D2","level":"warning","message":{"text":"SafeTensorLoader.__load_tensor_file_map (cognitive 30): SafeTensorLoader.__load_tensor_file_map has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (9 pts), loops 3 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f56f39a4a840630b55e9213f56237bb34a57e8300267714a2c9ade105ec41308"}},{"ruleId":"D2","level":"warning","message":{"text":"KExpertsCPU.load (cognitive 30): KExpertsCPU.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/experts.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5aa0c51cb025764adc4be24f85fefd5375ccb6818def301fc710be929b95b6"}},{"ruleId":"D2","level":"warning","message":{"text":"SafeTensorLoader.__load_tensor_file_map (cognitive 30): SafeTensorLoader.__load_tensor_file_map has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (9 pts), loops 3 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"47bdb719c6f22a806f096312f2dda77fc3f874315d47c1d07df8db181874fdee"}},{"ruleId":"D2","level":"warning","message":{"text":"chat._stream_response (cognitive 30): chat._stream_response has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/chat.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81163bbaa94c4743bbb0e79ad7b6639ccf07c643923af79ddd49e1f624ac1a3"}},{"ruleId":"D2","level":"warning","message":{"text":"run._build_sglang_command (cognitive 30): run._build_sglang_command has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"75bef257339f8f44a89bcea0e55c444113e99c664de8c51e43fa0e3a22c020de"}},{"ruleId":"D2","level":"warning","message":{"text":"run_interactive.interactive_run_config (cognitive 30): run_interactive.interactive_run_config has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 1 (4 pts), loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"5585a6588d43b1c4179b35c1226a28812c4294fd56c5180c1400346766b96f48"}},{"ruleId":"D2","level":"warning","message":{"text":"lora.get_kt_named_trainable_params (cognitive 30): lora.get_kt_named_trainable_params has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"355e878bbb031e252eb6ce19b3bc0f225f94867dc141313faa1bed2f8c0d461a"}},{"ruleId":"D2","level":"warning","message":{"text":"lora.load_lora_experts_from_adapter (cognitive 30): lora.load_lora_experts_from_adapter has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7cd864970248d6c579f4fdfb3f831dfc9265469ded634e358ac79d497a18a7c"}},{"ruleId":"D2","level":"warning","message":{"text":"KLinearTorchW8A8A2.load (cognitive 29): KLinearTorchW8A8A2.load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_linear.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ceb0858b5b95b7aa372fcb028676cbc5b43431a2a50d5f7d3636d89c54b70e"}},{"ruleId":"D2","level":"warning","message":{"text":"VersionInfo.get_cpu_instruct (cognitive 29): VersionInfo.get_cpu_instruct has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"590613d606eba3de817321c3b56221f0648b6fb2a61f0958bcee5ee68c4d26b6"}},{"ruleId":"D2","level":"warning","message":{"text":"model.remove_model (cognitive 29): model.remove_model has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1920}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19bfbd4b09041779138b736452ddef311189ca5d0de92de5e473824035f0b0e"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._validate_adapter_manifest (cognitive 29): artifacts._validate_adapter_manifest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 8, loops 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1973}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6062b2766e51f027f916c9975d9ee7dbc11555758cbeda7e1e2acbdb9d2cdb2"}},{"ruleId":"D2","level":"warning","message":{"text":"weight_manifest.validate_persistent_int8_weights (cognitive 29): weight_manifest.validate_persistent_int8_weights has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 3, loops 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weight_manifest.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8acae5a175c92b8e94210c7574a9c0df5d4d8f4a5ca0a377e2709423e2d3b15"}},{"ruleId":"D2","level":"warning","message":{"text":"AWQToColumnMajorConverter._convert_layer_experts (cognitive 29): AWQToColumnMajorConverter._convert_layer_experts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), ternaries 2 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"935b57fe78b5b5eb3bb5927a05f1b141640a8b6b75c066a0767981baf7851b8d"}},{"ruleId":"D2","level":"warning","message":{"text":"AWQToColumnMajorConverter._convert_layer_experts (cognitive 29): AWQToColumnMajorConverter._convert_layer_experts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), ternaries 2 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf649bb2d04ed1e181b58a121b4438b2c6b3168d8a26f8c5958d3d3a026735a"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2ForCausalLM.prepare_inputs_for_generation (cognitive 28): DeepseekV2ForCausalLM.prepare_inputs_for_generation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1777}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a530bcb970ce2b4bbe404e10287ab50f45d5a4e8144c6e1d9fb59f2fac9e5f"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeForCausalLM.prepare_inputs_for_generation (cognitive 28): Qwen2MoeForCausalLM.prepare_inputs_for_generation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1473}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d19d2c0997c37d9d87f0edc9a7793c8485afbe6eb8b3e290b60cae3b1334f57"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel.forward_chunk (cognitive 28): KLlamaModel.forward_chunk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 8 (10 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"53931ca861d25de8686654e4b6d751f3552e792f5a36af828f2955038837a3e9"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.prefill_and_generate (cognitive 28): utils.prefill_and_generate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d8fbfbd6733acfa96b87e16a83ed8010dfa21a9eae867102a03e5b262a0ba6"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2ForCausalLM.prepare_inputs_for_generation (cognitive 28): DeepseekV2ForCausalLM.prepare_inputs_for_generation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1773}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b46f778d56b17598f9758a6691e5fc072c6355bc8f0e60d0b86174139f2f530"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeForCausalLM.prepare_inputs_for_generation (cognitive 28): Qwen2MoeForCausalLM.prepare_inputs_for_generation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1472}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b03a1abe463141a4630afc4e26f6c8ad1008fc918fdaad961f00a5daf29125"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel.forward_chunk (cognitive 28): KLlamaModel.forward_chunk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 8 (10 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27bb55000ba5b602117662a95cec62312c2de68b7de7702088ef93bc6d2132e"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._validate_rawint4_base_identity (cognitive 28): artifacts._validate_rawint4_base_identity has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2da7e916e25643e195a9a9dfd0e1d0f838ffbe260dcd6385bcacc0452eff4a0"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.loop (cognitive 27): Engine.loop has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (4 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d1c0dff1ffb24e55b27160e61fcab2957f05965ac8bd052056ff9710458a789"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.prefill_and_generate_capture (cognitive 27): utils.prefill_and_generate_capture has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"c05fa91e3587cd17755b933288981d8ba9880983720cc226ca05ecabdf98349e"}},{"ruleId":"D2","level":"warning","message":{"text":"VersionInfo.get_cpu_instruct (cognitive 27): VersionInfo.get_cpu_instruct has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"195fb3ecbf6c7a911aec37304ccbf45767be3c2c7e3f3706c8904b0e547de2c0"}},{"ruleId":"D2","level":"warning","message":{"text":"model_discovery.format_discovery_summary (cognitive 27): model_discovery.format_discovery_summary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_discovery.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"10ddeabc6da1e50c6c04b11bc7a15175cd957eaca0315079831a32adb98672e8"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper.init_lora_weights (cognitive 27): AMXSFTMoEWrapper.init_lora_weights has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5dfc156df6ce8f49c08fb3ce20a5cb962b034bbb64612255bc8c611f0c4d081"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.project_kt_routed_experts_out_of_device_map (cognitive 27): artifacts.project_kt_routed_experts_out_of_device_map has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 5 (10 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1446}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d39b9a9e52c910622971c0e65e1df6f91456086bf049203232caf11f7e9c1ed"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeMoEWrapper.__init__ (cognitive 27): NativeMoEWrapper.__init__ has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 11, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"627d79861f76f021d6f1c2fd9053721d04397627b4503941cf25335cb7721ef8"}},{"ruleId":"D2","level":"warning","message":{"text":"check.write_combined_tensor (cognitive 27): check.write_combined_tensor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (6 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/check.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebc7b9a77170760078007a4d1f775084850c584d54e4093bf1c7bbb1ecb3a9c"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_torch_attn.forward (cognitive 26): deepseek_torch_attn.forward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"6352760eb822c6fb18200f78439407f56340c682d3761762b19fe0986dc0cbdf"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel._setup_prompt_encoder (cognitive 26): PeftModel._setup_prompt_encoder has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"62fa0de07bd020fb561bda25b78925c39e21b4a31549116916c9681d6cc4938e"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModelForCausalLM.prepare_inputs_for_generation (cognitive 26): PeftModelForCausalLM.prepare_inputs_for_generation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"a16d4d3da52e44ff8bf6514f1a1f8337d5cbff26027d815883bf90053d5e7d23"}},{"ruleId":"D2","level":"warning","message":{"text":"SmallthinkerModel._update_causal_mask (cognitive 26): SmallthinkerModel._update_causal_mask has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d2325aa1342db436ec0269b35c34a153902771be2e4915f11247a52b92a6b3"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_torch_attn.forward (cognitive 26): deepseek_torch_attn.forward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"234a4db58d532e508f2a26abd1821aebdbb561f766db6b02e1fd3a2c7df73720"}},{"ruleId":"D2","level":"warning","message":{"text":"KLinearBase.load_weight (cognitive 26): KLinearBase.load_weight has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/linear.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f51991bf35820a6455fa3e48f9e9b984c73c63bdb742cc27c45e7e9d707252"}},{"ruleId":"D2","level":"warning","message":{"text":"TransformersInterface.inference (cognitive 26): TransformersInterface.inference has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa3fb093509fcd7d8d5397e672f86afa961c8d02d2469bff1447bac54c03af1"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.validate_kt_pretrained_load (cognitive 26): artifacts.validate_kt_pretrained_load has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f489dc0f2d6e45219044960ab443d93c791653157fc324ed17f12d98a4bb27"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._runtime_rawint4_quantization (cognitive 26): artifacts._runtime_rawint4_quantization has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"391fa9013770fc9bde16475446849037a5b57bbe7a279a1fe277c21c573c3582"}},{"ruleId":"D2","level":"warning","message":{"text":"ephemeral._scan_layer (cognitive 26): ephemeral._scan_layer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"784f660bc0a3664f91d61a7736b926d033fc8f5afd24aff270d33cc7c0190d04"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_mxfp4_gguf._batch_main (cognitive 26): convert_mxfp4_gguf._batch_main has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"398b17ba1e341dd09c94ab92fba378fb0a29ca17eb97e3033d3269dd2b0431c8"}},{"ruleId":"D2","level":"warning","message":{"text":"copy.copy (cognitive 26): copy.copy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). Of this number, 20 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/utils/copy.ts"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd827024a4ce17aa1a5f460f2319341121afcadbc25b7271b3dcfa2904abede"}},{"ruleId":"D2","level":"warning","message":{"text":"copy.copy (cognitive 26): copy.copy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). Of this number, 20 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/utils/copy.ts"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1467e5e0e739da75e736b8e8f5c6f99e2c0c1946c13182c8eb4f9ab7d3fbfe6"}},{"ruleId":"D2","level":"warning","message":{"text":"four_main.audit_wheels (cognitive 25): four_main.audit_wheels has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/four_main.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3c3c405137da70e7db02b41db0faed3218ed0e55d06d8f7ceca92a6df4b4f5"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2ForSequenceClassification.forward (cognitive 25): DeepseekV2ForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1af0b685f99574b586902a4e1f9b4d5f907b5896011f131d2ed5a13cbcf739"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3ForSequenceClassification.forward (cognitive 25): DeepseekV3ForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1844}}}],"partialFingerprints":{"codehealthFindingId/v1":"86fafd8d84aef0bb2cbf9fd54d1f54fc3ab1d5a74cf9a19a31e5475d16ae4e61"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaForSequenceClassification.forward (cognitive 25): LlamaForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5482e9f213627f6236e2cec8e05292fa1dde9a8468b4e8cd510a408df52a85"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralForSequenceClassification.forward (cognitive 25): MixtralForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c1b91d74903257fb8508568fad609bb35784b9adde4a0aa037f4f09a286148"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeForSequenceClassification.forward (cognitive 25): Qwen2MoeForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b25a50e87a9b84a0be31213c598ebc8f3ad5d04f8bd7e94ff20182a7756bdad"}},{"ruleId":"D2","level":"warning","message":{"text":"optimize.inject (cognitive 25): optimize.inject has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 2 (10 pts), loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f0db6833b019a5919f356302fb255e11db32c8e1ec897f47734e49a3370ed3"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2ForSequenceClassification.forward (cognitive 25): DeepseekV2ForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2cd7a61313c8cc0c2272f3c52041cd7331440101f7275ed7bef780c053ee952"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3ForSequenceClassification.forward (cognitive 25): DeepseekV3ForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1858}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec042139538cc2430641a9e5fdc5700bc8af74b85816a97bd0f123f431138139"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaForSequenceClassification.forward (cognitive 25): LlamaForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"306e337e2947376fe585c5715c48cc8895a5ac0a46e16a11384d7c1f1bf3e324"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralForSequenceClassification.forward (cognitive 25): MixtralForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1562}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5687c0412022645560a4e85bf6e207d9ac22ce4f44551e3319deed36d3da32"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeForSequenceClassification.forward (cognitive 25): Qwen2MoeForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a7f669200f9df14f9153b08cb544da9ab64015f61e75484156b1b92ede6f792"}},{"ruleId":"D2","level":"warning","message":{"text":"model.refresh_models (cognitive 25): model.refresh_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1991}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86ccc40edc88f20f76c901b170829a81728a8494da61efcf48cff8ddeedf78c"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.detect_cuda_version (cognitive 25): environment.detect_cuda_version has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (5 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"411644ede48dc68ea989d1466b5251226f1bd64ba5edeba2c7710db2a5848d96"}},{"ruleId":"D2","level":"warning","message":{"text":"repo_detector.extract_repo_from_frontmatter (cognitive 25): repo_detector.extract_repo_from_frontmatter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fc36f7c2b2ac8e1f9534ef0f9ad0a1be529c1309aade1e50e53ac8f4d30565b"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._runtime_expert_weight_format (cognitive 25): artifacts._runtime_expert_weight_format has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2869f0fb190e2fb7191af39ba2496618df1d1eb6e1bfcb3742b99191043585"}},{"ruleId":"D2","level":"warning","message":{"text":"weights.get_kt_expert_placeholders (cognitive 25): weights.get_kt_expert_placeholders has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"b754ec81b8b5c928312fd094116c63eb639380e7579bf1dc7099000eac33276e"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase._load_input_files (cognitive 25): ConverterBase._load_input_files has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"b731d2892c38db4f013fdd128ffa329e1d8e9a854eed63bcc150b2cc50c35672"}},{"ruleId":"D2","level":"warning","message":{"text":"ConverterBase._load_input_files (cognitive 25): ConverterBase._load_input_files has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d5edca16c4f5fdbcd0d0706cb2aa5553d9bfffcb3afb34ff70571a6152020f"}},{"ruleId":"D2","level":"warning","message":{"text":"carriers.assemble (cognitive 24): carriers.assemble has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 8 (9 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/carriers.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0dec3a977b01134e4a162f77b95143caba8e100687cd86430e0161aa872d52"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2Model._update_causal_mask (cognitive 24): DeepseekV2Model._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6ad1c967e840cb2904462029522c6e3fd7eb1f5bd991c892e729e44c142d84"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Model._update_causal_mask (cognitive 24): DeepseekV3Model._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc4366850be3b71248f086d9ab21a431b6700601c18ad0031d458a142335af66"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaModel._update_causal_mask (cognitive 24): LlamaModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"1343a78183752ff76507cbd4e93242e035fc072ae6fbc8cc640e4e4562913cf7"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralFlashAttention2.forward (cognitive 24): MixtralFlashAttention2.forward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e338afe2c8ff2826a372c310aab17c249f9d5da2cface7dc8ea1bb40ed48977"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralModel._update_causal_mask (cognitive 24): MixtralModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1257}}}],"partialFingerprints":{"codehealthFindingId/v1":"237e5823870409ffb82efe19aa43c5e8f85e00a0d040a5dfb1212114fde65790"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeFlashAttention2.forward (cognitive 24): Qwen2MoeFlashAttention2.forward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"609af820e94945f45999896e57e96051328ea36c58e1b8e0c5a0c83d4d6c149a"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeModel._update_causal_mask (cognitive 24): Qwen2MoeModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"c713ce2b744d126cb0c6733720aadb97a22d298fa65dd9ba51230e300eec334b"}},{"ruleId":"D2","level":"warning","message":{"text":"DynamicScaledDotProductAttention.get_preselect_block_table_and_attn_score (cognitive 24): DynamicScaledDotProductAttention.get_preselect_block_table_and_attn_score has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5936fe2fb5834b0e11fc186ece7d56e7c551660a0e66babe7fb68925851b4f5"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel._update_causal_mask (cognitive 24): KLlamaModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6514e006ecdbeafe70e7591a87a19b4e0aa3dd40131f113d9c8cbf26394b7e1"}},{"ruleId":"D2","level":"warning","message":{"text":"LoraModel._mark_only_adapters_as_trainable (cognitive 24): LoraModel._mark_only_adapters_as_trainable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a4365bb5083c6c88b8b21bc43962560029ce3b67aad0bbde68e27df6d44e5b"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoaderFactory.create_loader (cognitive 24): ModelLoaderFactory.create_loader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e20057754c613197f23baf4f5722ca0a66a241ca9a4d687c0acfbea70c1d01a"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV2Model._update_causal_mask (cognitive 24): DeepseekV2Model._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eae6b4eb807b62d21faabc21d5b4e1b8b56dc0ed71808b2e6bf40864c424b7c"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Model._update_causal_mask (cognitive 24): DeepseekV3Model._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16390e35fb7ee3418c7d9826ec91e8d8fd99289b0b7baa50419931b43d0aa8d"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaModel._update_causal_mask (cognitive 24): LlamaModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc8bbb1105bb6ef750cb638372f1e1520c35145d27cb9e1f85cc9290cacb813"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralFlashAttention2.forward (cognitive 24): MixtralFlashAttention2.forward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97070765a97d0415f02dfb525443c3e94edfd3307aebe7f8cd77b16bee0a045"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralModel._update_causal_mask (cognitive 24): MixtralModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d63cf1de0f1a37293d5e3c5731dee41c82ab7dfd3082dcc7612cdadeaa19d8"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeFlashAttention2.forward (cognitive 24): Qwen2MoeFlashAttention2.forward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59ea039354e06f01d1dac87b8269b814aada7ba538dec111ac395f2e450b01c"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2MoeModel._update_causal_mask (cognitive 24): Qwen2MoeModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"104d0839a10166d48e4356364c4b416b01d678cf67c123e73bbabe0b7d210539"}},{"ruleId":"D2","level":"warning","message":{"text":"DynamicScaledDotProductAttention.get_preselect_block_table_and_attn_score (cognitive 24): DynamicScaledDotProductAttention.get_preselect_block_table_and_attn_score has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"091c11ca16c25a5e59a89a204b1e97ccfa65cb4f46ab7293ec88706c544bc471"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel._update_causal_mask (cognitive 24): KLlamaModel._update_causal_mask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"655072ad90352ad0c0b76762635e163a4c05e530aa4b20299199e56a9ec7c2b7"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoaderFactory.create_loader (cognitive 24): ModelLoaderFactory.create_loader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"7060abcd39933763c153c13c5a908f2387d0ea391ae9f5d3a76ede9574e75d83"}},{"ruleId":"D2","level":"warning","message":{"text":"model.add_model (cognitive 24): model.add_model has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 1 (3 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1263}}}],"partialFingerprints":{"codehealthFindingId/v1":"655dc40c442a01f8ab05d63091c545b8b68fc2e27fcdc460557f9aae425afafe"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_v4._validate_non_expert_cache (cognitive 24): deepseek_v4._validate_non_expert_cache has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"267cd0711c4a55fe2f6a189428bf6c20a952d91a9e4b6a0dcce49985119a88fd"}},{"ruleId":"D2","level":"warning","message":{"text":"dist_utils._dist_scatter_varlen_from_rank0 (cognitive 24): dist_utils._dist_scatter_varlen_from_rank0 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"3841d1045b75d103978b686f735b08a8ca4510f95f94ad47a0463adcb50dadc8"}},{"ruleId":"D2","level":"warning","message":{"text":"KExpertsCPU.load (cognitive 23): KExpertsCPU.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"c865655b05ad46e26d35a79430984b07c62a81ab664f81580e33095135f958ba"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCoordinator.recv_tensor_dict (cognitive 23): GroupCoordinator.recv_tensor_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 9). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"c241c848e20a27d0c9f994e319c6965852500684b370f891571b3d8197496ed9"}},{"ruleId":"D2","level":"warning","message":{"text":"KTrainer.training_step (cognitive 23): KTrainer.training_step has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9251af825ab270d0b8d92dcddab74c3bffd59facf394224abc7c6eb655ed165"}},{"ruleId":"D2","level":"warning","message":{"text":"KTransformersInterface.prefill (cognitive 23): KTransformersInterface.prefill has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e93a1a343f35634dd50667d4d2c77144442e6bb1b6a3870ea7628104ea2022c"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCoordinator.recv_tensor_dict (cognitive 23): GroupCoordinator.recv_tensor_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 9). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade2c8adeccadefbeb8e3856b701eebac9166982d443ed8ee4b7c3d9d562d21e"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelRunner.run_split (cognitive 23): ModelRunner.run_split has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (6 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"6adc0dc936637755d599c17780eace40738002275b1b35af31e5b43ebb768113"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.load_cur_state_dict (cognitive 23): utils.load_cur_state_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"3caffb4f4a12cfbf74934fe337761c03d4553aae4c0070bfcfa851ce53014e57"}},{"ruleId":"D2","level":"warning","message":{"text":"environment._get_mount_points (cognitive 23): environment._get_mount_points has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 1 (4 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae46b30732244402389fb33f99a92eb17f1f17b550eb6762368fadc56695d74"}},{"ruleId":"D2","level":"warning","message":{"text":"input_validators.prompt_int_list_with_retry (cognitive 23): input_validators.prompt_int_list_with_retry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/input_validators.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ada0f1b97c9a61dbf5c783e3f908f2a81c30bf1b264d1a498da394b52ba783"}},{"ruleId":"D2","level":"warning","message":{"text":"model_verifier.verify_model_integrity (cognitive 23): model_verifier.verify_model_integrity has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 pts), error handling 3, boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2dfe3f62422d8cee082a663bdab8e76d6c4641817fe45707a47e80ba7a681d"}},{"ruleId":"D2","level":"warning","message":{"text":"dist_utils._all_gather_checkpoint_state (cognitive 23): dist_utils._all_gather_checkpoint_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a58c57a96a8fad89668e29c47dfe59b8003abfa404d234ff8b31307b5ba2c7b"}},{"ruleId":"D2","level":"warning","message":{"text":"lora._load_fused_expert_lora (cognitive 23): lora._load_fused_expert_lora has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1029}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7e6d7bd35fad0161cfc833fd6a50c2bc5205bd2e17bbb3424713c908d5846e"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTQSafeTensorLoader._detect_format (cognitive 23): GPTQSafeTensorLoader._detect_format has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1072}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89d19b95a35468fe6e98a7229e0e05696f94f15b9c83fa0daf1a9a1721aa4a7"}},{"ruleId":"D2","level":"warning","message":{"text":"manual_promote.check_attestation (cognitive 22): manual_promote.check_attestation has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, loops 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/manual_promote.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"955dac9dcdb314dbdd5fae5f19a27e045386cce26e52130896b4d94d152daa6d"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2Attention.forward_linux_flashinfer (cognitive 22): KDeepseekV2Attention.forward_linux_flashinfer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ee17b82cc245290d2022e1f29742d69b4828b3b004111d45ce391fac82d304a"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf.read_safetensor_keys_from_folder (cognitive 22): merge_safetensor_gguf.read_safetensor_keys_from_folder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), error handling 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb655899f1258be14e0b04f142cf59c63d3bb7b2e0a337c4f6eaf8ca5ba31ee"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2Attention.forward_linux_flashinfer (cognitive 22): KDeepseekV2Attention.forward_linux_flashinfer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/attention.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9fa4daf6d04671dc9e9b9f67dcc3dc531d18d2ec400e31e2d2cf95d22c6ceff"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf.read_safetensor_keys_from_folder (cognitive 22): merge_safetensor_gguf.read_safetensor_keys_from_folder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), error handling 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"120cb09e44989382bfc16b4ddc65060582e6c37eb6623d16a8c1285528e28164"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.check_kt_env_exists (cognitive 22): environment.check_kt_env_exists has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"5351c176901d1ad80ab3f54819062e7900237e50a8ea6fb08c54deeb31b140d9"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper._stage_mxfp4_weights (cognitive 22): AMXSFTMoEWrapper._stage_mxfp4_weights has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"9844264a6287f865d3ce09de0a1860da8310ca75a8a4ea29ba3c3cc366e40513"}},{"ruleId":"D2","level":"warning","message":{"text":"arch._get_model_container_and_layers (cognitive 22): arch._get_model_container_and_layers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe96e1cccdd2ee5d3a0f8d120322cd1c6c0cef2d27d67071589a87809b954dbe"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._validate_runtime_expert_structure (cognitive 22): artifacts._validate_runtime_expert_structure has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"63e86d2392a78eb1d73f131cb27554047875dd9688b2f0c9cb76a14492f9034a"}},{"ruleId":"D2","level":"warning","message":{"text":"KTMoELayerWrapper._sync_forward_output_no_autograd (cognitive 22): KTMoELayerWrapper._sync_forward_output_no_autograd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 1 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f1e7530e5b6a15d9f7ccfeb17c28aaf3960c0f680c11578dff02103018db3e"}},{"ruleId":"D2","level":"warning","message":{"text":"weights.load_experts_from_kt_weight_path (cognitive 22): weights.load_experts_from_kt_weight_path has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"da95c6832f4066a866283a5b8c52fbd5a3066d6f386b556ef524fa3caee39bde"}},{"ruleId":"D2","level":"warning","message":{"text":"amx._select_gptq_int4_backend (cognitive 22): amx._select_gptq_int4_backend has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f99cd8436bba1afb4ad932263def6226fa3c2f6c4c154032b2a4bcdfd9cbc6"}},{"ruleId":"D2","level":"warning","message":{"text":"FP8SafeTensorLoader.load_experts (cognitive 22): FP8SafeTensorLoader.load_experts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"d549a1e9cea280804a6c10d339ad745ba51bdb0f61d04e81e6ae10533a87065b"}},{"ruleId":"D2","level":"warning","message":{"text":"check.read_safetensor_keys_from_folder (cognitive 22): check.read_safetensor_keys_from_folder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), error handling 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/check.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1d79b2bdb0b2f34905ff996bdf7097b0ec643828a47ec9e58731e940f85928"}},{"ruleId":"D2","level":"warning","message":{"text":"run.createRun (cognitive 22): run.createRun has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/api/run.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad40d7dedacfb2cccfca10c2de0577f5728637ae5e55ce8c785536f36c1361df"}},{"ruleId":"D2","level":"warning","message":{"text":"run.createRun (cognitive 22): run.createRun has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/api/run.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e026805191da2fd27aeab63d6dc7ee94e4859559b10e80ea5341ac855c13c714"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.__init__ (cognitive 21): Engine.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, error handling 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"28fb8d688b21c2a970aac9cdfce4acc8796a122166d5864163db13d27fa6ffe0"}},{"ruleId":"D2","level":"warning","message":{"text":"KTransformersInterface.prefill (cognitive 21): KTransformersInterface.prefill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad3b5e94f0e46d47a2fc8c2a50d5b854166ebd2ad4434dfb38dfdfb1c3709fe"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModelForCausalLM.forward (cognitive 21): PeftModelForCausalLM.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (21 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1403}}}],"partialFingerprints":{"codehealthFindingId/v1":"2edf562492264696723446c16b3cf37abc349dfdbbff978f4318021b163d3e4a"}},{"ruleId":"D2","level":"warning","message":{"text":"GGUFLoader.load_gguf_tensor (cognitive 21): GGUFLoader.load_gguf_tensor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e716ea8785f096cea363e64d49a1df67a7e70c4b36ee29772409f7a4f3b53cf"}},{"ruleId":"D2","level":"warning","message":{"text":"KNPUQwen3MoeForCausalLM.batch_embeddings (cognitive 21): KNPUQwen3MoeForCausalLM.batch_embeddings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e014628a815900baafb12c426aaa88ca71c536340656e10d929655b49c7b5bd8"}},{"ruleId":"D2","level":"warning","message":{"text":"KTransformersInterface.decode_one_tokens (cognitive 21): KTransformersInterface.decode_one_tokens has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f79270d6511320d1bd0c1066f72a17e07ce55732994e566199867a05ce65213"}},{"ruleId":"D2","level":"warning","message":{"text":"ForwardMiniBatchSplit.fill (cognitive 21): ForwardMiniBatchSplit.fill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (5 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df138db7b2155c921daf27df65b6507b3faa89ad1dacedcf2428917c8b99065"}},{"ruleId":"D2","level":"warning","message":{"text":"GGUFLoader.load_gguf_tensor (cognitive 21): GGUFLoader.load_gguf_tensor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c9d463a1b9a86339ede862eb64b14a40810593d04451b98a6b88b3aacc8dbe3"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.validate_kt_prequantized_loading_info (cognitive 21): artifacts.validate_kt_prequantized_loading_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 8, ternaries 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7401a091f86ed0fd204dc89abd40a571bee95622ceb1e434a6ce4e60f02b6e9"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._adapter_provenance (cognitive 21): artifacts._adapter_provenance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1833}}}],"partialFingerprints":{"codehealthFindingId/v1":"990896baf8083c281d26534245281046824fe749e9f3873e3c48d9192522fe39"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.get_rawint4_checkpoint_contract (cognitive 21): backend.get_rawint4_checkpoint_contract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/backend.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3dcac665e5e6d993514fee5251b4b15f140dc13e87b19ecb427601003b105e"}},{"ruleId":"D2","level":"warning","message":{"text":"check_cpu_features.main (cognitive 21): check_cpu_features.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (7 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/check_cpu_features.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"40fda5d80b7a1f00d82f4defb99a82d09e2229dd842cd5f55b1ba6eb18df108f"}},{"ruleId":"D2","level":"warning","message":{"text":"compare_weights.load_kt_weights (cognitive 21): compare_weights.load_kt_weights has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/compare_weights.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"69a45dee28dfd03797f1045109a32f3ae2416a4f264f54fdc12d061a5e9f7409"}},{"ruleId":"D2","level":"warning","message":{"text":"four_main.checkout (cognitive 20): four_main.checkout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/release/four_main.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82728f9b3d3dd4711a3bf29607ef3ee590997fa8e6a57b978bab0e8b88daf08"}},{"ruleId":"D2","level":"warning","message":{"text":"ForwardMiniBatch.__init__ (cognitive 20): ForwardMiniBatch.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (5 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9baf3529378ac7647e9feb0aff595010a5d011978849e8679e16930e657e6a94"}},{"ruleId":"D2","level":"warning","message":{"text":"KDeepseekV2AttentionW8A8A2.forward_chunck (cognitive 20): KDeepseekV2AttentionW8A8A2.forward_chunck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ae189603ac955ed96733db7e3bdd816d839c4d1b4afa1a9ff058367051d6988"}},{"ruleId":"D2","level":"warning","message":{"text":"ForwardMiniBatchCombine.__init__ (cognitive 20): ForwardMiniBatchCombine.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (5 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2ee41073a772d6c90eeea38bcefc941c8c81b6523f94d8ebc7ba00348e3ddc"}},{"ruleId":"D2","level":"warning","message":{"text":"_cpu_detect.load_extension (cognitive 20): _cpu_detect.load_extension has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/_cpu_detect.py"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e639cea702525f81cc317cd5af269316bc72f73895d68b6852e51862315606c"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor._get_kt_kernel_info (cognitive 20): doctor._get_kt_kernel_info has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 2, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/doctor.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b89604e974856afe176b5b4bca9b51576e210fd8cf96eb152e5108111c87af"}},{"ruleId":"D2","level":"warning","message":{"text":"environment._parse_dmidecode_memory (cognitive 20): environment._parse_dmidecode_memory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 7, error handling 1 (3 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"e038df2d250a62af7a8491120eb81837ba56939594874f895bcb9c5762148510"}},{"ruleId":"D2","level":"warning","message":{"text":"input_validators.prompt_int_with_retry (cognitive 20): input_validators.prompt_int_with_retry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/input_validators.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cd00de327c950dfe409f9bf0ee32d1f7766f09c5365da37a799aa27218c8869"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelScanner.scan_directory (cognitive 20): ModelScanner.scan_directory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"903eb39b1a26784916c27bd54cd168dba4923c23c9effd380907bbb0e1edb762"}},{"ruleId":"D2","level":"warning","message":{"text":"model_scanner._get_mount_points (cognitive 20): model_scanner._get_mount_points has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4342e8f0b688ee7f0fae6f831564f3b836d9069e6717ecc7d9c3be49f67c42b"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._fused_lora_contract (cognitive 20): artifacts._fused_lora_contract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1735}}}],"partialFingerprints":{"codehealthFindingId/v1":"089aa15c3276d0755c6881fd2ab6941f5d669ef0c9e493c6db405abab42b1ad0"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_v4._ensure_non_expert_cache (cognitive 20): deepseek_v4._ensure_non_expert_cache has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"6687ce84546bc5e20a4e2fe182f41c0fe0cfa679492d266342ba87ae03ae4ad9"}},{"ruleId":"D2","level":"warning","message":{"text":"dist_utils._dist_gather_varlen_to_rank0 (cognitive 20): dist_utils._dist_gather_varlen_to_rank0 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d44875db1a9fce94914fd6613b187b35d73489b47400f0f212b9f831e79963c"}},{"ruleId":"D2","level":"warning","message":{"text":"lora._replace_peft_weights_with_views (cognitive 20): lora._replace_peft_weights_with_views has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"77e8b93136186c9745c5cc494dd548d36a619a0f8b14d92f9c10176e43d395d0"}},{"ruleId":"D2","level":"warning","message":{"text":"amx._select_rawint4_backend (cognitive 20): amx._select_rawint4_backend has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"64411c2fe30eaea4566ca8dba4db9d41bb761e7fcb0bf3870b51e5d34993cbab"}},{"ruleId":"D2","level":"warning","message":{"text":"GGUFLoader._load_directory (cognitive 20): GGUFLoader._load_directory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (7 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a880dd13949bdc4927ed14512dc86905f1bc4d431a6fabb131d93647bcad234"}},{"ruleId":"D2","level":"warning","message":{"text":"compare_weights.compare_weights (cognitive 20): compare_weights.compare_weights has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/compare_weights.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac75958ebfad20218bd038b22a9de331950b6c9c903a6505a67cbd2c861a969"}},{"ruleId":"D2","level":"warning","message":{"text":"DynamicScaledDotProductAttention.apply (cognitive 19): DynamicScaledDotProductAttention.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9130d02a6061037be96367fe13f6a8108099ea85384dbe4945ec3a58b3356a2"}},{"ruleId":"D2","level":"warning","message":{"text":"KExpertsTorch.load (cognitive 19): KExpertsTorch.load has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 6 (9 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9a91691d45336ab44b08c421f59a715c240d34b537e98d775244fffecf76bd"}},{"ruleId":"D2","level":"warning","message":{"text":"KLinearBase.load_weight (cognitive 19): KLinearBase.load_weight has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ddb957e638829dcada995fbb0dd1a52c70355e0532f431d9cfab90c38a367e"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel.forward (cognitive 19): KLlamaModel.forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (6 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"df675d8e6557865733a55f7863d26db934e29e400eb48e8f5624529c30f98730"}},{"ruleId":"D2","level":"warning","message":{"text":"TransformersInterface.tf_logits_warper (cognitive 19): TransformersInterface.tf_logits_warper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4b60818071521febdc4dff4689bfe8d3550aaabb733cc448d750f1383aba09"}},{"ruleId":"D2","level":"warning","message":{"text":"LoraModel.inject_adapter (cognitive 19): LoraModel.inject_adapter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"076236dbea5293b7fddcd20bf228bfeefbb93e66c67c59dc3151f9b75878bbfd"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel.get_prompt (cognitive 19): PeftModel.get_prompt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d69a77bab13b992a6894ab84899a28b6d169de01d15bb995fa7ccbef21e6742"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.tf_logits_warper (cognitive 19): utils.tf_logits_warper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e25023048576f26644d12c3f5644cd8889057b260d64d67df745eeba9e802e6"}},{"ruleId":"D2","level":"warning","message":{"text":"KNPUDeepseekV3ForCausalLM.forward (cognitive 19): KNPUDeepseekV3ForCausalLM.forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1596db99cf83ae56e45b97837e2eb1337edd21d3c280b4cfc3223b6faaa3b24"}},{"ruleId":"D2","level":"warning","message":{"text":"KLinearW8A8.load_weight (cognitive 19): KLinearW8A8.load_weight has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_linear.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"119f443ee636c71eff00d9dafb6e8217f6ae4dcd3dbdea61580ae26146df8e0a"}},{"ruleId":"D2","level":"warning","message":{"text":"DynamicScaledDotProductAttention.apply (cognitive 19): DynamicScaledDotProductAttention.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a1c7bf0ef336daf252b8b6ff8e9b4b055f40779e10a9f18519971d3210fa69"}},{"ruleId":"D2","level":"warning","message":{"text":"KLlamaModel.forward (cognitive 19): KLlamaModel.forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (6 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8029ed07dee6b5401a931f1211ba13aac127e8b4bef298e25b108d2d6e70439"}},{"ruleId":"D2","level":"warning","message":{"text":"TransformersInterface.tf_logits_warper (cognitive 19): TransformersInterface.tf_logits_warper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db3a2fd85a64502a05dc46578044de20473e1a60a22de96fec36d9c7d0c289f"}},{"ruleId":"D2","level":"warning","message":{"text":"GGUFLoader.__init__ (cognitive 19): GGUFLoader.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e9c725cccd8e760a0af0ca34c2dc3095c0a63e54cd476521093a7abba76ceb"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.tf_logits_warper (cognitive 19): utils.tf_logits_warper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"b567cec1ff9d4fe6d9efd635cf78806dde16ebe7c23d124f2fe6e37a4767a491"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor._display_results (cognitive 19): doctor._display_results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/doctor.py"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b6a7cbb887b83ea17b341175fa9f264424d51882227bee49de66d87ae3696f"}},{"ruleId":"D2","level":"warning","message":{"text":"model.auto_detect_repo (cognitive 19): model.auto_detect_repo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2685}}}],"partialFingerprints":{"codehealthFindingId/v1":"8643f9ef7740000a4be93b574d88961c6bea037ed2e69f77817884241c519ebe"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.detect_env_managers (cognitive 19): environment.detect_env_managers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"76788b21b40fc9e370905f4dfc462ef22510d672932d97a8116cc7475ffcd4e1"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.detect_gpus (cognitive 19): environment.detect_gpus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (6 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cee5547fcc537a3720beafde1eeb0ce6df759fe3e1523116ad5a0303ccd7dd9"}},{"ruleId":"D2","level":"warning","message":{"text":"model_scanner.is_valid_model_directory (cognitive 19): model_scanner.is_valid_model_directory has cognitive complexity 19 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 6, loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e99a2d91edd67ce10ab244f7ffa13eb5e80b633d9926aa4af317bcf30586b7"}},{"ruleId":"D2","level":"warning","message":{"text":"run_interactive._configure_amx_inference (cognitive 19): run_interactive._configure_amx_inference has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4e111d94a0422dc4446958b24455ffcd152f8104adfa75137594eb9cf763b2d"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.resolve_kt_pretrained_artifacts (cognitive 19): artifacts.resolve_kt_pretrained_artifacts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"54da58d15a380eca8570a3533add3792849de29e68bd63480204cf40755a852c"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.save_kt_adapter_artifacts (cognitive 19): artifacts.save_kt_adapter_artifacts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1901}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83e61a0e142570d7e9c289eab550d9cc6f2435620c0b6a89979a4498c0cb150"}},{"ruleId":"D2","level":"warning","message":{"text":"EphemeralKTWeightStore._validate_manifest_layer (cognitive 19): EphemeralKTWeightStore._validate_manifest_layer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bce46875a14ce084f5fd37056c527b4ff61ee355db737c37ae00a35473df77c"}},{"ruleId":"D2","level":"warning","message":{"text":"lora._collect_kt_full_weight_params (cognitive 19): lora._collect_kt_full_weight_params has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf5d5963654d90d909d2e83646465e56ff5870f29f507de5b7146fb101df3e0"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_kimi_k2_fp8_to_bf16_cpu.main (cognitive 19): convert_kimi_k2_fp8_to_bf16_cpu.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_kimi_k2_fp8_to_bf16_cpu.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"917429a7361cadd7031cb8dc0053f88d1a9f7f3eafb7c17a55b0f6a13562affb"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel.load_adapter (cognitive 18): PeftModel.load_adapter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac2a2e694a5e424a34514de37644dffa09939b7ad24163c1273c8bfbafcb6b9"}},{"ruleId":"D2","level":"warning","message":{"text":"modeling_rope_utils._validate_longrope_parameters (cognitive 18): modeling_rope_utils._validate_longrope_parameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6fff0b6ca79be60c03528200d4f1bb2e31348ccb53d024fb27a0f238f12e50"}},{"ruleId":"D2","level":"warning","message":{"text":"KNPUDeepseekV3ForCausalLM.batch_embeddings (cognitive 18): KNPUDeepseekV3ForCausalLM.batch_embeddings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e8807c2a0d984eb80d6e877a5808c03798e05bbe995563d45c8cfb4213bdc35"}},{"ruleId":"D2","level":"warning","message":{"text":"KNPUQwen3MoeForCausalLM.forward (cognitive 18): KNPUQwen3MoeForCausalLM.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee6f290e59e7bb972db04886156980aeafff381ee1e68e27ba9105f33c6c12b"}},{"ruleId":"D2","level":"warning","message":{"text":"ForwardMiniBatchSplit.__init__ (cognitive 18): ForwardMiniBatchSplit.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), loops 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"62411036fca86a6897110a26773b702b0a9f28ec79458585a66471307a7b26fd"}},{"ruleId":"D2","level":"warning","message":{"text":"modeling_rope_utils._validate_longrope_parameters (cognitive 18): modeling_rope_utils._validate_longrope_parameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"450d6901d6ea29501c01f522c196509be5b94bc5f66a8696c3992bf75d8e36da"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 18): main.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/main.py"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3a2a0cb04187f17569d1c5e4302893e3d8b46a876c74f1b9eda5346da14f8c"}},{"ruleId":"D2","level":"warning","message":{"text":"kv_cache_calculator.get_kv_size_gb (cognitive 18): kv_cache_calculator.get_kv_size_gb has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/kv_cache_calculator.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"02145809a7f208080e9cc15293d4af450989a99fe37218c9e3e6c691e0591c76"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts._enumerate_runtime_routed_modules (cognitive 18): artifacts._enumerate_runtime_routed_modules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a54454a30fd9a35085c263ae98e5f6d9cf91dbda6d6daa2b694ec9f3ff5319"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.mark_kt_int8_routed_expert_base_parameters (cognitive 18): artifacts.mark_kt_int8_routed_expert_base_parameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (5 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1363}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b508d5b62e67e19018d0798e126c51b4608e72fe3c802c5678105bf66bff7ec"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpoint._inspect_layer_shard (cognitive 18): checkpoint._inspect_layer_shard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/checkpoint.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c13d16d95555bb04d210c2296c1a481ac8ac9d469fdd4671f507f1189b96372"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpoint._load_full_weight_checkpoint_rank0 (cognitive 18): checkpoint._load_full_weight_checkpoint_rank0 has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 3 (5 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/checkpoint.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"6771121a2c6714c2d400df615b5153ffca09a44028b7ac96240477c887897790"}},{"ruleId":"D2","level":"warning","message":{"text":"deepseek_v4._expected_cache_inventory (cognitive 18): deepseek_v4._expected_cache_inventory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"96f91faf7bc9a04dd9e7f1442a7a13ad08bea733cd8ad0d9d5272ff40a336243"}},{"ruleId":"D2","level":"warning","message":{"text":"profiler._aggregate_rows (cognitive 18): profiler._aggregate_rows has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), loops 4 (6 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/profiler.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"906e8eceeb4d1d23c5f4e005e64a7bf134a78de5ac873f2aece2b0e9eff49a88"}},{"ruleId":"D2","level":"warning","message":{"text":"compare_weights.normalize_tensor_dtype (cognitive 18): compare_weights.normalize_tensor_dtype has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/compare_weights.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e69fb8efd04f7d6edda146ec1d216b29d415dcceed96a05af43c2287af5ebd5"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_cpu_weights_ds4.load_model_config (cognitive 18): convert_cpu_weights_ds4.load_model_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"c51bb5a56e42c6a28d95d7d7aea1e80429088a9dfdf6d724ed29c4ecf46499ca"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_cpu_weights.process_layer (cognitive 18): merge_cpu_weights.process_layer has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), error handling 2 (8 pts), if/else 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/merge_cpu_weights.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ac6eb1dd3010203ed686df0e48c851ac24d37dc14319dbf4e46fed46418d7b"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3ForCausalLM.prepare_inputs_for_generation (cognitive 17): DeepseekV3ForCausalLM.prepare_inputs_for_generation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1735}}}],"partialFingerprints":{"codehealthFindingId/v1":"d888a5e0771b58737e99ebeded35948895c756623d1ea71fc4f771b7ef3ded0b"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantObject.update_build_status (cognitive 17): AssistantObject.update_build_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea34c6f608ae8cd18ad8ad4c00cfd15cbbe75a8b64adedcf724445171615e938"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseTunerLayer._move_adapter_to_device_of_orig_module (cognitive 17): BaseTunerLayer._move_adapter_to_device_of_orig_module has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b524ab4bc999f9e9a880033b7f9350307b81d4ddd2b23a5a0f5fce559cfa75e"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3ForCausalLM.prepare_inputs_for_generation (cognitive 17): DeepseekV3ForCausalLM.prepare_inputs_for_generation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1749}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77ea4fe2d014f85bb7fe2fe9ed699e859e165df09e226308e5bbab2d74b8064"}},{"ruleId":"D2","level":"warning","message":{"text":"KQwen3MoeAttentionW8A8A2Serve._forward_prefill (cognitive 17): KQwen3MoeAttentionW8A8A2Serve._forward_prefill has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacd92a45d684f7e74d7d3097a9fbf6ecc3055c2e6c37a05ef58a756eceabbb8"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgumentParser.parse_args (cognitive 17): ArgumentParser.parse_args has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/args.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"4968c04e0a154ccd4884cf31007d685308a6ba730f49962006d44fd3858baf9a"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantObject.update_build_status (cognitive 17): AssistantObject.update_build_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"7df79efe3db58ea9c5fa6c3ae94b22652655bdfa127a4d2449e294c8e75cb73a"}},{"ruleId":"D2","level":"warning","message":{"text":"debug_configs.main (cognitive 17): debug_configs.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (4 pts), ternaries 1 (3 pts), error handling 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/debug_configs.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ae59a48eaab67412d66f57bc2ef0c00cb3799849706ed7c8aa2035ac23f339"}},{"ruleId":"D2","level":"warning","message":{"text":"run_interactive._select_saved_config (cognitive 17): run_interactive._select_saved_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"319584bae48f92516406d237830c77d84fad7edcb9a97f877a0e421cd7df67b3"}},{"ruleId":"D2","level":"warning","message":{"text":"lora._collect_wrapper_managed_lora_params (cognitive 17): lora._collect_wrapper_managed_lora_params has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a2bee230f57b1ac0daad82a98322037d838ce2fd1e696470f4b540edda0e4c"}},{"ruleId":"D2","level":"warning","message":{"text":"BF16SafeTensorLoader._detect_format (cognitive 17): BF16SafeTensorLoader._detect_format has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"49ed51fd42a6993e5eafb15030804a0cda75f353386103f971b1a0445f230849"}},{"ruleId":"D2","level":"warning","message":{"text":"MXFP8SafeTensorLoader.load_experts (cognitive 17): MXFP8SafeTensorLoader.load_experts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1404}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d285c3f8665092667d0270fd55765269d32589e87f525ace8efddb93196046e"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_cpu_weights.load_model_config (cognitive 17): convert_cpu_weights.load_model_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"3da86cee889e417e772c77d80542200a00a142d1b39a7edb1c21b45375d5c6f9"}},{"ruleId":"D2","level":"warning","message":{"text":"convert_moe_to_bf16.convert_file (cognitive 17): convert_moe_to_bf16.convert_file has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_moe_to_bf16.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a953fde1e9eb378fb99bf02f51ec6069544e0dcc802009cb7c9d6b62df9d91a"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3FlashAttention2.forward (cognitive 16): DeepseekV3FlashAttention2.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f36d53a957ff62b741edb9e2ce9fbaab13a71661e64eb20dca86132213a8c7"}},{"ruleId":"D2","level":"warning","message":{"text":"completions.create_completion (cognitive 16): completions.create_completion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73f107c4cce2668076430366fe18863e54bd7ced581de9d4499c55c407bb8ac"}},{"ruleId":"D2","level":"warning","message":{"text":"TransformersInterface.prefill (cognitive 16): TransformersInterface.prefill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f66720f2935da1a0703f86e8f49532e0f59a162ddc6c3e92434e38d99df941"}},{"ruleId":"D2","level":"warning","message":{"text":"PeftModel.create_or_update_model_card (cognitive 16): PeftModel.create_or_update_model_card has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aea48b2a54b25332d274d4ca039cea3c9556968a76fb60953f01d44034420af"}},{"ruleId":"D2","level":"warning","message":{"text":"peft_model.get_model_status (cognitive 16): peft_model.get_model_status has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 6 (8 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1780}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7a2444490177523f2a245eb02fd6be1cb632de4ada73ec0ca9352dbad0049e"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3FlashAttention2.forward (cognitive 16): DeepseekV3FlashAttention2.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"2571e83051009cb169dfad1e714a02dbcc12842e137bde56286cf35d35bfd129"}},{"ruleId":"D2","level":"warning","message":{"text":"completions.create_completion (cognitive 16): completions.create_completion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/api/openai/legacy/completions.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc15afe5783530680585b97c9564e33656030fbd1ad58e65ebe7e3a27dad358"}},{"ruleId":"D2","level":"warning","message":{"text":"BalanceServeInterface.inference (cognitive 16): BalanceServeInterface.inference has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"3002a6a5a3c413276513704ffafc35b351475f6438b24d7676cc9b1c1e010843"}},{"ruleId":"D2","level":"warning","message":{"text":"TransformersInterface.prefill (cognitive 16): TransformersInterface.prefill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"39184d5f35f6140f02cfe59fffd0ffc166b82f905d8754857c65a32d8b8707ce"}},{"ruleId":"D2","level":"warning","message":{"text":"QueryInfo.check_stop (cognitive 16): QueryInfo.check_stop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed9c46e39b1ae055068e605ed196e6794f7c0b5bf89ac78b90a6f4642b7a9ada"}},{"ruleId":"D2","level":"warning","message":{"text":"merge_safetensor_gguf_for_qwen3.combine_tensor_sources (cognitive 16): merge_safetensor_gguf_for_qwen3.combine_tensor_sources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"199f4b5210bc27ffa349ea50e80e1ddd093bd144d5fb5d00edee987b5a409fbc"}},{"ruleId":"D2","level":"warning","message":{"text":"main._prompt_custom_path (cognitive 16): main._prompt_custom_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/main.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"10618c7432c29bf401a215bd0070f904b316bb59ace0ae520a605e6f8790ee56"}},{"ruleId":"D2","level":"warning","message":{"text":"environment.get_kt_env_path (cognitive 16): environment.get_kt_env_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"14bd1c33c29cf74c151161a5c9eee575d7bab2aa7695c17e5e91451a903b7718"}},{"ruleId":"D2","level":"warning","message":{"text":"model_scanner.scan_directory_for_models (cognitive 16): model_scanner.scan_directory_for_models has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"926afa640118cc4e4f9ceb50eb0b43f00b368779f67890ff013ef563b71d62fa"}},{"ruleId":"D2","level":"warning","message":{"text":"repo_detector.extract_repo_from_global_search (cognitive 16): repo_detector.extract_repo_from_global_search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"298b4b3a8673bce28c2fb079a52993da5f3cde53919d4863eca1c0aa34cad663"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper.load_block_fp8_weights (cognitive 16): AMXSFTMoEWrapper.load_block_fp8_weights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab2c6efdb71cd0ef95c2185dda62f405a7e06ce833bdca8eceef4dac1c7d8aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper._load_base_weights_from_file (cognitive 16): AMXSFTMoEWrapper._load_base_weights_from_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"6381b292b93f32375a41ff488164f9cf5fd38563f5e9181f8bc9c9e8aa6f2886"}},{"ruleId":"D2","level":"warning","message":{"text":"AMXSFTMoEWrapper._validate_prepartitioned_weights (cognitive 16): AMXSFTMoEWrapper._validate_prepartitioned_weights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"497ff4f442ffacd90a5001b9e8c2c05acec6d39b291715ba8c8959b0a26e6bbf"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.normalize_sft_backend (cognitive 16): backend.normalize_sft_backend has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/backend.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"54fb7dfe5755565aa05fcd7a4c4e69a5cad0f37c925214318fbd28d40a8cbee9"}},{"ruleId":"D2","level":"warning","message":{"text":"ephemeral.publish_ephemeral_int8_weights (cognitive 16): ephemeral.publish_ephemeral_int8_weights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e80061689d463c4c110d1fdd04ff5ef369e770087ddc0f241fbcb8c80a0055"}},{"ruleId":"D2","level":"warning","message":{"text":"weights._clear_original_expert_weights (cognitive 16): weights._clear_original_expert_weights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac9d52981dc0781a3a2bafd6b6c5177eb45f66ce10c1c17b182dedc4d63e90ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/model.py: FileTooLong \u2014 2045 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1545 over it, 4.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd6403c033b68f47780108b60cf56adf4eceac00c935e7dcf2c5212f8e2be3a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/artifacts.py: FileTooLong \u2014 1691 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1191 over it, 3.38\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"161d22667b079323b5a9de0016affae68158df48145b287e32bdf67855ba0dc0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/experts.py: FileTooLong \u2014 1671 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1171 over it, 3.34\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"64558867bc0a14bb69f9b0bc339a95f6f5da5c97321a6300eb54e946e43ccd76"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/experts.py: FileTooLong \u2014 1607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1107 over it, 3.21\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9978d7423702bca3b4db5b2f33ce2b7b1edebf3d66d92daac517f9180f53d1e0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/wrapper.py: FileTooLong \u2014 1132 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 632 over it, 2.26\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4a93d3cb3e4942806a95456b151e302ab92983112e56451959e56a199401c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_deepseek.py: FileTooLong \u2014 1101 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 601 over it, 2.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f1f864e31d5fa71d802e8a4326ec86aef24801141cbc3bc33db004f1686450"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_deepseek.py: FileTooLong \u2014 1100 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 600 over it, 2.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa2fa905992f1a7bfd0cba7f53fcaa37d71c3546e3715a8add7fdb879abef93"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_deepseek_v3.py: FileTooLong \u2014 1062 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 562 over it, 2.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"646a3fee1dce7c19a4e0a615416c07060fe006486574b689aaec5befd6f959c1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_deepseek_v3.py: FileTooLong \u2014 1048 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 548 over it, 2.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0e81d4c48e20799868a48579a84d450d2463380569cf3bdc1a1c897c270a47"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/loader.py: FileTooLong \u2014 998 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 498 over it, 2.00\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fd9ad17918ed1a891fb869cdcaed5007f9627c389b4cf656c4b1edfc2ee312a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ascend/ascend_attention.py: FileTooLong \u2014 997 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 497 over it, 1.99\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"30633e0700884c09eec452ce4694edc15c9b34284bd5ef06282bc7487aae0a41"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: scripts/convert_cpu_weights_ds4.py: FileTooLong \u2014 935 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 435 over it, 1.87\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4f8fa826b03a83612695f371c9d5f1e0268f0a929693914420ba5778ce212d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/amx.py: FileTooLong \u2014 872 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 372 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a6636a5d80f14a45e8b8b409e2dbaf4e589d0b0da20f1cde1484b7893b4f5c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: peft_utils/peft_model.py: FileTooLong \u2014 846 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 346 over it, 1.69\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d911a150a0f82eb17372cf9b5a07c32eeb0f42b3935b8e4f9f61225de2c4f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: scripts/convert_cpu_weights.py: FileTooLong \u2014 823 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 323 over it, 1.65\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc25c8fa62f85d165b838d9c3cd64bf071a6725127d606fab0ab2bffd02b381b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/amx.py: FileTooLong \u2014 814 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 314 over it, 1.63\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d4e75f589030d1916c1eb4f2af411be349043ca35a1379ae1e2a08137cede0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/layer.py: FileTooLong \u2014 789 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 289 over it, 1.58\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99d7b40fa6942eefe7699287edfe2ac5206acaabc41fc4e8b33bf83533a22be"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/lora.py: FileTooLong \u2014 782 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 282 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d068dc452d441ce4997f07d9e0e4d693c770396eb321b5aaf7cff3787b44189e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/linear.py: FileTooLong \u2014 778 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 278 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5564acaf3d3809bccca759b3d7a4d408629343ec9c127b7ef92414f10dbc03b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/linear.py: FileTooLong \u2014 773 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 273 over it, 1.55\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f452119ba3fe63e32dc2031037de81fae860af8ba06785e7ff787392a6eb85ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/attention.py: FileTooLong \u2014 769 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 269 over it, 1.54\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b2cd1f99cdc5ea2d38830f641070a390478ca82a828cfefe6ff82a516cf320"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_qwen2_moe.py: FileTooLong \u2014 767 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 267 over it, 1.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfae77ebe137361b908bed60184dca2fb89702016883501e52015c854eb24d89"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_qwen2_moe.py: FileTooLong \u2014 766 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 266 over it, 1.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"129966c2612c537c5a20f8762599372d58ddb5a3b2f5573b38296b34bc15a221"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: peft_utils/lora_layer.py: FileTooLong \u2014 764 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 264 over it, 1.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"450e4f6bc19e91d6aaf4d355ab4ce0922e1670aadfaf40508f7e3b32edb469a2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_llama.py: FileTooLong \u2014 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a8538a43026940ad7fe8ae27628c05016c953fe60de14166ee025064a23c559"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/base.py: FileTooLong \u2014 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8e4a7933e4621b0a16286c1cb15eb57753b0b22347d726dd0610fb569c6ddf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_llama.py: FileTooLong \u2014 760 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 260 over it, 1.52\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e78530d3594b00fd26caf81c4f27bbabe128056ee06cafeb089e1009378eb1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/weights.py: FileTooLong \u2014 758 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 258 over it, 1.52\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f740b44cf9a5a85c3b07830005846c7faa5d252ace88427cfaa0f5c50762103"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: distributed/parallel_state.py: FileTooLong \u2014 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a7b38f3327f3ef820c35904c0d15e2ee7eebdec830f38dcc320daa523e9bfa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: distributed/parallel_state.py: FileTooLong \u2014 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60b435fe57083b20da3781b89de84996df2b5e7a37c8df176b721148c468220"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/environment.py: FileTooLong \u2014 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4d976e230cf54dc73469d625cc2b199b8b0ad2010068888308e6943bb9dd79"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_mixtral.py: FileTooLong \u2014 725 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 225 over it, 1.45\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37cc3f27f2ed62b96530b3731e9147a837d3bc32eafa733194ebc2cfe37f7279"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_mixtral.py: FileTooLong \u2014 724 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 224 over it, 1.45\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b8675ca42f9cbf588cadbff33cc8a27363a2f97bb735058c5f7382c999c9d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/run_interactive.py: FileTooLong \u2014 682 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 182 over it, 1.36\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8b6b7bf9a4bc94fac4e3be2b0fed54ba8f808f88ce7f0e4bf4be199434c9c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/attention.py: FileTooLong \u2014 678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 178 over it, 1.36\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2396ac6ad191465cd0061ec1d0876257b3941c46d075303c9a4e2900295674b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BaseSFTMoEWrapper: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/base.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"b22485d4529f576e5c5db71f09a6ad8e95a07f5a01a924ba79b2f24b58101902"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: util/utils.py: FileTooLong \u2014 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 over it, 1.33\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e250abb38833beb83c5f03126c70bf49a172c368f7979bcdaaabe5d32e427e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: inference/forward_batch.py: FileTooLong \u2014 641 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 141 over it, 1.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63786012a1be0af40e66eb57b5db6b76dac129f010c61a7853587204c5cc66b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/cpuinfer.py: FileTooLong \u2014 635 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 135 over it, 1.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"641d294b3e3a0433c5553c5b1b2f20c6f82cf9ddf7fd685a15d30566a117fdbd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/cpuinfer.py: FileTooLong \u2014 635 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 135 over it, 1.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/cpuinfer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ca68ce2b339b10e4abf6491d5caa5a7eff571ea93b6de81c5f0116b5a8b472"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_smallthinker.py: FileTooLong \u2014 616 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 116 over it, 1.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce8a401c2e426c20f410ff48b09f8a82ff2d291ffb43fe63d8930656543f278c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/balance_serve_attention.py: 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. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2cb8d9cf6cdf8470b0fe2479a55d70aebeadbc67e763c1202fad0e2d0c27287"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/dynamic_attention.py: FileTooLong \u2014 598 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 98 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab5c66c3cc96fbf6f04fc4838e23a6f6920c20f2ea8a7b069d9f353b960d3ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: operators/dynamic_attention.py: FileTooLong \u2014 598 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 98 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ece5d06dc8f953328553fcc6211044e58ed4c848dbd3ac22ea3a87f7eded18"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: kt-kernel/setup.py: FileTooLong \u2014 579 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 79 over it, 1.16\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84432c197cb1f6f5588585abc336725b14865ff7f28ae8b6e748d00c4e72a1d8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/run.py: FileTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 78 over it, 1.16\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41b9185ddad9bb766cf0f17fb83b4656a9f0798194d8d725207d336b58ae1c7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/model_verifier.py: FileTooLong \u2014 577 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 77 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4329bf320e4280c8babedab92ef45dd45c0f120b0f5d0196ea413b7f409335f9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: util/custom_gguf.py: FileTooLong \u2014 565 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 65 over it, 1.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6cc9776099606bdcf53de44dea6dd553101763cc018490e042c7f83fa76776"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: util/utils.py: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3f80b99d963cca820532cab8edee5fc43b62fb5b23cf28163f7f2ac76faa97a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: interfaces/balance_serve.py: FileTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 48 over it, 1.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f983a679039727b56ad20b7f3ed4129f97cf55b7d9757e91ed65bdefd176b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: python/experts_base.py: FileTooLong \u2014 544 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 44 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"173392091d65487a1f0df2e68ebd6acbfcd2b60f57e982c3bbaa91eef5db5699"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sft/config.py: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2221390f550739c037dd651a78eb79a725f3db94a9bec013178055e4e331a13"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: util/custom_gguf.py: FileTooLong \u2014 533 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 33 over it, 1.07\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4c621491736b7126bff27f9732608990b22c90443b2d7f8bca828394e32df6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: archive/setup.py: FileTooLong \u2014 517 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 17 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"60414dab3cb8b09658e6d0ef9b86c389b679f1674470473a7414341b330c56c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: kt-sft/setup.py: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"117de6ec49ff9d73c5f9e0f893c6d789a81ea9fb5d5e61c8783fd0c369b258e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (12 members, 21 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:806-891 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:921-1037 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:765-861 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:892-1014 | archive/kt-sft/ktransformers/operators/attention.py:603-684 | archive/ktransformers/models/modeling_deepseek.py:805-890 | archive/ktransformers/models/modeling_deepseek.py:920-1036 | archive/ktransformers/models/modeling_deepseek_v3.py:769-865 | archive/ktransformers/models/modeling_deepseek_v3.py:896-1018 | archive/ktransformers/operators/attention.py:602-683 | kt-kernel/examples/modeling_deepseek_v3.py:762-858 | kt-kernel/examples/modeling_deepseek_v3.py:889-1011 \u2014 These 12 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63ca56e2df32354b71649a8c11f7b9790467b003d7f13b45eba6033e1b3fe7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (11 members, 64 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1912-1996 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1857-1941 | archive/kt-sft/ktransformers/models/modeling_llama.py:1471-1558 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1576-1651 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1606-1681 | archive/ktransformers/models/modeling_deepseek.py:1908-1992 | archive/ktransformers/models/modeling_deepseek_v3.py:1871-1955 | archive/ktransformers/models/modeling_llama.py:1470-1557 | archive/ktransformers/models/modeling_mixtral.py:1575-1650 | archive/ktransformers/models/modeling_qwen2_moe.py:1605-1680 | kt-kernel/examples/modeling_deepseek_v3.py:1853-1937 \u2014 These 11 members are variants of one another: a block of 64 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1d48666fd828d50ba9cfb4a3c1ae751a04d62e63207e7a52252562129919b40"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (7 members, 36 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:806-891 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:765-861 | archive/kt-sft/ktransformers/operators/attention.py:89-195 | archive/ktransformers/models/modeling_deepseek.py:805-890 | archive/ktransformers/models/modeling_deepseek_v3.py:769-865 | archive/ktransformers/operators/attention.py:88-194 | kt-kernel/examples/modeling_deepseek_v3.py:762-858 \u2014 These 7 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"2769eddef3d3011d5ebe6011a0cdf4649eef26df0d9372179afa90c32daf44fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (7 members, 32 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1437-1561 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1403-1521 | archive/kt-sft/ktransformers/models/modeling_llama.py:1006-1132 | archive/ktransformers/models/modeling_deepseek.py:1436-1560 | archive/ktransformers/models/modeling_deepseek_v3.py:1409-1527 | archive/ktransformers/models/modeling_llama.py:1005-1131 | kt-kernel/examples/modeling_deepseek_v3.py:1400-1518 \u2014 These 7 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"050fa078144d139bc8671958abad0e77d3012183a4c043ad845118dce984f12e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 49 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1437-1561 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1403-1521 | archive/kt-sft/ktransformers/operators/models.py:593-832 | archive/ktransformers/models/modeling_deepseek.py:1436-1560 | archive/ktransformers/models/modeling_deepseek_v3.py:1409-1527 | kt-kernel/examples/modeling_deepseek_v3.py:1400-1518 \u2014 These 6 members are variants of one another: a block of 49 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa3dbff7c42692a6307e3b469d475b8ec8ceb5ebf872b8878856f2ecc6d7b24"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 48 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:650-736 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:725-794 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:726-794 | archive/ktransformers/models/modeling_llama.py:649-735 | archive/ktransformers/models/modeling_mixtral.py:724-793 | archive/ktransformers/models/modeling_qwen2_moe.py:725-793 \u2014 These 6 members are variants of one another: a block of 48 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"42feb0cf454f7b69155bc28c5d27108303b79678d4b4bfbc85ea9aa3ca10965c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 36 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1437-1561 | archive/kt-sft/ktransformers/models/modeling_llama.py:1006-1132 | archive/kt-sft/ktransformers/operators/models.py:1198-1284 | archive/ktransformers/models/modeling_deepseek.py:1436-1560 | archive/ktransformers/models/modeling_llama.py:1005-1131 | archive/ktransformers/operators/models.py:1207-1293 \u2014 These 6 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48ea8cce5c3c8931e6ddd73a58655d224da8040bda0d680cddd9bbae2399a04"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 30 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:379-494 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:341-402 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:332-393 | archive/ktransformers/models/modeling_llama.py:378-493 | archive/ktransformers/models/modeling_mixtral.py:340-401 | archive/ktransformers/models/modeling_qwen2_moe.py:331-392 \u2014 These 6 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f97ec903df42dc493e992e764800f20f9398021a260130df7a7aeeab845442"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 30 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:1706-1745 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1699-1736 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1729-1766 | archive/ktransformers/models/modeling_llama.py:1705-1744 | archive/ktransformers/models/modeling_mixtral.py:1698-1735 | archive/ktransformers/models/modeling_qwen2_moe.py:1728-1765 \u2014 These 6 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a18397cf070a1348e968b13c2d169fc4183099d43725c32b42013a04f283a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 26 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:525-625 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:424-547 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:425-545 | archive/ktransformers/models/modeling_llama.py:524-624 | archive/ktransformers/models/modeling_mixtral.py:423-546 | archive/ktransformers/models/modeling_qwen2_moe.py:424-544 \u2014 These 6 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ffa6190df662d1edc452c169983c95878358cea91a1d4d02d4fe10d4d60113"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 19 shared lines): archive/kt-sft/ktransformers/operators/experts.py:1959-2008 | archive/kt-sft/ktransformers/operators/experts.py:2072-2130 | archive/kt-sft/ktransformers/operators/experts.py:2195-2252 | archive/ktransformers/operators/experts.py:1501-1550 | archive/ktransformers/operators/experts.py:1614-1672 | archive/ktransformers/operators/experts.py:1977-2038 \u2014 These 6 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1959}}}],"partialFingerprints":{"codehealthFindingId/v1":"989277430a52610d41117b6151621d8e4a6ea5ec9223a527769dbd15e1909d5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 15 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:806-891 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:341-402 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:332-393 | archive/ktransformers/models/modeling_deepseek.py:805-890 | archive/ktransformers/models/modeling_mixtral.py:340-401 | archive/ktransformers/models/modeling_qwen2_moe.py:331-392 \u2014 These 6 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"2499447e1e176e9efaacd1548221f744842c0f0ac50c340a1a8b658a364c591b"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 14 shared lines): archive/csrc/custom_marlin/utils/marlin_utils.py:87-116 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:87-116 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:85-114 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:123-152 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:85-114 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:123-152 \u2014 These 6 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18386635a8f60b83be8fc701561486ea42646daa9981125d981d121c065aa34"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 63 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:676-740 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:635-699 | archive/ktransformers/models/modeling_deepseek.py:675-739 | archive/ktransformers/models/modeling_deepseek_v3.py:639-703 | kt-kernel/examples/modeling_deepseek_v3.py:632-696 \u2014 These 5 members are variants of one another: a block of 63 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"a40896f3a9d6e850ade1bc9dd26c9467b13df57a57488596add071082977584f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 27 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:520-557 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:485-524 | archive/ktransformers/models/modeling_deepseek.py:519-556 | archive/ktransformers/models/modeling_deepseek_v3.py:489-528 | kt-kernel/examples/modeling_deepseek_v3.py:482-521 \u2014 These 5 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a23580c21665744345ceba8406396115244a58b94f7728eea095ab9836f78f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 26 shared lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1138-1254 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1129-1245 | archive/ktransformers/models/modeling_mixtral.py:1137-1253 | archive/ktransformers/models/modeling_qwen2_moe.py:1128-1244 | archive/ktransformers/models/modeling_smallthinker.py:499-599 \u2014 These 5 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0517389480200937b96e47e7ed76020f4ed52eaa89eb3094e9b5164295603a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 21 shared lines): archive/kt-sft/ktransformers/operators/experts.py:1959-2008 | archive/kt-sft/ktransformers/operators/experts.py:2072-2130 | archive/ktransformers/operators/experts.py:1501-1550 | archive/ktransformers/operators/experts.py:1614-1672 | archive/ktransformers/operators/experts.py:1737-1806 \u2014 These 5 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1959}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbde76afc32d774c89f3d2864e4f26c8e9b15912f585fa6ab783377c27e5a74"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 80 shared lines): archive/kt-sft/ktransformers/operators/attention.py:209-348 | archive/kt-sft/ktransformers/operators/attention.py:362-524 | archive/ktransformers/operators/attention.py:208-347 | archive/ktransformers/operators/attention.py:361-523 \u2014 These 4 members are variants of one another: a block of 80 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d2c3567861e5dd5c39d991472edb937b9508602a234b4f42917c373a4eee49"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 77 shared lines): archive/csrc/custom_marlin/utils/format24.py:185-276 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:185-276 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:185-276 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:185-276 \u2014 These 4 members are variants of one another: a block of 77 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92e0ced92988a92d40efc02b30f7e2abfbfa50d3eaa090347085f31e23c5eb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 50 shared lines): archive/csrc/custom_marlin/utils/quant_utils.py:69-134 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:69-134 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:38-98 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:38-98 \u2014 These 4 members are variants of one another: a block of 50 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd0aca7435ab015fec8c038f9e4ab47a46c94db31235bc1124e5fb494c9d802"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 46 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:379-494 | archive/kt-sft/ktransformers/operators/attention.py:798-874 | archive/ktransformers/models/modeling_llama.py:378-493 | archive/ktransformers/operators/attention.py:797-873 \u2014 These 4 members are variants of one another: a block of 46 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"571090c3eec4496f1c3379ab7b641d378e75d429687bf8096e1d40d1e00e5230"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 43 shared lines): archive/kt-sft/ktransformers/models/modeling_llama.py:1006-1132 | archive/kt-sft/ktransformers/operators/models.py:1061-1183 | archive/ktransformers/models/modeling_llama.py:1005-1131 | archive/ktransformers/operators/models.py:1070-1192 \u2014 These 4 members are variants of one another: a block of 43 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f2df25b15ef0be1661452dfb08efd631e537a50b7250157d3806fc205ca360"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 41 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:290-331 | archive/ktransformers/models/modeling_deepseek_v3.py:294-335 | kt-kernel/examples/modeling_deepseek_v3.py:287-328 | kt-kernel/examples/torch_attention.py:273-317 \u2014 These 4 members are variants of one another: a block of 41 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9711d315aa1c4d99d594a351036bd6e257c608709eaf5430f7d439011b172dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 37 shared lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:563-658 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:559-661 | archive/ktransformers/models/modeling_mixtral.py:562-657 | archive/ktransformers/models/modeling_qwen2_moe.py:558-660 \u2014 These 4 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"795ad9eef81174a3d49a4ac44063ecc1926941378cfdc76451d31532b936d573"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 34 shared lines): archive/kt-sft/ktransformers/util/custom_loader.py:297-376 | archive/kt-sft/ktransformers/util/weight_loader.py:229-285 | archive/ktransformers/util/custom_loader.py:324-403 | archive/ktransformers/util/weight_loader.py:229-285 \u2014 These 4 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"260d83f0fa233a751906713a9335a4695991939c5ed2a0c6cb0ef27f33a99bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 32 shared lines): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:71-115 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:343-457 | archive/ktransformers/operators/balance_serve_attention.py:74-118 | archive/ktransformers/operators/balance_serve_attention.py:346-460 \u2014 These 4 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f4163b64f4d7ae42dd9ac5296b16860b29bba3f8e789b96c77818ab311ea11"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 27 shared lines): archive/kt-sft/ktransformers/operators/cpuinfer.py:439-471 | archive/kt-sft/ktransformers/operators/cpuinfer.py:478-510 | archive/ktransformers/operators/cpuinfer.py:439-471 | archive/ktransformers/operators/cpuinfer.py:478-510 \u2014 These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e83335178b81e6ab4e43a80adf18a7b8c912c91536dac8ca78dfaadc6e6fbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 25 shared lines): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:99-188 | archive/merge_tensors/merge_safetensor_gguf.py:99-188 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:104-195 | kt-kernel/scripts/check.py:166-235 \u2014 These 4 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"24dd28ee80e05fee04d98d98f8255076f2de64ad0719cd2cc41f52eef6385d43"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 23 shared lines): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:32-92 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:95-161 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:37-97 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:100-166 \u2014 These 4 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"402d405312f8a2b583f768405c3e876be24eaca24aca772c4f5e0327a35a4d02"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 21 shared lines): archive/kt-sft/ktransformers/operators/experts.py:1384-1434 | archive/kt-sft/ktransformers/operators/experts.py:1687-1730 | archive/ktransformers/operators/experts.py:772-822 | archive/ktransformers/operators/experts.py:1077-1120 \u2014 These 4 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1384}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c799c31bdbedb6a6225e0112a5eee244555e58b810cc17984aad97f9507f112"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 17 shared lines): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:332-393 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:726-794 | archive/ktransformers/models/modeling_qwen2_moe.py:331-392 | archive/ktransformers/models/modeling_qwen2_moe.py:725-793 \u2014 These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab67e48a7bbca9b6549d2d31e151d861cba7eef22b91b7ca25a298ee8e4a6d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 16 shared lines): archive/kt-sft/ktransformers/operators/experts.py:1488-1524 | archive/kt-sft/ktransformers/operators/experts.py:1587-1624 | archive/ktransformers/operators/experts.py:876-912 | archive/ktransformers/operators/experts.py:975-1012 \u2014 These 4 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1488}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e805c9511abc4401b83a795ad12b3f7a72c3de59c70b22fa73d591f3f99971"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 111 shared lines): archive/kt-sft/ktransformers/operators/models.py:234-444 | archive/kt-sft/ktransformers/operators/models.py:1520-1723 | archive/ktransformers/operators/models.py:231-441 \u2014 These 3 members are variants of one another: a block of 111 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c80f89ade81af65f78d84c41657ce3cdd3be027af7dc8064be689a882acc6b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 46 shared lines): archive/kt-sft/ktransformers/operators/attention.py:537-590 | archive/ktransformers/operators/ascend/ascend_attention.py:428-484 | archive/ktransformers/operators/attention.py:536-589 \u2014 These 3 members are variants of one another: a block of 46 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54719d5942863d9db6cf8b29dfb1d76211e46981ff4ece8fad66918778e3edb"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 25 shared lines): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:344-375 | archive/ktransformers/models/modeling_deepseek_v3.py:348-379 | kt-kernel/examples/modeling_deepseek_v3.py:341-372 \u2014 These 3 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ad439377921aeb8b53e49b02396e44e5b440493f44fe4bc51316cdb3d2e507"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 23 shared lines): archive/kt-sft/ktransformers/util/custom_loader.py:48-81 | archive/ktransformers/util/custom_loader.py:58-91 | kt-kernel/python/utils/loader.py:154-191 \u2014 These 3 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"08950d04642ef77f661e3ff692ec6666d2946d8e225ef3598991f214490a39ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (262 shared lines): kt-kernel/scripts/convert_cpu_weights.py:802-1093 | kt-kernel/scripts/convert_cpu_weights_ds4.py:869-1233 \u2014 These two members are variants of one another: 262 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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"8631f977a012b26a22f80e92bc3856875dd699df3a0c1474fd69bd0a5da589af"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (135 shared lines): archive/kt-sft/ktransformers/server/args.py:11-157 | archive/ktransformers/server/args.py:15-176 \u2014 These two members are variants of one another: 135 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":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a6246f0b37b1e4a2a30270c5c93c0de895df5d2ec18f77a10e55d0407cf550e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (116 shared lines): archive/ktransformers/server/balance_serve/inference/forward_batch.py:214-463 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:477-715 \u2014 These two members are variants of one another: 116 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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"2180a564bee79a4d0468e4c0878e63aad561d853feba53a543380277b6eab8c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (112 shared lines): archive/kt-sft/ktransformers/util/utils.py:347-525 | archive/ktransformers/util/utils.py:398-807 \u2014 These two members are variants of one another: 112 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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab597e6934f948e17592256bbd74877ff37fc0d21d148e67889047b40d31a615"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (77 shared lines): kt-kernel/scripts/convert_cpu_weights.py:698-786 | kt-kernel/scripts/convert_cpu_weights_ds4.py:765-853 \u2014 These two members are variants of one another: 77 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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9b91368369e57c11bafd6471a9363f9f674b7c82dda6f3fba78d6489df390d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (64 shared lines): archive/kt-sft/ktransformers/local_chat.py:110-381 | archive/ktransformers/local_chat.py:90-254 \u2014 These two members are variants of one another: 64 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":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eec3594969b84f4258e98ceca6e29164cc2d325bf9a4ac70c5d534bb6d40692"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (60 shared lines): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:422-492 | archive/ktransformers/server/backend/interfaces/balance_serve.py:602-677 \u2014 These two members are variants of one another: 60 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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b11ba8e2683327e0834c94f6e866ee7bbe0226c666bfdae1c53129733b9511d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (53 shared lines): archive/ktransformers/operators/ascend/ascend_attention.py:152-327 | archive/ktransformers/operators/attention.py:88-194 \u2014 These two members are variants of one another: 53 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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c13aad001605cb7231791b42178afe2eea26b86820c4817b088d2cfab366886"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (46 shared lines): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:115-205 | archive/ktransformers/server/backend/interfaces/balance_serve.py:153-297 \u2014 These two members are variants of one another: 46 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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a107a999648136b612b80b931a5bc59130934744dad8af4ea812ee9e764bf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (41 shared lines): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:160-221 | archive/ktransformers/server/balance_serve/inference/model_runner.py:268-347 \u2014 These two members are variants of one another: 41 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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"961698def992aea76993cd1063b0b742b63b4f4a97d04e9b64eede1522dd1753"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (31 shared lines): archive/kt-sft/ktransformers/operators/experts.py:1784-1822 | archive/ktransformers/operators/experts.py:1174-1212 \u2014 These two members are variants of one another: 31 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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"7661ffa1c9634152c8a6a73e3fdebfc7b1905e29d3c0f416e56c1308094786e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (27 shared lines): kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:172-253 | kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:267-324 \u2014 These two members are variants of one another: 27 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":"kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf81f1e3c7cfa2d400a665827db6da2eca7400a755f71092dd31929d1620fead"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (23 shared lines): archive/kt-sft/ktransformers/util/utils.py:167-251 | archive/ktransformers/util/utils.py:233-261 \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e14d0c60b5f3b140da61f9b59bd6f10e3d374e2759755bdafeaff1b7b39a7e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:309-348 | archive/ktransformers/operators/experts.py:323-362 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"33b05dc58398c70391fd5168e1c1f1696e8269ce74b3f96cb6be311c7d12f71a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:354-403 | archive/ktransformers/util/custom_gguf.py:361-410 \u2014 These two members are one piece of code written twice and then edited apart: 50 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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddc526dcf9bfd089020c0d663c573f6e8a1182e776c6bda3cef33c6b516903b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): archive/ktransformers/util/custom_gguf.py:667-746 | kt-kernel/python/utils/loader.py:90-135 \u2014 These two members are one piece of code written twice and then edited apart: 46 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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"0012c6e13f00696d7a332e4279a575bc0cc0544dc6d96153d07271b37df4aa77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:480-503 | archive/ktransformers/util/custom_gguf.py:487-510 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a0b0e4ad676b6d82c22ccf9c0743f1263b00a787dabb9debe91443dcb599ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): archive/kt-sft/ktransformers/util/utils.py:167-251 | archive/ktransformers/util/utils.py:264-307 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce2cdeb5c26e311f6eeb7f31670725928011fb2dc9ba2202b823374abf26bdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:270-305 | archive/ktransformers/util/custom_gguf.py:277-312 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabbe2b21f7153c2fecd1ea0484bc1810acba45643d4c566ff90386461524a11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:280-293 | archive/ktransformers/operators/experts.py:294-307 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"45921161aaeb53887d86600db4bcd453a492e47f90d56f15d6ed63b2d75d30e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:322-337 | archive/ktransformers/util/custom_gguf.py:329-344 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0242b9cfef8cd710cff1ac0e27084bd363c72a3426552b7ed37e7e4a93321d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): archive/csrc/custom_marlin/utils/quant_utils.py:42-65 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:42-65 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e90206ad0af01af9a1f94fb5d420a993a10c132b29120373e7d1145d455e4a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): kt-kernel/python/utils/loader.py:1239-1286 | kt-kernel/python/utils/loader.py:1405-1454 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1deb0ffc866e788c225d276dcc44a1c85db2513c3bcc1f2a27c9867c6de415"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:272-311 | archive/ktransformers/models/modeling_deepseek.py:271-310 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f90beea408f5f5a9ccbdbba676269db8bf3ee0e914450f6bb15a623c48bfd2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): archive/kt-sft/ktransformers/operators/RoPE.py:289-325 | archive/ktransformers/operators/RoPE.py:290-326 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b6736e3892d902ac0d590ec513d1c2bea634defe674818c52d4011977d805d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): archive/kt-sft/ktransformers/util/weight_loader.py:60-100 | archive/ktransformers/util/weight_loader.py:60-100 \u2014 These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"4edb4aaed7f644f101512d38cc9d20e2f423e081722a2a73a7449d8f57d7a980"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:537-551 | archive/ktransformers/util/custom_gguf.py:544-558 \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"5664ba5aec454179fcae5c81cf1d8bfb284bcceb7624736949915f8372c02d56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:223-253 | archive/ktransformers/util/custom_gguf.py:230-260 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"f168bc5b2a253434f4c3f51fa5928fad3d4bd4049dabc1f798b849c946fbaa0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:872-886 | archive/ktransformers/operators/experts.py:450-464 \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f9d04a5dacc35df5fc312d145fb31b2e8b5ae9c75e4562724810b49be4303e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): archive/kt-sft/ktransformers/operators/linear.py:904-918 | archive/ktransformers/operators/linear.py:919-933 \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a288c590882212ab7ec9772020642853817f5098fc5342316af912046150031"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): kt-kernel/python/utils/loader.py:467-531 | kt-kernel/python/utils/loader.py:1128-1182 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"95114b12f7712d73bd1e32ebd901d654259785d1d833e596200ed4d9e674556f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:108-113 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:115-120 \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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc02fd7fcbda85ca011dbfbb867d30fc02a91dc7d066824fc5ebc72a7ce8163"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (21 members, 50\u002B identical tokens): archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:50-78 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:50-78 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:583-655 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:540-612 | archive/kt-sft/ktransformers/operators/experts.py:1552-1582 | archive/kt-sft/ktransformers/operators/experts.py:1652-1682 | archive/kt-sft/ktransformers/operators/experts.py:1851-1881 | archive/kt-sft/ktransformers/operators/experts.py:2037-2067 | archive/kt-sft/ktransformers/operators/experts.py:2159-2189 | archive/kt-sft/ktransformers/operators/experts.py:2280-2310 | archive/ktransformers/models/modeling_deepseek.py:582-654 | archive/ktransformers/models/modeling_deepseek_v3.py:544-616 | archive/ktransformers/operators/experts.py:940-970 | archive/ktransformers/operators/experts.py:1042-1072 | archive/ktransformers/operators/experts.py:1241-1271 | archive/ktransformers/operators/experts.py:1579-1609 | archive/ktransformers/operators/experts.py:1701-1731 | archive/ktransformers/operators/experts.py:1835-1865 | archive/ktransformers/operators/experts.py:1941-1971 | archive/ktransformers/operators/experts.py:2067-2097 | kt-kernel/examples/modeling_deepseek_v3.py:537-609 \u2014 These 21 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 21 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 21 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe_torch.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"18895ae5823e8ebf5a3b22b910522506e51c48480ae2ef52871d1d0adf3c5d2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (18 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:139-150 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:316-327 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:218-228 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:199-210 | archive/kt-sft/ktransformers/operators/RoPE.py:84-95 | archive/kt-sft/ktransformers/operators/RoPE.py:263-274 | archive/kt-sft/ktransformers/operators/RoPE.py:387-398 | archive/ktransformers/models/modeling_deepseek.py:138-149 | archive/ktransformers/models/modeling_deepseek.py:315-326 | archive/ktransformers/models/modeling_mixtral.py:217-227 | archive/ktransformers/models/modeling_qwen2_moe.py:198-209 | archive/ktransformers/models/modeling_smallthinker.py:417-427 | archive/ktransformers/operators/RoPE.py:85-96 | archive/ktransformers/operators/RoPE.py:264-275 | archive/ktransformers/operators/RoPE.py:388-399 | archive/ktransformers/operators/RoPE.py:474-484 | archive/ktransformers/operators/RoPE.py:515-530 | kt-kernel/examples/torch_attention.py:159-170 \u2014 These 18 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 18 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 18 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5ca0a10cdf2f4e8cc9cf23842702db1ae0672331e477a8fd230bf53b48e859"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (14 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1303-1311 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1269-1277 | archive/kt-sft/ktransformers/models/modeling_llama.py:868-876 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1004-1012 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:992-1000 | archive/kt-sft/ktransformers/operators/models.py:973-981 | archive/ktransformers/models/modeling_deepseek.py:1302-1310 | archive/ktransformers/models/modeling_deepseek_v3.py:1275-1283 | archive/ktransformers/models/modeling_llama.py:867-875 | archive/ktransformers/models/modeling_mixtral.py:1003-1011 | archive/ktransformers/models/modeling_qwen2_moe.py:991-999 | archive/ktransformers/models/modeling_smallthinker.py:445-455 | archive/ktransformers/operators/models.py:982-990 | kt-kernel/examples/modeling_deepseek_v3.py:1266-1274 \u2014 These 14 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 14 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc03a6223854bf0e9449d27de17f3b24ce8c3fc7ed47c2dbb3425088d59b4c3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (14 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1536-1547 | archive/kt-sft/ktransformers/operators/experts.py:1636-1647 | archive/kt-sft/ktransformers/operators/experts.py:1835-1846 | archive/kt-sft/ktransformers/operators/experts.py:2021-2032 | archive/kt-sft/ktransformers/operators/experts.py:2143-2154 | archive/kt-sft/ktransformers/operators/experts.py:2264-2275 | archive/ktransformers/operators/experts.py:924-935 | archive/ktransformers/operators/experts.py:1026-1037 | archive/ktransformers/operators/experts.py:1225-1236 | archive/ktransformers/operators/experts.py:1563-1574 | archive/ktransformers/operators/experts.py:1685-1696 | archive/ktransformers/operators/experts.py:1819-1830 | archive/ktransformers/operators/experts.py:1925-1936 | archive/ktransformers/operators/experts.py:2051-2062 \u2014 These 14 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 14 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e6d7f54eaf72cfe38702abf79c9bbbcd26d7269bfcdbec29f7cf092cd620b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (13 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:139-150 | archive/kt-sft/ktransformers/models/modeling_llama.py:165-188 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:218-228 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:199-210 | archive/kt-sft/ktransformers/operators/RoPE.py:84-95 | archive/kt-sft/ktransformers/operators/RoPE.py:387-398 | archive/ktransformers/models/modeling_deepseek.py:138-149 | archive/ktransformers/models/modeling_llama.py:164-187 | archive/ktransformers/models/modeling_mixtral.py:217-227 | archive/ktransformers/models/modeling_qwen2_moe.py:198-209 | archive/ktransformers/operators/RoPE.py:85-96 | archive/ktransformers/operators/RoPE.py:388-399 | kt-kernel/examples/torch_attention.py:159-170 \u2014 These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"04670239308aed1864f8bfc60b3c20a16aa5a96adafd0d1af5ddbf3b55100f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (13 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:659-669 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:617-627 | archive/kt-sft/ktransformers/models/modeling_llama.py:302-312 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:272-280 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:267-275 | archive/kt-sft/ktransformers/operators/attention.py:950-958 | archive/ktransformers/models/modeling_deepseek.py:658-668 | archive/ktransformers/models/modeling_deepseek_v3.py:621-631 | archive/ktransformers/models/modeling_llama.py:301-311 | archive/ktransformers/models/modeling_mixtral.py:271-279 | archive/ktransformers/models/modeling_qwen2_moe.py:266-274 | archive/ktransformers/models/modeling_smallthinker.py:202-210 | kt-kernel/examples/modeling_deepseek_v3.py:614-624 \u2014 These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d91de0396c62a081c25b343caa07803a64f6fb2b75f9fcccd9d53fa0644de87"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (13 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1577-1642 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1537-1602 | archive/kt-sft/ktransformers/models/modeling_llama.py:1147-1234 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1270-1335 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1261-1326 | archive/kt-sft/ktransformers/operators/models.py:1299-1386 | archive/ktransformers/models/modeling_deepseek.py:1576-1641 | archive/ktransformers/models/modeling_deepseek_v3.py:1543-1608 | archive/ktransformers/models/modeling_llama.py:1146-1233 | archive/ktransformers/models/modeling_mixtral.py:1269-1334 | archive/ktransformers/models/modeling_qwen2_moe.py:1260-1325 | archive/ktransformers/operators/models.py:1308-1395 | kt-kernel/examples/modeling_deepseek_v3.py:1534-1599 \u2014 These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2952179c7e281d0e47249c7451b60b251b05dff57f93edf36b4defb3249912"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:58-68 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:62-72 | archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:49-59 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:49-59 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:58-68 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:62-72 | archive/ktransformers/models/custom_modeling_glm4_moe.py:50-60 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:49-59 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:49-59 | archive/ktransformers/models/custom_modeling_qwen3_next.py:51-61 | archive/ktransformers/models/custom_modeling_smallthinker.py:50-60 \u2014 These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"947c799bc812cbb121c831b5dbd97bfd37dc8aa389b6e8a2b17c38412f63fb82"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1694-1775 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1652-1733 | archive/kt-sft/ktransformers/models/modeling_llama.py:1285-1375 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1388-1481 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1379-1471 | archive/ktransformers/models/modeling_deepseek.py:1692-1771 | archive/ktransformers/models/modeling_deepseek_v3.py:1659-1747 | archive/ktransformers/models/modeling_llama.py:1284-1374 | archive/ktransformers/models/modeling_mixtral.py:1387-1480 | archive/ktransformers/models/modeling_qwen2_moe.py:1378-1470 | kt-kernel/examples/modeling_deepseek_v3.py:1649-1729 \u2014 These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ee726e662916c49bb3b5f7bd8c435b04e82576fedc4da9947b3ccaff085cf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1787-1852 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1743-1797 | archive/kt-sft/ktransformers/models/modeling_llama.py:1391-1423 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1498-1527 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1483-1548 | archive/ktransformers/models/modeling_deepseek.py:1783-1848 | archive/ktransformers/models/modeling_deepseek_v3.py:1757-1811 | archive/ktransformers/models/modeling_llama.py:1390-1422 | archive/ktransformers/models/modeling_mixtral.py:1497-1526 | archive/ktransformers/models/modeling_qwen2_moe.py:1482-1547 | kt-kernel/examples/modeling_deepseek_v3.py:1739-1793 \u2014 These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e812b046a510618895687e64716f6f2975053150086f8b09747a6c1ae4621c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1133-1173 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1099-1139 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:662-701 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:665-704 | archive/ktransformers/models/modeling_deepseek.py:1132-1172 | archive/ktransformers/models/modeling_deepseek_v3.py:1103-1143 | archive/ktransformers/models/modeling_mixtral.py:661-700 | archive/ktransformers/models/modeling_qwen2_moe.py:664-703 | kt-kernel/examples/modeling_deepseek_v3.py:1096-1136 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"b21f93c8f26363c64b3580f2d1332ddc82d04269c1ca43285bebbc462834f063"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/balance_serve/settings.py:17-66 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:70-119 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:124-173 | archive/ktransformers/server/balance_serve/settings.py:20-68 | archive/ktransformers/server/balance_serve/settings.py:72-121 | archive/ktransformers/server/balance_serve/settings.py:126-175 | archive/ktransformers/server/balance_serve/settings.py:178-227 | archive/ktransformers/server/balance_serve/settings.py:230-279 | archive/ktransformers/server/balance_serve/settings.py:282-331 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8573674c367a9c6007113bd45e7050b560900bec330e86e38cc1994afb836d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_24_perms.py:22-55 | archive/csrc/custom_marlin/utils/marlin_perms.py:22-55 | archive/kt-sft/csrc/custom_marlin/utils/marlin_24_perms.py:22-55 | archive/kt-sft/csrc/custom_marlin/utils/marlin_perms.py:22-55 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:17-50 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:17-50 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:17-50 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:17-50 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_24_perms.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"de71e3960af2162e9f25bc858570e4c9fdb0fe5c50ca95e57aca9c695d779703"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:80-136 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:85-132 | archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:72-116 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:72-116 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:80-136 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:85-132 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:72-116 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:72-116 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20d629e890db40b35e86c9c4d976c7d02787954b68256789d4467bef6c718ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/util/custom_gguf.py:256-263 | archive/kt-sft/ktransformers/util/custom_gguf.py:308-315 | archive/kt-sft/ktransformers/util/custom_gguf.py:340-347 | archive/kt-sft/ktransformers/util/custom_gguf.py:406-413 | archive/ktransformers/util/custom_gguf.py:263-270 | archive/ktransformers/util/custom_gguf.py:315-322 | archive/ktransformers/util/custom_gguf.py:347-354 | archive/ktransformers/util/custom_gguf.py:413-420 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0cb8f5bdfbff91a127580bf73cbe4ce8a2ab7a1159cd89dec7b18af01f9aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): kt-kernel/python/cli/commands/run.py:111-167 | kt-kernel/python/experts.py:165-266 | kt-kernel/python/experts.py:434-466 | kt-kernel/python/sft/amx.py:121-235 | kt-kernel/python/utils/amx.py:329-400 | kt-kernel/python/utils/amx.py:630-736 | kt-kernel/python/utils/llamafile.py:55-152 | kt-kernel/python/utils/moe_kernel.py:54-123 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cdcc83313d83ea35c0e2a8211ff40bc6f8d1a4be2f0b3ab63638a319904e19e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:41-55 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:44-59 | archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:38-62 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:41-55 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:44-59 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:45-69 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9c8dbe4518a704a687eb5869ad452940b735e05e79b5a0d744ef86510cb903"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_llama.py:1671-1684 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1664-1677 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1694-1707 | archive/ktransformers/models/modeling_llama.py:1670-1683 | archive/ktransformers/models/modeling_mixtral.py:1663-1676 | archive/ktransformers/models/modeling_qwen2_moe.py:1693-1706 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1671}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ea9d512b148b5381714077f0681d668e6c4ee91ff000dd9fcb5115170b1d52"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/dynamic_attention.py:519-531 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:534-547 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:550-562 | archive/ktransformers/operators/dynamic_attention.py:519-531 | archive/ktransformers/operators/dynamic_attention.py:534-547 | archive/ktransformers/operators/dynamic_attention.py:550-562 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"e703d4bebab8ff5c9ae1364b7f3d3eb19f8b5bde639edaf4dd37a5ebc15237d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1309-1321 | archive/kt-sft/ktransformers/operators/experts.py:1895-1907 | archive/ktransformers/operators/experts.py:698-710 | archive/ktransformers/operators/experts.py:1285-1303 | archive/ktransformers/operators/experts.py:1366-1376 | archive/ktransformers/operators/experts.py:1438-1448 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6809a74cc12a23f0280ec6d26fa400fff231102bbfcf140dd58c45a1a55b059"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1325-1341 | archive/kt-sft/ktransformers/operators/experts.py:1911-1927 | archive/ktransformers/operators/experts.py:714-730 | archive/ktransformers/operators/experts.py:1307-1323 | archive/ktransformers/operators/experts.py:1380-1396 | archive/ktransformers/operators/experts.py:1452-1468 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1325}}}],"partialFingerprints":{"codehealthFindingId/v1":"67826a300b283bd1fecc0f0e73b18f0af68eb5a070755db00e67d2a0b2082b28"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1365-1372 | archive/kt-sft/ktransformers/operators/experts.py:1947-1954 | archive/ktransformers/operators/experts.py:750-757 | archive/ktransformers/operators/experts.py:1343-1350 | archive/ktransformers/operators/experts.py:1416-1423 | archive/ktransformers/operators/experts.py:1488-1495 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1365}}}],"partialFingerprints":{"codehealthFindingId/v1":"dccc379b10ef04fb04d3be08871df5b55b245886253034e041653be9de2dfdc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): archive/ktransformers/operators/ascend/ascend_attention.py:152-327 | archive/ktransformers/operators/ascend/ascend_attention.py:340-414 | archive/ktransformers/operators/ascend/ascend_attention.py:573-754 | archive/ktransformers/operators/ascend/ascend_attention.py:773-849 | archive/ktransformers/operators/ascend/ascend_attention.py:1013-1153 | archive/ktransformers/operators/ascend/ascend_attention.py:1171-1264 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9889e3aba2f22d4b3a601b291cf3d514f4afc9c90b3bbba7cc6275bd7ba8dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/custom_cache.py:261-276 | archive/kt-sft/ktransformers/models/custom_cache.py:312-327 | archive/ktransformers/models/custom_cache.py:451-466 | archive/ktransformers/models/custom_cache.py:502-517 | kt-kernel/examples/torch_attention.py:70-85 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb2360e0a08542be84742c476c4ab6aa235fb8f38fcb881175430b6d49d0a8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:90-100 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:84-94 | archive/ktransformers/models/modeling_deepseek.py:89-99 | archive/ktransformers/models/modeling_deepseek_v3.py:88-98 | kt-kernel/examples/modeling_deepseek_v3.py:81-91 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc7f4e1b6c20f13763e1250c1177f7edeea7ae2c677e23a5e662045d564c9ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:126-134 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:186-194 | archive/ktransformers/models/modeling_deepseek.py:125-133 | archive/ktransformers/models/modeling_qwen2_moe.py:185-193 | kt-kernel/examples/torch_attention.py:146-154 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"178a94fb6ae43f4219302cdd06319f8a2ebf42a118d99c38ef7b480b709e236e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:169-179 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:177-187 | archive/ktransformers/models/modeling_deepseek.py:168-178 | archive/ktransformers/models/modeling_deepseek_v3.py:181-191 | kt-kernel/examples/modeling_deepseek_v3.py:174-184 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bdcffecd34fffb7cdcbd738312b2a8a80efb9feb655a8307824b856ff5c43c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:199-219 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:206-226 | archive/ktransformers/models/modeling_deepseek.py:198-218 | archive/ktransformers/models/modeling_deepseek_v3.py:210-230 | kt-kernel/examples/modeling_deepseek_v3.py:203-223 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f1bf9eb0068916a06cf31b75bb2ff4b03dc52c48d0b405bba3f23ac0e15ac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:370-380 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:380-390 | archive/ktransformers/models/modeling_deepseek.py:369-379 | archive/ktransformers/models/modeling_deepseek_v3.py:384-394 | kt-kernel/examples/modeling_deepseek_v3.py:377-387 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb97569719e9a79d54ef088a668bab1cf288353d98caa34af49903c40662f73"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:415-491 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:427-477 | archive/ktransformers/models/modeling_deepseek.py:414-490 | archive/ktransformers/models/modeling_deepseek_v3.py:431-481 | kt-kernel/examples/modeling_deepseek_v3.py:424-474 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a916de3bde930d25e64eb8bef804ac3b8dfe20f12b6c3e29b1f8fa7c83acd75"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1050-1128 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1026-1094 | archive/ktransformers/models/modeling_deepseek.py:1049-1127 | archive/ktransformers/models/modeling_deepseek_v3.py:1030-1098 | kt-kernel/examples/modeling_deepseek_v3.py:1023-1091 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa0f687a399db7595e658a78a96177f2ab46ed7e2dfca0393a62650952f64c45"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_mixtral.py:93-163 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:80-150 | archive/ktransformers/models/modeling_mixtral.py:92-162 | archive/ktransformers/models/modeling_qwen2_moe.py:79-149 | archive/ktransformers/models/modeling_smallthinker.py:765-838 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"d58782bbc3f18038465913ee407dcaf5aabe14e7a3da5b3e4ca15d62a91c17aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:170-201 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:256-290 | archive/ktransformers/operators/balance_serve_attention.py:173-204 | archive/ktransformers/operators/balance_serve_attention.py:259-293 | archive/ktransformers/operators/balance_serve_attention.py:512-550 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcd63b15c3963d8d9d9d0d7404f86fba57e60c60a66be725cfb2afe9d574369"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/models.py:447-477 | archive/kt-sft/ktransformers/operators/models.py:835-863 | archive/kt-sft/ktransformers/operators/models.py:1726-1756 | archive/ktransformers/operators/models.py:444-474 | archive/ktransformers/operators/models.py:844-872 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcb445dc14affcf1a19e0d6722db06e2e9bcc9f05f0a2ff10b1b72ed499e452"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/format24.py:23-46 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:23-46 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:23-46 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:23-46 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e853e5c7c13789620a42acd3c3873028b9ecf1acf7dea86058209ffc52c360"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/format24.py:53-177 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:53-177 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:53-177 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:53-177 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e092761ae9962372601b958b6fc76354e92a30127f6e92ee83589b6da5a2311"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/format24.py:280-308 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:280-308 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:280-308 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:280-308 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4c442d0c3888793f975be23ac767b63a96fbf6cee4aaa439a9b733d858dbbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:36-47 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:36-47 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:34-45 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:34-45 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"26bd90e71c61eb61f69bbe95ec9dc8e91a0a54dc753993bfcff89d26f9bfa03d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:52-67 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:52-67 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:50-65 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:50-65 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"9722e908e1e6dcc1077d3dd3d4170ee02b0d296ac589a8464c655bb5303c7cfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:72-78 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:72-78 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:70-76 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:70-76 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a56a0b7986e7784b1a279a59f03061d65fad8b42c2bb8b5ba999e654e697c187"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:128-151 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:128-151 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:164-187 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:164-187 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeff6409c456f3ff027578a6e1d26d0a1d1cef091908a8efddbf49986d4639e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:155-174 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:155-174 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:191-210 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:191-210 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f300020da1155b0217ec4c93759c02c001c7470959a405dbb3128b60352b1a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/marlin_utils.py:182-215 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:182-215 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:218-251 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:218-251 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ebfd806aa6fb8365e81e50c6d0c948d739fccdcf52c9616b53aa68aea135870"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/quant_utils.py:15-36 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:15-36 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:16-33 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:16-33 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"40eed79cd8b1a8571633d9688438e5f5ba312da68ad0c9ea6444149eff878ad6"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/quant_utils.py:138-150 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:138-150 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:102-114 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:102-114 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"1198607a91fc29d85e4ec516e8c1ea17d49cd49e104e35602b03a949f558b970"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/csrc/custom_marlin/utils/quant_utils.py:159-174 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:159-174 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:123-138 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:123-138 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd6f1a6dd616a6c7c5466e302dd3736287f960c2c50ceed0d928de36c0ee8f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:58-82 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:58-82 | kt-kernel/scripts/convert_cpu_weights.py:35-45 | kt-kernel/scripts/convert_cpu_weights_ds4.py:35-45 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8ad733c2e096f2cdb6a180a95c5e3df6a0f28c6c0f87c6af9e4b32d9769ce3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py:145-177 | archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py:192-230 | archive/ktransformers/models/configuration_qwen2_moe.py:145-177 | archive/ktransformers/models/configuration_qwen3_moe.py:192-230 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67706e7a4ea3f6d99f4fe10ba3a40035ca2e34a5f93d2e5fb001e4e2d32e610"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek.py:339-366 | archive/ktransformers/models/modeling_deepseek.py:338-365 | archive/ktransformers/operators/ascend/ascend_attention.py:40-48 | kt-kernel/examples/torch_attention.py:97-124 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39eb78443f038f4fb63f16b69833066ce51abcb68f10c6b81b290967b140b2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:120-136 | archive/ktransformers/models/modeling_deepseek_v3.py:124-140 | kt-kernel/examples/modeling_deepseek_v3.py:117-133 | kt-kernel/examples/torch_attention.py:174-189 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fcf5342e161e9532a7f7f00ef7885ee1b9da04969446a39f3f8b500d8dd03b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:139-148 | archive/ktransformers/models/modeling_deepseek_v3.py:143-152 | kt-kernel/examples/modeling_deepseek_v3.py:136-145 | kt-kernel/examples/torch_attention.py:193-203 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e2980272f2d54cbbd3724afbc0d1828ea5b67a10cc043619c059e96ff0e886"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_mixtral.py:168-176 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:155-163 | archive/ktransformers/models/modeling_mixtral.py:167-175 | archive/ktransformers/models/modeling_qwen2_moe.py:154-162 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a61df5309a082f0d5ab1fe071c727bafaeeab276d88d186b7b170776d0fb08"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/models/modeling_mixtral.py:913-968 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:895-956 | archive/ktransformers/models/modeling_mixtral.py:912-967 | archive/ktransformers/models/modeling_qwen2_moe.py:894-955 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f55be487ad93e86f4a32a2e34061c4d56b65c730cf7577c0106972ec3c2f190"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/RoPE.py:105-112 | archive/kt-sft/ktransformers/operators/RoPE.py:408-415 | archive/ktransformers/operators/RoPE.py:106-113 | archive/ktransformers/operators/RoPE.py:409-416 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f63e2a40e18900d304ffa419e6cbd3ffe4a15147290417b69bbb7ed9fe219fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:46-59 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:310-323 | archive/ktransformers/operators/balance_serve_attention.py:49-62 | archive/ktransformers/operators/balance_serve_attention.py:313-326 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"44768405b7cf4c3d53f81f9732a9baba9fa4a0bc095789bf9148d438fbf7747c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/dynamic_attention.py:281-370 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:383-463 | archive/ktransformers/operators/dynamic_attention.py:281-370 | archive/ktransformers/operators/dynamic_attention.py:383-463 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02a212d4f1b8a6e530d226140fc11ff9e565d6e9892a86ffc4bb1a6a9a949bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:53-61 | archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:43-51 | archive/ktransformers/operators/experts.py:51-59 | archive/ktransformers/server/balance_serve/inference/model_runner.py:60-68 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f71e72b48e10d0850c3ef6fdf00614f8eea558bc24618ca2e01ea034b7c923d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:355-411 | archive/kt-sft/ktransformers/operators/experts.py:801-857 | archive/kt-sft/ktransformers/operators/gate.py:44-72 | archive/ktransformers/operators/experts.py:369-435 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"9608612781c6bb1d7002da024ad28c37a3b1c02df2a5833a47357151ac434995"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1444-1453 | archive/kt-sft/ktransformers/operators/experts.py:1740-1749 | archive/ktransformers/operators/experts.py:832-841 | archive/ktransformers/operators/experts.py:1130-1139 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead67b6800aa0e03d0bc176b09dda95a6418abfe684314c4bbf6437d09934430"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/experts.py:1937-1944 | archive/ktransformers/operators/experts.py:1333-1340 | archive/ktransformers/operators/experts.py:1406-1413 | archive/ktransformers/operators/experts.py:1478-1485 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1937}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f07757c72f5f76593829439f40fd732d6a39e61a42fa8e765033d5d3e95bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/gate.py:101-110 | archive/kt-sft/ktransformers/operators/gate.py:168-179 | archive/ktransformers/operators/gate.py:111-120 | archive/ktransformers/operators/gate.py:178-189 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa241016f7b961aaa2d6a48ffb4085c573e359f1997595318da8ecb3345842fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/layernorm.py:63-72 | archive/kt-sft/ktransformers/operators/layernorm.py:104-113 | archive/ktransformers/operators/layernorm.py:66-75 | archive/ktransformers/operators/layernorm.py:107-116 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"26b99a1ebf750dd7968bd091d6386b4378c630f2ed7397f8ea67fdbc99f9578e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/layernorm.py:145-157 | archive/ktransformers/operators/layernorm.py:148-160 | archive/ktransformers/operators/layernorm.py:225-237 | archive/ktransformers/operators/layernorm.py:268-280 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f5ac2ee544f30de8c66cc79c88af638c6c6077f930a28a13650f6910c2f9ca1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/linear.py:443-460 | archive/kt-sft/ktransformers/operators/linear.py:599-616 | archive/ktransformers/operators/linear.py:458-475 | archive/ktransformers/operators/linear.py:614-631 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"418ebc224b4da9804953a5e776f806ed8e664048d770a3d5d6185e714c2ab82f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/operators/linear.py:463-507 | archive/kt-sft/ktransformers/operators/linear.py:619-662 | archive/ktransformers/operators/linear.py:478-522 | archive/ktransformers/operators/linear.py:634-677 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"8354e51d6e79a48ab445029e8b03035e8fb7fd8df9bd2c29973980c5cb989cb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:137-509 | archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py:16-80 | archive/ktransformers/server/api/openai/endpoints/chat.py:137-509 | archive/ktransformers/server/api/openai/legacy/completions.py:16-80 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3fca4d02c53a62b719dbc559acc2826e2a8af6833613a43a1f4c633e35f16a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:134-233 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:321-394 | archive/ktransformers/server/backend/interfaces/ktransformers.py:207-350 | archive/ktransformers/server/backend/interfaces/transformers.py:333-406 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"586e9a0508d2a6c8ab84ae7035cb16f000f5a31a0b7ae273f903d456a8e03be3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:54-81 | archive/kt-sft/ktransformers/util/textstream.py:19-47 | archive/ktransformers/server/backend/interfaces/transformers.py:64-91 | archive/ktransformers/util/textstream.py:19-47 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"e949ea09dd70f8d2e8e378c33cee2d1be5fe5c4dc1f22ceb4589d46bc58fcb68"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:97-118 | archive/kt-sft/ktransformers/util/textstream.py:63-84 | archive/ktransformers/server/backend/interfaces/transformers.py:107-128 | archive/ktransformers/util/textstream.py:63-84 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3754cf63591c3ab878950c92349fbb02004247fc7e86c1a15e3b8bbf39e46a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:220-268 | archive/kt-sft/ktransformers/util/utils.py:294-342 | archive/ktransformers/server/backend/interfaces/transformers.py:232-280 | archive/ktransformers/util/utils.py:345-393 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8151a152043ff71b1d1539c912346946ae5d358062099eb3dbb7f8c57b86983"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:172-195 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:245-264 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:741-766 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:822-841 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56b48815834c24469b0e6d986b3c4f517594c83c41eedd1150c9092a1bd40c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/util/custom_gguf.py:465-471 | archive/kt-sft/ktransformers/util/custom_gguf.py:506-512 | archive/ktransformers/util/custom_gguf.py:472-478 | archive/ktransformers/util/custom_gguf.py:513-519 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"15e83c1dac733d8d10373acd0c7b791bb5c38b2df69ef26bcd50f7417fc10d81"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:35-68 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:118-160 | archive/ktransformers/util/modeling_rope_utils.py:35-68 | archive/ktransformers/util/modeling_rope_utils.py:118-160 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c1c2a9bbf21980a5bc43b1faa3ab7c9d5cb93a18074ad4bf9d5a604a45b57e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:166-256 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:262-319 | archive/ktransformers/util/modeling_rope_utils.py:166-256 | archive/ktransformers/util/modeling_rope_utils.py:262-319 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10464548f4e019eb1eb41328036861ae3b0885d1cf7e11ba1faca68758c5daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:416-424 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:530-562 | archive/ktransformers/util/modeling_rope_utils.py:416-424 | archive/ktransformers/util/modeling_rope_utils.py:530-562 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab6512e44c5fea8a405080c91247f441a5dc88122de01bd21074a7160eb38fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:16-54 | archive/merge_tensors/merge_safetensor_gguf.py:16-54 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:28-53 | kt-kernel/scripts/check.py:43-81 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a08c49929b5b00d5ad137de594215172f6fcf921dd2c65aadded1afd69818d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): archive/kt-sft/setup.py:336-348 | archive/kt-sft/setup.py:369-381 | archive/setup.py:317-329 | archive/setup.py:350-362 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba057965d46a7782d3d8d940248c2fa80618691b686069635298be99e29ba88"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): kt-kernel/python/utils/amx.py:409-457 | kt-kernel/python/utils/amx.py:460-602 | kt-kernel/python/utils/moe_kernel.py:132-180 | kt-kernel/python/utils/moe_kernel.py:183-321 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc83f065ad779d4a7cd2c08f6436e97dbb3a0f2ba765567f96f6fe52114e1685"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (240 corresponding lines): archive/kt-sft/ktransformers/operators/models.py:593-832 | archive/ktransformers/operators/models.py:591-841 \u2014 These two members are one piece of code written twice and then edited apart: 240 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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8421f85df8d24ca4194991e56064975be23e8f35297c0bff9476b6f071898f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (108 corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:170-277 | archive/ktransformers/operators/experts.py:170-291 \u2014 These two members are one piece of code written twice and then edited apart: 108 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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b614c7ae6639dff3d23e56e11c3f9df9882d8b0b8aa2f183fb9442680df77f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (148 corresponding lines): kt-kernel/scripts/convert_cpu_weights.py:1105-1252 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1245-1392 \u2014 These two members are one piece of code written twice and then edited apart: 148 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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"0584974723e25059d7552f653e0a9bda1fb3d6cfae74ba3f8d884b6782d54e22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:106-157 | archive/ktransformers/server/balance_serve/inference/model_runner.py:153-204 \u2014 These two members are one piece of code written twice and then edited apart: 52 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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce5e9ff7664e66ea91898d4ba0c10d593eb045ef3d969fed822e9cb6f628390"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (109 corresponding lines): kt-kernel/scripts/convert_cpu_weights.py:391-499 | kt-kernel/scripts/convert_cpu_weights_ds4.py:453-566 \u2014 These two members are one piece of code written twice and then edited apart: 109 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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aedff5b65ed4b0d4bb1f17bcec69997c8fa971a83ba0c8cc541c6027bf757fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (73 corresponding lines): archive/kt-sft/ktransformers/models/custom_cache.py:38-110 | archive/ktransformers/models/custom_cache.py:46-137 \u2014 These two members are one piece of code written twice and then edited apart: 73 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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"797cc13f8a5442557d357d9f3640e1857d630b397c98a3bd13b5115dd5a59f41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (119 corresponding lines): archive/kt-sft/setup.py:510-628 | archive/setup.py:491-611 \u2014 These two members are one piece of code written twice and then edited apart: 119 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":"archive/kt-sft/setup.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf9d41b4ab9796c80cecacd10889697838ec988270b8ea8d2614072857f507a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (99 corresponding lines): archive/kt-sft/ktransformers/util/custom_loader.py:101-199 | archive/ktransformers/util/custom_loader.py:115-223 \u2014 These two members are one piece of code written twice and then edited apart: 99 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":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc7b97d7d5a1a8471b866eb1feebbe9bfff898d8edc760e5f3b0d6891906f3a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:597-680 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1066-1115 \u2014 These two members are one piece of code written twice and then edited apart: 50 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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"882ddfe3b6fbbf02b2338d4fbd499f85c08fc0add525e1a0ba9c8b7a7ab67f59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): archive/kt-sft/ktransformers/operators/linear.py:84-125 | archive/ktransformers/operators/linear.py:93-141 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"24293bae3b230f037c3ecc49bd4324a697755639e00e9795bfb59436a5aab98b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): archive/kt-sft/ktransformers/optimize/optimize.py:56-106 | archive/ktransformers/optimize/optimize.py:68-118 \u2014 These two members are one piece of code written twice and then edited apart: 51 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":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09360728d87c377fec5fb4ee9be703ca386d1171a02d7804d764c62e8a382a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py:58-109 | archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py:96-156 \u2014 These two members are one piece of code written twice and then edited apart: 52 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":"archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"87737ad09f774459d9e5fe7a45c0d5eb08b35a33b77aab9164d54bcf82518200"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): kt-kernel/python/experts_base.py:614-680 | kt-kernel/python/experts_base.py:687-737 \u2014 These two members are one piece of code written twice and then edited apart: 51 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":"kt-kernel/python/experts_base.py"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"53c2f358afc2b030fe026bb92f3d959f2fce29c0639c46ae062f9f8a534c5bbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:398-423 | archive/ktransformers/server/backend/interfaces/transformers.py:410-443 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"8306750928f2a22579dc3066d57ca35af99d5bf96f70b7f5ff3eba49324c156c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:82-100 | archive/ktransformers/server/balance_serve/inference/query_manager.py:124-145 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9bad488e8e39ba3bb1588fc1ff4386bad062163cd319e9bd85a3a2c6d1b134e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 32\u002B corresponding lines): archive/kt-sft/ktransformers/operators/cpuinfer.py:259-290 | archive/kt-sft/ktransformers/operators/cpuinfer.py:295-326 | archive/ktransformers/operators/cpuinfer.py:259-290 | archive/ktransformers/operators/cpuinfer.py:295-326 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 32 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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7535734933701b21c8ccfa2fae2de78eb63be7c61d2100f79dd343a7f5874c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:292-326 | archive/ktransformers/models/modeling_mixtral.py:291-325 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d20793a17b4afb6ccf3b3a725b30702fd398d90b18e7b06233658c295fd6d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:286-320 | archive/ktransformers/models/modeling_qwen2_moe.py:285-319 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"2445c996f8798ce2beb58f46e7bfd2c0956762242e8868fbe114b90614c8b6b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): archive/kt-sft/ktransformers/operators/attention.py:1039-1083 | archive/ktransformers/models/modeling_smallthinker.py:266-314 \u2014 These two members are one piece of code written twice and then edited apart: 45 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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2ad34fde81cf97c6a24ad4d0ce1006382cba9a12aa8c0f6b070a51f61052d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): archive/kt-sft/ktransformers/optimize/optimize.py:21-42 | archive/ktransformers/optimize/optimize.py:29-54 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32ff009aa833be73bb33dd4a80a3f48f4019cfcd331115bbca3668e5ca29169"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 38\u002B corresponding lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:850-887 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:821-863 | archive/ktransformers/models/modeling_mixtral.py:849-886 | archive/ktransformers/models/modeling_qwen2_moe.py:820-862 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 38 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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c943df44801d323231f1fa148245e246c6f4cc8c17f35d7e036df7367c802b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): archive/kt-sft/setup.py:205-243 | archive/setup.py:182-222 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa2073355e65f1c0a9eb8fd7359f70755d8d0038c1676cbf2f2fc6623ce44f34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): archive/ktransformers/models/custom_modeling_glm4_moe.py:73-107 | archive/ktransformers/models/custom_modeling_smallthinker.py:73-106 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"archive/ktransformers/models/custom_modeling_glm4_moe.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a3d23741b7d225d0e010880b93a32ed3603dbbb0424bea68e4b39bff368d3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): kt-kernel/python/sft/autograd.py:44-73 | kt-kernel/python/sft/autograd.py:82-115 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f8e0e0fdba45f16e26e07bf9c590b74828e269c9194360ec9d3cdd771d65c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py:63-100 | archive/ktransformers/server/balance_serve/inference/sampling/sampler.py:68-105 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"171208617063d4fc176b5bfc762b022bd794d86aba2b47d6cec882e413759d45"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:89-101 | archive/ktransformers/server/balance_serve/inference/model_runner.py:136-148 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d287c1f30276b78dfaaa3195fb8f647890c95a98d9cde81587febf77d31683"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:104-153 | archive/ktransformers/server/balance_serve/inference/query_manager.py:149-200 \u2014 These two members are one piece of code written twice and then edited apart: 50 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":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"595dd715a6b1804ad1715d7d3f0777ca360365e632b8f1f2a8841777fc3cae97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:212-242 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:784-818 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dae9974263c46de2f091ceb04bdfdc55a09a2bf96bc4b6cc6e303606ed5661e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 48\u002B corresponding lines): archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py:159-206 | archive/kt-sft/ktransformers/models/configuration_deepseek.py:158-207 | archive/ktransformers/models/configuration_deepseek.py:158-207 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 48 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":"archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07d83a662d844bfb5f626e1ee904edda06ac4fcd1070e1e86954b423d9c2af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): kt-kernel/python/sft/base.py:711-764 | kt-kernel/python/sft/base.py:929-979 \u2014 These two members are one piece of code written twice and then edited apart: 51 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":"kt-kernel/python/sft/base.py"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"2673f1d9b01e6ba1d74faf6c707c44d2a17f7fb19b925c900f990456da430db2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): kt-kernel/python/cli/utils/model_table_builder.py:49-98 | kt-kernel/python/cli/utils/model_table_builder.py:211-254 \u2014 These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e22fade300e23793e7ad0b17e413350b229d5ed91823ace09fbba3a9b085e38"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): archive/ktransformers/models/custom_cache.py:355-385 | archive/ktransformers/models/custom_cache.py:648-692 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2390d33dae8333828302df38412b05837036a89bd9f6a78e897150325ba85a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:740-768 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:971-1007 \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"67837f68f313fab35ef5b981ca14384ba4b14815da4655a5978f10a10033d57c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:42-61 | archive/ktransformers/server/balance_serve/inference/query_manager.py:59-90 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"a991a41f904de2cc139ec735af98917bcd75bf84a114f166fcf744a8c5ef6223"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:333-362 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:812-843 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"a56c53b0eaff5076230a84c88abcfdf07a7e37373ca51a13ddd12a5a46503275"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 24\u002B corresponding lines): archive/kt-sft/ktransformers/operators/cpuinfer.py:381-404 | archive/kt-sft/ktransformers/operators/cpuinfer.py:409-432 | archive/ktransformers/operators/cpuinfer.py:381-404 | archive/ktransformers/operators/cpuinfer.py:409-432 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e02cc72d32714400ed5a069582f7ec7650e99f7f3cc5e133cb0e8c194f02123"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 25\u002B corresponding lines): archive/ktransformers/operators/ascend/ascend_mlp.py:29-61 | archive/ktransformers/operators/ascend/ascend_mlp.py:66-90 | archive/ktransformers/operators/ascend/ascend_mlp.py:95-131 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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":"archive/ktransformers/operators/ascend/ascend_mlp.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d69cad69d266f9059862c8e5076bce68165b4432a2508c41fd1a55796eb4193"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 26\u002B corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:1459-1484 | archive/kt-sft/ktransformers/operators/experts.py:1755-1780 | archive/ktransformers/operators/experts.py:847-872 | archive/ktransformers/operators/experts.py:1145-1170 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"2807c05264122f463be00a9bd1e74c078781ce5cc53ee7a5bc7e0ef058ea2589"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): archive/ktransformers/server/utils/serve_profiling.py:47-56 | archive/ktransformers/util/utils.py:106-115 \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":"archive/ktransformers/server/utils/serve_profiling.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbfa67949805cfda6755e97bd399c50596382b4748257acb5723c4e874be831"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): kt-kernel/python/sft/wrapper.py:232-262 | kt-kernel/python/sft/wrapper.py:266-293 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c2b98c2f62a7d42de0b033e42cb8c34863b60d4c709ed78acd0e906f5ef73e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): archive/kt-sft/setup.py:260-279 | archive/setup.py:239-260 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d70553177fc9ec26719605bcc411c4d78754853edddd7a38b34ad61521e81b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): archive/kt-sft/ktransformers/util/weight_loader.py:123-146 | archive/ktransformers/util/weight_loader.py:123-146 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"288a536e3b677e58766cfe8a6dadf6a0f4d12882b547b0ac0ca67193f6a15307"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): kt-kernel/python/cli/utils/input_validators.py:22-73 | kt-kernel/python/cli/utils/input_validators.py:82-123 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"kt-kernel/python/cli/utils/input_validators.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"07dd0c76a254b7563ca60b47b939bfcbcf6b997c4d423a73209c3206f15feff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:535-560 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:932-955 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc09cbdd1f28916c8692377b8d3821a84a4a6d8c01943fdb097cea33429328d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:683-703 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1118-1135 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a5e492cc46f34b206903aa47dc30f4951ae951cf7b67e64934fdbe79e7ecd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 22\u002B corresponding lines): archive/kt-sft/ktransformers/operators/cpuinfer.py:331-352 | archive/kt-sft/ktransformers/operators/cpuinfer.py:357-378 | archive/ktransformers/operators/cpuinfer.py:331-352 | archive/ktransformers/operators/cpuinfer.py:357-378 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"6849cc5edaa876f3510497277b960cd9480301208fc53a6313c856362e916329"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:706-737 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:894-925 \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3e511acbdd02295e86f151ef15254ace40385dfa917641e15a7bc3b977f3ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): archive/ktransformers/operators/balance_serve_attention.py:579-596 | archive/ktransformers/operators/balance_serve_attention.py:671-707 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2351d93d83218bfbda83d12024789a35f70e9a448095eb4830b60bda4a88440"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 50\u002B corresponding lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1219-1268 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1186-1235 | archive/ktransformers/models/modeling_deepseek.py:1218-1267 | archive/ktransformers/models/modeling_deepseek_v3.py:1191-1241 | kt-kernel/examples/modeling_deepseek_v3.py:1183-1232 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 50 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3c3c283ec62aa4ccff052a041b1d5f3a938f3a32ff84a82069f99309ac4782"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/kt-sft/ktransformers/optimize/optimize.py:46-53 | archive/ktransformers/optimize/optimize.py:58-65 \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":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e58fbad9d826bdab52be5f9b5dd6150763f4c4a0792940e791a30ab0c977b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): archive/kt-sft/ktransformers/server/utils/create_interface.py:20-31 | archive/ktransformers/server/utils/create_interface.py:20-36 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/create_interface.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a191631e1ef8e00f36a7b10059fba9b47e18991b227417454736865d4aeb02e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): kt-kernel/scripts/convert_cpu_weights.py:265-284 | kt-kernel/scripts/convert_cpu_weights_ds4.py:293-316 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c253dc8f1374402a74d10b009f5e49553e45cb128be69a217b5687abf87975"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): archive/kt-sft/ktransformers/models/modeling_llama.py:777-831 | archive/ktransformers/models/modeling_llama.py:776-830 \u2014 These two members are one piece of code written twice and then edited apart: 55 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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"187a73e87b895a91406d990a00da8e8c0af3b70cde40d3b7fc53d2381a04ef99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): kt-kernel/python/sft/lora.py:964-992 | kt-kernel/python/sft/lora.py:1163-1190 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e4b7a8ea5783a1001072f3aa9a5422acea317e80a9111e32247aa07cb40aeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:209-224 | archive/ktransformers/server/backend/interfaces/balance_serve.py:301-321 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1bb78af4bf69689bbba9d46fb9bbd095df7adc4bc04bc6da9fc28cadc5121e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): kt-kernel/python/sft/artifacts.py:1572-1586 | kt-kernel/python/sft/artifacts.py:1590-1604 | kt-kernel/python/sft/artifacts.py:1813-1830 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1572}}}],"partialFingerprints":{"codehealthFindingId/v1":"a314ed141edaa755d2518cd167425f5641e148bb3e816ae4b55e46b144b35c07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): kt-kernel/python/cli/utils/environment.py:561-583 | kt-kernel/python/cli/utils/environment.py:587-604 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"9facddb812cd68d7e72a40f655943389b41ca4e3379e82912f93486f6d1eb4c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:252-259 | archive/ktransformers/models/modeling_qwen2_moe.py:251-258 \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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"848f7df83e058e33bf6e897350db3002017c29e2a72da1153c1acd32c1cb2f94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): archive/kt-sft/ktransformers/sft/metrics_utils/misc.py:118-141 | archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py:728-755 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/misc.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a20e76fd35938ef737f2828d85cebc516ca17309b2d7edb1bc1f5c43f12128"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:86-92 | archive/ktransformers/server/backend/interfaces/balance_serve.py:124-130 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b7f45133d342ae30dcb45c6113a339535c712f97676b7d2b855e3b92e680c13"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:204-213 | archive/ktransformers/models/modeling_mixtral.py:203-212 \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1c18405d1b618f61a4b443e28543ead2bffe7478069648c9c325bc46e53fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/ktransformers/server/utils/serve_profiling.py:95-104 | archive/ktransformers/util/utils.py:144-151 \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":"archive/ktransformers/server/utils/serve_profiling.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef09d8b1c1e849d57649076675f2e2b9a0ab83a5059e7c08b48424ca61bcdc6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:26-34 | archive/ktransformers/server/balance_serve/sched_rpc.py:34-47 \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":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77a0581493802da1a286e23b3e86f0daf2c669ebec3f11406bd2e1c3c5d0463"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/kt-sft/ktransformers/operators/base_operator.py:22-29 | archive/ktransformers/operators/base_operator.py:22-29 \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":"archive/kt-sft/ktransformers/operators/base_operator.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec517c773841e382ee56c7f99a17e45dd4a336a9724235de31e5dcda259bd7ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:305-317 | archive/ktransformers/server/backend/interfaces/transformers.py:317-329 \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":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b3ea12d892e7a6328c0b019baa65a17f918b90a70f621f9286fe7cf99a1cd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 5\u002B corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:519-527 | archive/kt-sft/ktransformers/util/custom_gguf.py:559-563 | archive/ktransformers/util/custom_gguf.py:526-534 | archive/ktransformers/util/custom_gguf.py:566-570 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ec2b182685821868bf530b578ba432e14abcd0a33a77444db72afb2ec4702d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py:297-304 | kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py:287-294 \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":"kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"2143e524d9ec0afe2ea7456443b52fd5fd0c72e93f36eaf0df7e4945add7b8c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/kt-sft/ktransformers/util/utils.py:157-164 | archive/ktransformers/util/utils.py:221-230 \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"98207d72361ce82f588bd797b78ca73c15e15c1855afb1e391f3b5e72f42837e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): archive/kt-sft/ktransformers/util/weight_loader.py:103-120 | archive/ktransformers/util/weight_loader.py:103-120 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"f185e77c32facf925c4fe3ec2824853996c08c254c96feb25233ea8a7d698a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): archive/ktransformers/operators/ascend/ascend_experts.py:72-79 | archive/ktransformers/operators/experts.py:740-747 \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":"archive/ktransformers/operators/ascend/ascend_experts.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0cec8840f9895cf924f92d1b3cc2cdd3916e7469538c99c5a49da076aab05fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): archive/kt-sft/ktransformers/util/utils.py:114-125 | archive/ktransformers/util/utils.py:180-191 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3deaa8cd74c94f64bd643c94f5be7f18879161ccb77f59f642df15a7e59cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): kt-kernel/python/utils/loader.py:447-459 | kt-kernel/python/utils/loader.py:591-599 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeca30fb364e9cb830d9537a179f09de93dfff38d21740f8380a8b3e8f45a15"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): kt-kernel/python/sft/base.py:603-614 | kt-kernel/python/sft/base.py:617-624 \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":"kt-kernel/python/sft/base.py"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ac005e98fdd895cd8710dd5cb8efe033d811248aa414227daefc55401c576c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/util/custom_gguf.py:98-101 | archive/ktransformers/util/custom_gguf.py:106-109 \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b5ccdf8453f69fc890c5806fe94fdae648e37c75e921ca86cec17df03de44f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): archive/kt-sft/ktransformers/operators/linear.py:159-170 | archive/ktransformers/operators/linear.py:175-183 \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a589637a5ae9503a393a72f650269ff4f8adfad9042db18a1b96e984e77ab09"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:114-117 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:114-117 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f6d35eb690587b9ff1607e884e0a816021ee461d98e32ea0f50f918627b175e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): kt-kernel/scripts/compare_weights.py:122-142 | kt-kernel/scripts/convert_cpu_weights.py:672-695 | kt-kernel/scripts/convert_cpu_weights_ds4.py:739-762 | kt-kernel/scripts/merge_cpu_weights.py:59-71 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/compare_weights.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0cf53476474249fce1508aa8cb326dabe529650b4993b16e0fd292a2a8f761c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): archive/ktransformers/models/custom_modeling_glm4_moe.py:37-43 | archive/ktransformers/models/custom_modeling_smallthinker.py:37-43 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_modeling_glm4_moe.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b98a2dd973c16cbdf9dc823b0b4abb6c7772d71e018da9309aaffe2dc75ee79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): kt-kernel/python/cli/utils/environment.py:266-286 | kt-kernel/python/cli/utils/environment.py:447-458 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4db9644edefb1a3ac18b072dc6f38f5b738e86756ff1e4378b7c4cb65322dda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): kt-kernel/python/sft/lora.py:103-113 | kt-kernel/python/sft/profiler.py:11-20 \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":"kt-kernel/python/sft/lora.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98a9b953b7618bd1adebfa1a03f9ea1f5b66872b8830dc4f94b0ace31d457ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 3\u002B corresponding lines): archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:130-132 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:130-132 | archive/ktransformers/models/custom_modeling_glm4_moe.py:121-123 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:130-132 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:130-132 | archive/ktransformers/models/custom_modeling_qwen3_next.py:137-139 | archive/ktransformers/models/custom_modeling_smallthinker.py:120-122 \u2014 These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"53cf2453355e56e799a695f9537445da9289d4b1ea18eb11567921bdbf1faa6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:579-594 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:790-807 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b6f20785fdd40590825342a05e3fdb9169c02491f89486eed1cb4b2f83d3127"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): archive/ktransformers/models/custom_cache.py:227-236 | archive/kt-sft/ktransformers/models/custom_cache.py:174-180 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f7223128a203417ce7e912a10c9dd2ed5d23c930d51fcd14c4a4cdd1457d8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:209-212 | archive/ktransformers/operators/flashinfer_wrapper.py:217-220 \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":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"a762bb407f8438cc1a2267bd4d9f5d4d9e82416289d06be5e01e561974a31429"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): archive/ktransformers/util/utils.py:311-319 | archive/kt-sft/ktransformers/util/utils.py:255-261 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"a749ba2468f7ee20220f8744cdd0334f836593cf10b67e357e948331708b07d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): kt-kernel/python/cli/utils/model_verifier.py:16-33 | kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py:142-146 \u2014 These two members are one piece of code written twice and then edited apart: 5 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":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"688cad79cedaad115fbfa337b3c586071939f2c984af0c9fc49c8c7fd73fe7fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/operators/gate.py:92-95 | archive/ktransformers/operators/gate.py:102-105 \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":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d9b203fbd37a442a2baeb00efa21d9cbb6043afedad92bb477263cbafdf2eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/operators/gate.py:199-202 | archive/ktransformers/operators/gate.py:209-212 \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":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad173df2b79d9304ed186d37811429f3b521338ecc462cdd49fbbf2b9cd1ca0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/util/utils.py:143-146 | archive/ktransformers/util/utils.py:209-212 \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea9865ca54920dc4b484155fb06944fa09367374fa30397b99d96747ec7745b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/operators/layernorm.py:209-212 | archive/ktransformers/operators/layernorm.py:334-337 \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":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c43b305fa42e83f388e1a8e4f8bc9d8c5d599960250c306100d08ac81c0b57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/config.py:93-96 | archive/ktransformers/server/balance_serve/inference/config.py:95-98 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/config.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f423afd6ef5cc4ada9ea8afffa7ff1b00b5c69a1eb39804c92df9fcb55dcbcd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/config.py:105-108 | archive/ktransformers/server/balance_serve/inference/config.py:107-110 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/config.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d33638b7aa4ef05ce90e07fea7a739d41ee0be2f56d7f10d2a4dc7a98f54d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 3\u002B corresponding lines): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:149-152 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:145-147 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:149-152 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:145-147 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a30ead362b6493f535c2bec848b1a723daf5a4528ee7598bc48cec54b5f8fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:38-41 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:38-41 \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1a73ab41d9375f4aea62c3c66856500d3805e8a308b1f2953e1e83037274cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/crud/assistants/runs.py:48-50 | archive/ktransformers/server/crud/assistants/runs.py:48-50 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/crud/assistants/runs.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ba3ecf273b273c9afbe165426bff43d3c2e4868057cc154253b30a8339343a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/crud/assistants/threads.py:55-57 | archive/ktransformers/server/crud/assistants/threads.py:55-57 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3aa1987b67b21d904fe638e063f5aca7803dae45f28f831dee70b311ef79710"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): .github/model-e2e/prepare.py:13-21 | .github/release/manual_promote.py:72-74 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":".github/model-e2e/prepare.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f81bb6b3f551dc83bdb5b3d4d2cfc57bcdfc4034e74e3969173484db2552e6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/operators/linear.py:389-392 | archive/ktransformers/operators/linear.py:404-407 \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc2ac620ff588ae6b6914b8cacbf9543e9d9f1d22f705f2e3b52c06291e85994"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/backend/base.py:114-117 | archive/ktransformers/server/backend/base.py:114-117 \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":"archive/kt-sft/ktransformers/server/backend/base.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76c270943ff2d6e73a8fab9f90c6d0f44f175afe08138cc3b7570cfc00912dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:192-195 | archive/ktransformers/server/schemas/assistants/assistants.py:192-195 \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":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa4b95c241fbe193c0c3ef0bc2606a8380c6e4ddb5cf14be74d4ad1c20895972"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (2 corresponding lines): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:237-238 | archive/ktransformers/server/backend/interfaces/ktransformers.py:354-355 \u2014 These two members are one piece of code written twice and then edited apart: 2 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":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f0de804b02c106b6c15ccbe749b6c5cd651b2f83aa8ccc74fa7fb7a0b7b50a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/config/singleton.py:25-27 | archive/ktransformers/server/config/singleton.py:25-27 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/config/singleton.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"849eb238d35492b4294e6603fc9168d65f64ad675bad507fe14eff59cfb39f2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py:101-103 | archive/ktransformers/server/schemas/assistants/streaming.py:101-103 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2913dee21e36c9adf9d00845b072619d244987d78a157a8f7fdb32ad6398585"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/ktransformers/server/utils/serve_profiling.py:59-62 | archive/ktransformers/util/utils.py:118-121 \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":"archive/ktransformers/server/utils/serve_profiling.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"e834eb638640f5135ec7838b7e1e4c250b13e1a873379d07c40221c571c9af5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/operators/layernorm.py:223-225 | archive/ktransformers/operators/layernorm.py:348-350 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e23b6dc94e42be94a286bb8ad35f14c12c876ec349e5564b1dc8d5e6bcee93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/util/cuda_graph_runner.py:13-15 | archive/ktransformers/util/cuda_graph_runner.py:13-15 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/util/cuda_graph_runner.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca684c06e10cc65edcbcc62ddb22b7305364d8a21d22dfac671bc5227a93ff1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): archive/kt-sft/ktransformers/util/custom_loader.py:496-499 | archive/ktransformers/util/custom_loader.py:523-526 | kt-kernel/python/utils/loader.py:1009-1013 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4de5565fd51c6d54b83a2eeddf1387b5acd6152833a8f7e3ddc0f612dcabe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): kt-kernel/python/sft/artifacts.py:163-165 | kt-kernel/python/sft/weight_manifest.py:41-43 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2cb62c25cd40aefb3acc958ec98bc7c3acbd3e24b667514e3f6c1e37426cf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (2 corresponding lines): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:16-17 | archive/ktransformers/server/crud/assistants/messages.py:16-17 \u2014 These two members are one piece of code written twice and then edited apart: 2 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":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3db4e518e4b86ac9b193090776977203d27098505a42143a82c5e41d7779204"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (2 corresponding lines): .github/model-e2e/contracts.py:48-52 | .github/release/four_main.py:50-51 \u2014 These two members are one piece of code written twice and then edited apart: 2 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":".github/model-e2e/contracts.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b13d50615b89cb2f5f64422313896524791474b69b97adb09505a98e10e508"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 3\u002B corresponding lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:226-228 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:233-235 | archive/ktransformers/models/modeling_deepseek.py:225-227 | archive/ktransformers/models/modeling_deepseek_v3.py:237-239 | kt-kernel/examples/modeling_deepseek_v3.py:230-232 | kt-kernel/examples/torch_attention.py:219-221 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d6fa2a6dc18d2b0aa54b3c585d77e40726b5a30b20f34749f911f783989caf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:509-512 | archive/ktransformers/models/modeling_deepseek.py:508-511 \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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80190ef1ec3e217cea07f7f4bf4628e9e827453f2d29fe3c8241b377e4ff016"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/operators/cpuinfer.py:101-103 | archive/ktransformers/operators/cpuinfer.py:101-103 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26537277120d334ee5b5236cc21f4ef358eac9633dbd51cec3f7b60c5f5e833"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/models/modeling_deepseek.py:383-385 | archive/ktransformers/models/modeling_deepseek.py:382-384 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"666e88bd268a0e5f75d431f779c2772c01180bd53500e7afcdda883b0123cdfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/models/modeling_mixtral.py:817-819 | archive/ktransformers/models/modeling_mixtral.py:816-818 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dcf24e0689fd97aa719cfa808c58b52661abd447717d8b52d06799594717018"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 4\u002B corresponding lines): archive/kt-sft/ktransformers/operators/experts.py:139-142 | archive/kt-sft/ktransformers/operators/gate.py:75-78 | archive/kt-sft/ktransformers/operators/linear.py:128-131 | archive/ktransformers/operators/experts.py:137-140 | archive/ktransformers/operators/gate.py:85-88 | archive/ktransformers/operators/linear.py:144-147 \u2014 These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"966bec0fca7bbc74809d99cae35a6ba75777f1fbb09cdf910a184a49b4bb3197"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:138-140 | archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:138-140 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc18ae50c31d0386d441aa24dc07737f2ab5c6a065ccf4537700f3a44b5ecf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:95-97 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:95-97 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1044b9e6eac948ccc8fff561888fb05231858749b0380cd72c56974542c0b852"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (175 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:57-231 | archive/ktransformers/operators/dynamic_attention.py:57-231 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"9442f6b83e33dbbc88afdb860fa44c764aab3807bf69424124b8b63d3a898417"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (373 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:137-509 | archive/ktransformers/server/api/openai/endpoints/chat.py:137-509 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py\u0060 and \u0060archive/ktransformers/server/api/openai/endpoints/chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 486 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"f59c516bab6ef373fc05e2999d35302aba9625794814e1d2bd9cb7879790d80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (141 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:620-760 | archive/ktransformers/operators/dynamic_attention.py:620-760 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ecd57cbf68895ed2f33516f6983f432e56d83e18835ba86f5cee8efd1b0370c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (129 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:965-1093 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1105-1233 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":965}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f601884dafc77f76e796fce136e73760d6720037c2fdb369c7330f274c5b9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (122 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:55-176 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:55-176 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ff1141e464a15e3f6f4b535b5433b008add5c9435132e1c1642cb2cc2743792"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (117 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention.py:47-163 | archive/ktransformers/operators/triton_attention.py:47-163 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention.py\u0060 and \u0060archive/ktransformers/operators/triton_attention.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0abf9b5a94e4ed34a15e12d7e488fb27d4a022f00a3d75d97c53b1b9aa43f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (112 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:1072-1183 | archive/ktransformers/operators/models.py:1081-1192 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1072}}}],"partialFingerprints":{"codehealthFindingId/v1":"b225f6e96bcfd83363c9d2e81427b4ab5066be6f222f98c8e4be6538729ccf25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (110 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention_prefill.py:47-156 | archive/ktransformers/operators/triton_attention_prefill.py:47-156 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention_prefill.py\u0060 and \u0060archive/ktransformers/operators/triton_attention_prefill.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention_prefill.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"00aa961ef3c2ca73492b29aedc1642325e1124ca839f835e0c2758189b545643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (104 lines \u00D7 2): kt-kernel/python/utils/amx.py:460-563 | kt-kernel/python/utils/moe_kernel.py:183-286 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"588e340a02d1927a8fb5bca494a483b63355942af228184c6a32142ec96c0491"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (103 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:559-661 | archive/ktransformers/models/modeling_qwen2_moe.py:558-660 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf0cb640b607848a18c5547a6ad157ddf5d906ec1808b9eea6e0410d81f06a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (96 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:563-658 | archive/ktransformers/models/modeling_mixtral.py:562-657 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57edd490a738da888359e23f2937be95aa68bbf67d14b89c51a5ca8d90d6e80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (96 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:157-252 | archive/ktransformers/operators/cpuinfer.py:157-252 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"595b58afe197530dbd9da5431879e64b8683732323b8857c98da698d4eb6562c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (179 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:266-444 | archive/ktransformers/operators/models.py:263-441 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"553618bc9eea55236bf7dfa2edae95233d46daa27699de463162b655e1bf369e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (88\u201389 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:448-536 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:448-535 | archive/ktransformers/models/modeling_mixtral.py:447-535 | archive/ktransformers/models/modeling_qwen2_moe.py:447-534 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:448\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9cfaf0054b9366472e5f1d910101173e84073d9fc1db55906aa16ad3410f51e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (89 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py:29-117 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py:29-117 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28fb5c7250021c8474d0b1bd0aaa35482e9000c0d32694469f0600005e3cfce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (87 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:182-268 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:182-268 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"90530989e11d7af263282992e7fa101b137b9bbedf2215201f0d8feda4aed0b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (86 lines \u00D7 2): archive/kt-sft/setup.py:543-628 | archive/setup.py:526-611 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"31076e082639ca31c80e07757189e25b6caed9d6803bf29cd949a56b9242f43d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (83\u201384 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/ollama/completions.py:141-223 | archive/ktransformers/server/api/ollama/completions.py:141-224 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/ollama/completions.py\u0060 and \u0060archive/ktransformers/server/api/ollama/completions.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd574ded02b5389cb529af60a257597649092ec62097bedc1d0d8affa3322645"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (82 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:1110-1191 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1250-1331 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/convert_cpu_weights.py:1110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"97cc84cd8c0914705f287db790a6cd78e088d5412c01128c79d10a64960671da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (79 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention.py:177-255 | archive/ktransformers/operators/triton_attention.py:177-255 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention.py\u0060 and \u0060archive/ktransformers/operators/triton_attention.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"40358531aee66dbc8155ccbeef09f86842b99ab35ddcb5d7755ee0e0a04882af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (79 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:98-176 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:98-176 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b5f9871816298ffac8e5ef857ab8dd838d2b49d6bf2680d4bfae931d27fbce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (78 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1417-1494 | archive/ktransformers/models/modeling_deepseek_v3.py:1423-1500 | kt-kernel/examples/modeling_deepseek_v3.py:1414-1491 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1417\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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c74212f4459df5d21cbbd76c21988c4266b33bd9fac2800a96b7bf0aa5c8c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (77 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:415-491 | archive/ktransformers/models/modeling_deepseek.py:414-490 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b36cb596cf5b27fb787e7d789847b572f2a70850f58e6ddfa53c2201566036c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (71\u201374 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_mixtral.py:93-163 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:80-150 | archive/ktransformers/models/modeling_mixtral.py:92-162 | archive/ktransformers/models/modeling_qwen2_moe.py:79-149 | archive/ktransformers/models/modeling_smallthinker.py:765-838 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:93\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e915c5810055417c0073f318f7f01849eae2dcb84d74508530571b373b2785d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:233-306 | archive/ktransformers/operators/attention.py:232-305 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f8cafbef04c12c5dcecdab035eb6515d3bf1bde65d193dbb5fbbe7654643e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:625-698 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:625-698 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e11649d2ae640ef2032326200c51960ebbf9dc5e6c98e329fb69dc1c3971c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1019-1088 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1019-1088 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29a65d436ef93e9c139f007d42766e04405e7e6b5357cd5839e0f43bbd73b91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (69 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:584-652 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:541-609 | archive/ktransformers/models/modeling_deepseek.py:583-651 | archive/ktransformers/models/modeling_deepseek_v3.py:545-613 | kt-kernel/examples/modeling_deepseek_v3.py:538-606 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:584\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"059bc7a35f20cceb5294cadf224320ea00e8203779862c799a930a49c3ed6ebe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (69 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1466-1534 | archive/ktransformers/models/modeling_deepseek.py:1465-1533 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a5f9349ae86ca662def0b6f4579579e708f0f8b84fcc174128c811266645c0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (69 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:195-263 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:195-263 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"df123c1bd5229ec00b556142e551133f0cf233abb77d5f500bcbccd092814da1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (67 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1017-1083 | archive/ktransformers/models/modeling_llama.py:1016-1082 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1017\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"941998a9fb7e268dfdccaf2153f6f35746c7a4548a385a1e6f87f228de66f78b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (67 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:802-868 | kt-kernel/scripts/convert_cpu_weights_ds4.py:869-935 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ed5875dfd84a4bd92901783d9ed3da4b28aaf3803a9f720faf093918c3bc12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (65 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:383-447 | archive/ktransformers/operators/dynamic_attention.py:383-447 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py:383\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":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d712b4f8f1188671ff8a646ace6f5ed9861cd51d1c2d76102479a52e28f5a82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (101 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:525-625 | archive/ktransformers/models/modeling_llama.py:524-624 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab64ede12ee50d402d72e1649a3d69e9df7886242ae3c284c329fed8d449311"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (64 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:1198-1261 | archive/ktransformers/operators/models.py:1207-1270 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"4487220fc9412827d60f3c69042855662d5560077d1f08ed6f5ed8d8a2a3413a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (63 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1200-1262 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1200-1262 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c4f61d2375a1dfb4c94f19fdc781f199fa96474795cf46ec5a5fcc365f9a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (55\u201363 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:46-100 | archive/ktransformers/server/balance_serve/sched_rpc.py:64-126 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"c516644bed4d0f131617e625206fa0964e754475d9fd28bfabc4e08a8e9236de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (63 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:509-571 | archive/ktransformers/util/custom_loader.py:536-598 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"21acf73abad8cdfd7957794b12ab05af0dc013647f91f19db2398a9b795b45ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (62 lines \u00D7 2): archive/kt-sft/setup.py:116-177 | archive/setup.py:91-152 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1eb042a162defd9fe5a0c2936fe8918ccfc167ca6482fe073f1f495d91341e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (62 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:391-452 | kt-kernel/scripts/convert_cpu_weights_ds4.py:453-514 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"804fb6a6213d2b851fa885a7286e5540e508d341b7ce1f0ca5780687453d6d9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (60 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1600-1659 | archive/ktransformers/models/modeling_llama.py:1599-1658 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1e062cf74efc409def6573dcf4884fc7a68140b17c4abfd9a9823486dd16136"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (58\u201359 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1050-1107 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1026-1084 | archive/ktransformers/models/modeling_deepseek.py:1049-1106 | archive/ktransformers/models/modeling_deepseek_v3.py:1030-1088 | kt-kernel/examples/modeling_deepseek_v3.py:1023-1081 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e92c1886202ce47ff1ab131565d7524f30fc6d99d906a5b31f2eec71c6224c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (59 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:1194-1252 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1334-1392 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56b175039fae915fe10851544859fe4684e49293ba58ea2a50136ed7b90b4ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (97 lines \u00D7 2): archive/kt-sft/setup.py:386-482 | archive/setup.py:367-463 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/setup.py:386\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":"archive/kt-sft/setup.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"834d2b54656037ea336c59de89e0092a270c7d891748447f9a86e1196fbe772f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (65 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py:16-80 | archive/ktransformers/server/api/openai/legacy/completions.py:16-80 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py\u0060 and \u0060archive/ktransformers/server/api/openai/legacy/completions.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py:16\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":"archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4cd38a91eb0ffd31f63bb99576bacfc2fc7891b9d6b38855d2b61ceda433ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201356 lines \u00D7 8): archive/csrc/custom_marlin/utils/format24.py:185-240 | archive/csrc/custom_marlin/utils/format24.py:247-250 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:185-240 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:247-250 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:185-240 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:247-250 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:185-240 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:247-250 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/format24.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/format24.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 251 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f515dcaec52427453952e2419b9b582cdc395a2f1e9f8c0a73fa8cdd2ff8d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (106\u2013107 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:684-789 | archive/ktransformers/operators/models.py:683-789 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:684\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, \u0060archive/ktransformers/operators/models.py:792\u0060 calls \u0060clone\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:791\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbfe33a434adace2ecf62efef715abc46424678087c5938c98fbb8756d4d779b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (56 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:758-813 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:758-813 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"184a457d76d2398050870d08d0d5ca2a84cf86eafc913aa7cffb42827578b029"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (115 lines \u00D7 2): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:343-457 | archive/ktransformers/operators/balance_serve_attention.py:346-460 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"40285b57ab6fad3a1d18dd32f75e6d0ef523514db1f6530e5f013f9f37f937e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (73 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:299-371 | archive/ktransformers/util/custom_loader.py:326-398 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fbbe19e77eb23da1ebd204d7e080ae4ce05210c5e29b9ca481e2247a4416bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (64 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:427-490 | archive/ktransformers/util/custom_loader.py:454-517 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/custom_loader.py:427\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"d189e2e30adaa77664029cb171eb27364c3765b9d54b861d25e9320ff1419e0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (54 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:62-115 | archive/ktransformers/server/api/openai/endpoints/chat.py:62-115 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py\u0060 and \u0060archive/ktransformers/server/api/openai/endpoints/chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 486 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a78c64ca84024ade435cfed86e4b7266d59ce9bb729ad6f2f476668f0084da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (93\u201394 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1388-1481 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1379-1471 | archive/ktransformers/models/modeling_mixtral.py:1387-1480 | archive/ktransformers/models/modeling_qwen2_moe.py:1378-1470 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1388}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67e1bc11c1983ce6ab9fcca6d80b7f814a1bc66342bedf963cb9bb0cc16a912"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:276-327 | archive/ktransformers/operators/linear.py:291-342 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b84478fbb6ecc6629428b6a92668cf0adf5a0e3c67cbf135b75db5813c6b70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:353-404 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:353-404 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"06866544813848cb7636d3938f4ee208d087a38a5934c3f21fbdcb830f1fa72a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1694-1744 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1652-1702 | archive/kt-sft/ktransformers/models/modeling_llama.py:1285-1335 | archive/ktransformers/models/modeling_deepseek.py:1692-1742 | archive/ktransformers/models/modeling_deepseek_v3.py:1659-1709 | archive/ktransformers/models/modeling_llama.py:1284-1334 | kt-kernel/examples/modeling_deepseek_v3.py:1649-1699 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1694\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"777c80463fea5899b4c15f84a130b5da96b5e078f081219aa2fbc03445f80bb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:49-98 | archive/ktransformers/operators/cpuinfer.py:49-98 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bed85eb95e6ba946acb6bcd602e1ec05dd1542fa0602e2b76bc9928853f3668"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:229-278 | archive/ktransformers/util/weight_loader.py:229-278 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"8338e77bcae3a20bdbd924f14f66a9049d0f55c2f409fea38bc20c6c25291614"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:697-744 | archive/ktransformers/operators/attention.py:696-743 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"f05002038c07f0b2dd091f40515b253e6e2bf3305a4cf9a6cff70580826df48c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:23-70 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:23-70 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e98793f560ba4e6f3789d69f597859f009c4f27988a483e227ab8df49f572df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (117 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:892-1008 | archive/ktransformers/models/modeling_deepseek_v3.py:896-1012 | kt-kernel/examples/modeling_deepseek_v3.py:889-1005 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a7b30b5425c2c9e159ce0f5b7882d7fbfb85ebb34006ef896b7b59af7deee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 3): archive/kt-sft/ktransformers/models/configuration_deepseek_v3.py:148-193 | archive/ktransformers/models/configuration_deepseek_v3.py:148-193 | kt-kernel/examples/configuration_deepseek_v3.py:148-193 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/configuration_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/configuration_deepseek_v3.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_deepseek_v3.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25a22369855c8dd558878667ba0698087d0cf0a4ee654860f16facfa1cbe8e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 3): archive/kt-sft/ktransformers/operators/models.py:235-280 | archive/kt-sft/ktransformers/operators/models.py:1521-1566 | archive/ktransformers/operators/models.py:232-277 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c8b67201006fbcdb541923ef74eac3e99acd68fa51ddbeddd5f9e68b3bfd8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (87 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:396-482 | archive/ktransformers/operators/attention.py:395-481 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"c789678ea6fbc3d97e7f98e3424d24d12b5b6d33d1451615ef15a9b198f7a4e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201346 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:89-134 | archive/ktransformers/operators/experts.py:89-132 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"82422c72478bd8e81a02b5e0e96004fba84f4a45402eaefd4435321091e8ecdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:706-751 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:706-751 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2b4cc3631c552338f3deac3725da565abab43e1e792fcf924e6b0dffa3cd5e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:154-199 | archive/ktransformers/util/custom_loader.py:178-223 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d886336888b619195d1497ca929fd0da4516fea446095cbec6fb4142c96e6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201345 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1952-1996 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1897-1941 | archive/kt-sft/ktransformers/models/modeling_llama.py:1514-1558 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1613-1651 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1643-1681 | archive/ktransformers/models/modeling_deepseek.py:1948-1992 | archive/ktransformers/models/modeling_deepseek_v3.py:1911-1955 | archive/ktransformers/models/modeling_llama.py:1513-1557 | archive/ktransformers/models/modeling_mixtral.py:1612-1650 | archive/ktransformers/models/modeling_qwen2_moe.py:1642-1680 | kt-kernel/examples/modeling_deepseek_v3.py:1893-1937 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1952\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1952}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed6b6e034cbdf5c0328c5aa30a2118c5261bff87aed79d752b77efb3b47286f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201345 lines \u00D7 4): archive/kt-sft/ktransformers/operators/linear.py:463-507 | archive/kt-sft/ktransformers/operators/linear.py:619-662 | archive/ktransformers/operators/linear.py:478-522 | archive/ktransformers/operators/linear.py:634-677 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43e2b15822b9527f3d2a3ce7b68cfe2c6715033ef2a179acead9c89f4e82730"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:468-516 | archive/ktransformers/operators/dynamic_attention.py:468-516 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff20add3ab79f4a007c141d636305cd212d91771033967573f3b8136e060da8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention_prefill.py:162-206 | archive/ktransformers/operators/triton_attention_prefill.py:162-206 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention_prefill.py\u0060 and \u0060archive/ktransformers/operators/triton_attention_prefill.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention_prefill.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec49b01e3b4caa78425107aed2d497aa595effc8c998cb8b31b5848a525d141"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/base.py:123-167 | archive/ktransformers/server/backend/base.py:123-167 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/base.py\u0060 and \u0060archive/ktransformers/server/backend/base.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/base.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff9fe48167fba7130df77cde4ebb3e2f1fb4a150f0ce6cb22d3196719ce550bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:702-745 | archive/ktransformers/models/modeling_deepseek_v3.py:706-749 | kt-kernel/examples/modeling_deepseek_v3.py:699-742 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b489b2a71cecc47e0ff93a23aff305bb019e7ae22bc5af562cb8882b04f31ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:743-786 | archive/ktransformers/models/modeling_deepseek.py:742-785 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a96ce8be609fc79f3ea3ecb168bbb77a5474fa67d298f2bc209ebc94c31a79e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (111 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:921-1031 | archive/ktransformers/models/modeling_deepseek.py:920-1030 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62caa97dc4c020cbad9c79244d8e0b69ec91df3992a2947b2a43d643ab68ac6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:90-133 | archive/ktransformers/models/modeling_llama.py:89-132 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dc2f94d66af224cb19a8ecdade9291d7b0c2cc63150dacf62bafb8e9ae83be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:320-363 | archive/ktransformers/models/modeling_llama.py:319-362 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d4935a2657247fa5707f6428b698ac03f0f75c4c9b9227a0d862c31ad159144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (71 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:186-256 | archive/ktransformers/util/modeling_rope_utils.py:186-256 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:186\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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d353320a65edb8b74781c57db7a7c04cad1f646c17111a73c84e086b0de78ebd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:904-946 | archive/ktransformers/operators/attention.py:903-945 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"862621ce8f783e11333e30045cdfffe65b6b3a976897379fd6e56754fde9d725"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:308-350 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:308-350 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"41af4f3eb61fcd4f816358e171f10ad90deeb97025b0406898fd5089b3e9f75e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (125 lines \u00D7 4): archive/csrc/custom_marlin/utils/format24.py:53-177 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:53-177 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:53-177 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:53-177 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/format24.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/format24.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 251 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/format24.py:53\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1feceec2de456b37fb453cc8c070492da5d9d5528307b17b0abc504b2ccbcca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40\u201342 lines \u00D7 4): archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:141-182 | archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py:17-56 | archive/ktransformers/server/api/openai/endpoints/chat.py:141-182 | archive/ktransformers/server/api/openai/legacy/completions.py:17-56 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py\u0060 and \u0060archive/ktransformers/server/api/openai/endpoints/chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 486 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060create\u0060 to \u0060ChatCompletionCreate\u0060 in one and \u0060CompletionCreate\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"e326debe2309b9eedee22715cdd2254db60b4c57adf548bcc75c2c3487295c86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/ollama/completions.py:59-100 | archive/ktransformers/server/api/ollama/completions.py:59-100 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/ollama/completions.py\u0060 and \u0060archive/ktransformers/server/api/ollama/completions.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ffe44404a9d173c4d4383ff3687fc3a4022ac9b512cec72c12952078e9b73fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201359 lines \u00D7 13): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1590-1621 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1550-1581 | archive/kt-sft/ktransformers/models/modeling_llama.py:1166-1224 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1283-1314 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1274-1305 | archive/kt-sft/ktransformers/operators/models.py:1318-1376 | archive/ktransformers/models/modeling_deepseek.py:1589-1620 | archive/ktransformers/models/modeling_deepseek_v3.py:1556-1587 | archive/ktransformers/models/modeling_llama.py:1165-1223 | archive/ktransformers/models/modeling_mixtral.py:1282-1313 | archive/ktransformers/models/modeling_qwen2_moe.py:1273-1304 | archive/ktransformers/operators/models.py:1327-1385 | kt-kernel/examples/modeling_deepseek_v3.py:1547-1578 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1166\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1590}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b7f31db3be942bf8d6ca228fe718ed2851475160629adeb3dc7c8a3e497881"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:913-953 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:895-935 | archive/ktransformers/models/modeling_mixtral.py:912-952 | archive/ktransformers/models/modeling_qwen2_moe.py:894-934 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a93e4bb8de205e13f4537d7a51e1f0cc390a9e24ffa0eed0b4146f6779adecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention.py:271-311 | archive/ktransformers/operators/triton_attention.py:271-311 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention.py\u0060 and \u0060archive/ktransformers/operators/triton_attention.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0240219c117e39b7ee85c05ee1a75b08472c5817a0110779f337678490509fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:422-462 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:422-462 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"15ca28b2d7995471d25d5627ef5a452ff88f78ffbb7d2b089082204b8cbfe938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:118-158 | archive/ktransformers/util/modeling_rope_utils.py:118-158 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:118\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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0812f608bc62f5d92cdbc227961190b6b6c160b14e843797666c8a58213b0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): kt-kernel/python/utils/amx.py:409-448 | kt-kernel/python/utils/moe_kernel.py:132-171 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"62df9e9d166eba9cdd079d47f12611a1fb0a574939ed52bb1fb39c83577754ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201340 lines \u00D7 4): kt-kernel/scripts/convert_cpu_weights.py:698-737 | kt-kernel/scripts/convert_cpu_weights.py:765-768 | kt-kernel/scripts/convert_cpu_weights_ds4.py:765-804 | kt-kernel/scripts/convert_cpu_weights_ds4.py:832-835 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/convert_cpu_weights.py:765\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/scripts/convert_cpu_weights.py:738\u0060 calls \u0060join\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights.py:770\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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbca0db90b32e4ee573c5c3ea9b07836470ee2eddd7c022f8b6569e1b8491954"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1163-1201 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1154-1192 | archive/ktransformers/models/modeling_mixtral.py:1162-1200 | archive/ktransformers/models/modeling_qwen2_moe.py:1153-1191 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:1163\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb199f603326e673f73835f29925a410995d0d585ae6fca5efe892a509d2ee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 3): archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py:159-197 | archive/kt-sft/ktransformers/models/configuration_deepseek.py:158-196 | archive/ktransformers/models/configuration_deepseek.py:158-196 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/configuration_deepseek.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"54cd0f685471be0e0463d266bd73db1ee577374a0838996d139e1a42f2dc4487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 3): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:16-54 | archive/merge_tensors/merge_safetensor_gguf.py:16-54 | kt-kernel/scripts/check.py:43-81 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:16\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"72acde5f806ee558734af348bbfaf34c193ed26839d86d3865e3d12eaba69ff0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201339 lines \u00D7 2): kt-kernel/python/sft/base.py:711-749 | kt-kernel/python/sft/base.py:929-962 \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":"kt-kernel/python/sft/base.py"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c1782cfaca73f54c8c990bc2106bc158df8dbc98ef5c50a54959b8de016d5a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1519-1556 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1479-1516 | archive/ktransformers/models/modeling_deepseek.py:1518-1555 | archive/ktransformers/models/modeling_deepseek_v3.py:1485-1522 | kt-kernel/examples/modeling_deepseek_v3.py:1476-1513 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1519\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1519}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b26ba018f7df9417b107b2da363f856d6849b770c9f8220a969880485502ef8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:1095-1132 | archive/kt-sft/ktransformers/operators/models.py:1247-1284 | archive/ktransformers/models/modeling_llama.py:1094-1131 | archive/ktransformers/operators/models.py:1256-1293 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1095\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6cdb6d459c96d8cf6ed726d358dbd50fddaa12ec305091aaa4504b273746a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:777-814 | archive/ktransformers/models/modeling_llama.py:776-813 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"956ad3650b67f2286813f6721c3a53ddccb2ce2c6cc3694f723ed6d86772f16c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:974-1011 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:974-1011 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"0784327f388151edefb07cbb03e38dce0aa1d2e94a04b84b7d7c4a11da4aa4ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:101-138 | archive/ktransformers/util/custom_loader.py:115-152 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"235c7fe65764b23bcaa3eef0cd94f1a31bfc71a904c302bc80fa8e224be2fd99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:325-362 | archive/ktransformers/util/modeling_rope_utils.py:325-362 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"087f413ea0b9aa8efd42f080f7f8c8768834f4a2111d0100a948248c35205de2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (66 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:524-589 | kt-kernel/scripts/convert_cpu_weights_ds4.py:591-656 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda8f05a8e49e9db879f36828f7632cae3dfb2dc97087be4ea204409252e17fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:511-547 | archive/ktransformers/operators/linear.py:526-562 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b7ad44e242f53565231d0f040018372751b49b5d265c2b41425972603e3c92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:734-770 | archive/ktransformers/operators/linear.py:749-785 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0b07fedd202cfafc8d2ef3e61638afbcc4d4ea6712171bfbf35caa9c50c34a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:205-241 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:205-241 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"969650ee5a5aae79e1166ae057f04f907e63eb81847d7f7efbe2e36ece503640"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): archive/ktransformers/server/balance_serve/inference/forward_batch.py:404-440 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:659-695 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py:404\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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51b7bf6596c13ba8ca7c35435780f7a9491793afe3dca9fedb470fd46b45e07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/kt-sft/ktransformers/models/configuration_llama.py:168-203 | archive/ktransformers/models/configuration_llama.py:168-203 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/configuration_llama.py\u0060 and \u0060archive/ktransformers/models/configuration_llama.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_llama.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"26638bf7cb265587775e8e41b0aed1fef0e86de43ece260672235543ba613d66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:823-858 | archive/ktransformers/operators/attention.py:822-857 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":823}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ff6e90a658b8a3ccac5f97d70019e9db106369b72eb97f8d99ca593354a932b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention.py:321-356 | archive/ktransformers/operators/triton_attention.py:321-356 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention.py\u0060 and \u0060archive/ktransformers/operators/triton_attention.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"d71f86f9b15603b257b68b81a7171fb9944c41f7cff136e425b3b317320a6adf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:191-226 | archive/ktransformers/util/weight_loader.py:191-226 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"32850c929d90dcaac738d52bc990fc85289f8287fa28659baa6bca70cdd1911f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201335 lines \u00D7 12): archive/kt-sft/ktransformers/models/modeling_deepseek.py:849-851 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:969-1003 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:809-811 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:943-977 | archive/kt-sft/ktransformers/operators/attention.py:658-660 | archive/ktransformers/models/modeling_deepseek.py:848-850 | archive/ktransformers/models/modeling_deepseek.py:968-1002 | archive/ktransformers/models/modeling_deepseek_v3.py:813-815 | archive/ktransformers/models/modeling_deepseek_v3.py:947-981 | archive/ktransformers/operators/attention.py:657-659 | kt-kernel/examples/modeling_deepseek_v3.py:806-808 | kt-kernel/examples/modeling_deepseek_v3.py:940-974 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:969\u0060 calls \u0060new_empty\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:849\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa570f728670381a7a7d3cdc6d025647aa632ac7134bc6d421acdd5271bd392d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 4): archive/kt-sft/ktransformers/operators/models.py:336-370 | archive/kt-sft/ktransformers/operators/models.py:717-751 | archive/ktransformers/operators/models.py:333-367 | archive/ktransformers/operators/models.py:716-750 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:336\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd44400280bfbb9273279c47ea6a72d797291a47a228e0c3c52ed187be084b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:490-524 | archive/ktransformers/models/modeling_deepseek_v3.py:494-528 | kt-kernel/examples/modeling_deepseek_v3.py:487-521 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"97be3897c3826917f23e79d27fe23277a2d368635bdb5d3b25b84807efb6756f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:281-350 | archive/ktransformers/operators/dynamic_attention.py:281-350 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py:281\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":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b81e7700457eff4aa3f5f1da85c1267cee66ffd8580b4f7faf2d66d89112748"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201335 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:459-492 | archive/ktransformers/server/backend/interfaces/balance_serve.py:643-677 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:457\u0060 calls \u0060Exception\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py:642\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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27cc91274ee97e6f5fbc776d912739d6c4d026cfadf6a94a387e8340c85e354"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): archive/kt-sft/ktransformers/util/cuda_graph_runner.py:27-61 | archive/ktransformers/util/cuda_graph_runner.py:27-61 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/cuda_graph_runner.py\u0060 and \u0060archive/ktransformers/util/cuda_graph_runner.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/cuda_graph_runner.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"302f230c7fa43ef81a36bd37c4ba706cb65d9f58b260f533d9e9e732d147b07d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:442-476 | archive/ktransformers/util/modeling_rope_utils.py:442-476 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e7241b46c3bf8cae1dce2be9b6396671083a71d8af7ca765e1fd3c3f1d7482"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:418-452 | archive/kt-sft/ktransformers/util/utils.py:607-641 \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"6904047212bfc058bd0b100e8cdf7c6eabc20e3f092a5b83ae1208738eaed7f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): archive/kt-sft/ktransformers/util/vendors.py:24-58 | archive/ktransformers/util/vendors.py:24-58 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/vendors.py\u0060 and \u0060archive/ktransformers/util/vendors.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"98cb6eeaafcbdc8c90afe4336900c5db7670d27f852c3dd3a18bf236a779129d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (90 lines \u00D7 2): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:99-188 | archive/merge_tensors/merge_safetensor_gguf.py:99-188 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"71759610332eea6ae57efcf53bfa0ea8ef01f2c5a4f2af9aa7820c55c4a5ee14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:1076-1109 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1194-1227 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1185-1218 | archive/ktransformers/models/modeling_llama.py:1075-1108 | archive/ktransformers/models/modeling_mixtral.py:1193-1226 | archive/ktransformers/models/modeling_qwen2_moe.py:1184-1217 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1076}}}],"partialFingerprints":{"codehealthFindingId/v1":"2441d79a3737a4888febda635df2344efbd30d53cfddcceda76ac85144f77126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_perms.py:22-55 | archive/kt-sft/csrc/custom_marlin/utils/marlin_perms.py:22-55 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:17-50 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:17-50 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_perms.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_perms.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_perms.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d5a74a3c7c8a47045075c226a56ba75774e032862709f9d9faa51f8f792446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:182-215 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:182-215 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:218-251 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:218-251 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"008fdda9aaab771803d8bfc75a9caa76f529799da1708ebc1efe95f6c8240d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py:197-230 | archive/ktransformers/models/configuration_qwen3_moe.py:197-230 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py\u0060 and \u0060archive/ktransformers/models/configuration_qwen3_moe.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"8546135cde10d4a137b4b5d268a44395c7708e81bdae2df3daf5aa3fa5cccaee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:74-110 | archive/ktransformers/models/custom_cache.py:101-137 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"113875dc7e85a9c8f6afc66d2962225942d8086320b7de2a6c2309c95423f43c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:948-981 | archive/ktransformers/operators/experts.py:526-559 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae77b87b388d3b816ccc7b5ff78ec32e548372dc9dca05bd3be01d09e1cd0c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:1006-1039 | archive/ktransformers/operators/models.py:1015-1048 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9960a44ff4093ed75e987dacb0586196f776f6807a925c2bc74c89d2850b407"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:322-355 | archive/ktransformers/server/backend/interfaces/balance_serve.py:489-522 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"adca9e9aacd1818b5936f512ee09898839c3c3d0f1cb908ef587ef047c9743e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:583-616 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:583-616 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c4f29518777693efecca5bde24bb8b678b74754c2712018ae5cca9e14a6b4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:35-68 | archive/ktransformers/util/modeling_rope_utils.py:35-68 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:35\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b9931440a3c77f8b60e6c47a45e590f0b9548ebd578ef67ffe0723e67f83e33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/setup.py:510-543 | archive/setup.py:491-524 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"2586af7c01ed23bfbd24d761ec3d3b1afc789436ffdc57a6890b341badd0883f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201333 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:699-731 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:758-789 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:758-789 | archive/ktransformers/models/modeling_llama.py:698-730 | archive/ktransformers/models/modeling_mixtral.py:757-788 | archive/ktransformers/models/modeling_qwen2_moe.py:757-788 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ef82dfe3a54b6bce222482f9f18a4a470893206ee7f795a4b0394be0907499"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:104-136 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:104-136 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f537e9dda8a06a05ed5ee7a923fd8abd3444532fce8010aa72ffcd882ecb0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:525-557 | archive/ktransformers/models/modeling_deepseek.py:524-556 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"1caa6c1842ec39e6a4ee4abe731f3ef9e0173d9782bc4518a1825a90985320d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1391-1423 | archive/ktransformers/models/modeling_llama.py:1390-1422 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1391}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ee7d5c0510f7f2b4ccd46b5215df98105cc9e3594231dc3ce802f60bdabd2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:215-247 | archive/ktransformers/operators/flashinfer_wrapper.py:223-255 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc90d2f7919bbb1d6f3630b2f071d7efb92768d480c646ef001610f9c9c7172"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:240-272 | archive/ktransformers/operators/linear.py:255-287 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"452c0a99dd98fda16efbfce2b7ca71e0363e79f0df009057927ef81f4e746b27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:77-109 | archive/ktransformers/util/modeling_rope_utils.py:77-109 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9bd37090a8dc6cd141382c5b025031809691bf36a1bcd696ed07076d3644f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:530-562 | archive/ktransformers/util/modeling_rope_utils.py:530-562 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"1361dba7fcb6a1084b48eb7def36b7149bba484c079472e10ff744b0aaf77d1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201333 lines \u00D7 4): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:142-145 | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:146-178 | archive/merge_tensors/merge_safetensor_gguf.py:142-145 | archive/merge_tensors/merge_safetensor_gguf.py:146-178 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:178\u0060 calls \u0060tensor\u0060 and \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:145\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"382812e1dab7d9d54040a626ba780d15fec4dc93756b53377f6fd29d4543bfe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201333 lines \u00D7 2): archive/ktransformers/server/balance_serve/inference/forward_batch.py:300-332 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:560-590 \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 \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py:300\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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4cb739ecaa5d6f197e6649a8070d54fc65755ee3fa31be6d43559e678a61a0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:287-319 | kt-kernel/scripts/convert_cpu_weights_ds4.py:319-351 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py:316\u0060 calls \u0060_detect_key_format\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights.py:284\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e615e52e78996948add0a184fb6b1e4a715d21fad601bbaff4dde67dfc224cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:677-708 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:636-667 | archive/ktransformers/models/modeling_deepseek.py:676-707 | archive/ktransformers/models/modeling_deepseek_v3.py:640-671 | kt-kernel/examples/modeling_deepseek_v3.py:633-664 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"0943e44f94d508f8e26c8110288cfa3f9aba31a9dd4fd6b3095bfdde0ce1bdef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (66 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1787-1852 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1483-1548 | archive/ktransformers/models/modeling_deepseek.py:1783-1848 | archive/ktransformers/models/modeling_qwen2_moe.py:1482-1547 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 412 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"79cb90dc75447469850391682b0e682c95638d8a10272024fdfbf169c999ea1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:427-477 | archive/ktransformers/models/modeling_deepseek_v3.py:431-481 | kt-kernel/examples/modeling_deepseek_v3.py:424-474 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"a36cc0481349bf36c181ac6eeb02ac28917cefe4835e81de2e005beaa9e904b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1105-1136 | archive/ktransformers/operators/experts.py:644-675 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/operators/experts.py:1103\u0060 calls \u0060time\u0060 and \u0060archive/ktransformers/operators/experts.py:642\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"29af04603adbe1fe97ced6eefb7ef7cf47a75a68f46f5998902171891640558c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:91-122 | archive/ktransformers/server/backend/interfaces/ktransformers.py:165-195 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:91\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cad4ee694b80d6e77b682a83e15587d5a62e6342164d997415417ee3db79e79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:60-91 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:60-91 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"24adc372148c5a1ff15684f685d5fc73389509b041a58f7b3a5d32e059cb873f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201331 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1219-1247 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1186-1216 | archive/ktransformers/models/modeling_deepseek.py:1218-1246 | archive/ktransformers/models/modeling_deepseek_v3.py:1191-1221 | kt-kernel/examples/modeling_deepseek_v3.py:1183-1213 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1219\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed0bb2ae8a2247aadbdf239ba244c697370a6eb16c8183a901b1f53a9fef385a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201331 lines \u00D7 3): archive/kt-sft/ktransformers/operators/attention.py:149-179 | archive/ktransformers/operators/ascend/ascend_attention.py:284-311 | archive/ktransformers/operators/attention.py:148-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"592949cee1fa693a8628f31871c5f9d615c9a4882c4f5467567e3bcac45fb478"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:356-407 | archive/kt-sft/ktransformers/operators/experts.py:802-853 | archive/ktransformers/operators/experts.py:370-421 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"452d1d619a90e026e4b14ce1ca7bd72ce55c926e39a327a5984a93fb2e068240"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:666-696 | archive/ktransformers/operators/linear.py:681-711 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44477a7d177ce6115f993a783c69d61c3185c14144e7573aeb0238aab467444"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:843-873 | archive/ktransformers/operators/linear.py:858-888 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86d69adc92355dd4fc5f9ed512a476eb94471fc3482e3a63e8e28a6ff954f1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:791-821 | archive/ktransformers/operators/models.py:793-823 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3e55b396c9194b27220121fd76bef8390a270c3de3021f66bd3a8287d08c9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:467-497 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:467-497 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01a0893962888f446e7bce4264f734d9b3a2874508adc4e1ba7ca9536b32d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:284-319 | archive/ktransformers/util/modeling_rope_utils.py:284-319 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:284\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"004a221e732b416ea5aa7739dfa97d5eb44dad034e2991cb5bee86b23d89e987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): kt-kernel/python/utils/amx.py:359-389 | kt-kernel/python/utils/moe_kernel.py:82-112 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/python/utils/amx.py:359\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":"kt-kernel/python/utils/amx.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae89a67d00fb732ad77b2454c3794b8b8412845f518642de847197f98f25fbd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:1716-1745 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1707-1736 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1737-1766 | archive/ktransformers/models/modeling_llama.py:1715-1744 | archive/ktransformers/models/modeling_mixtral.py:1706-1735 | archive/ktransformers/models/modeling_qwen2_moe.py:1736-1765 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc75a30efc1c9632952644c1c6e1e887796bccf06cbd7b9fdce6642d6c02913c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 4): archive/csrc/custom_marlin/utils/quant_utils.py:69-98 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:69-98 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:38-67 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:38-67 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/csrc/custom_marlin/utils/quant_utils.py:101\u0060 calls \u0060half\u0060 and \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:70\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":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"291c52f2582a385d74b2ab8f9beeee32356c5476e510e315b319ab48220ec4b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:274-303 | archive/kt-sft/ktransformers/operators/RoPE.py:289-318 | archive/ktransformers/models/modeling_deepseek.py:273-302 | archive/ktransformers/operators/RoPE.py:290-319 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:272\u0060 calls \u0060__init__\u0060 and \u0060archive/kt-sft/ktransformers/operators/RoPE.py:288\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb45ded2f0a57c7b8d44091718137cb432295c475285b1d0bdac7926eb0c63ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 3): archive/kt-sft/ktransformers/operators/models.py:358-386 | archive/kt-sft/ktransformers/operators/models.py:1641-1670 | archive/ktransformers/operators/models.py:355-383 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:358\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"213db96f50e7c555ea6d8d936aee68be425965cfadd996796c9c6fbb95f5264d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:149-178 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:329-358 | archive/ktransformers/server/backend/interfaces/transformers.py:342-371 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e441bde13d33cdfa622d550eb0f510f90614ce3cf105f72116995f9efbc2f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1498-1527 | archive/ktransformers/models/modeling_mixtral.py:1497-1526 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"b089c24aa3e3ada6d02f76e88002639a65f6d65d12db2bc4a5231834f2ab5d05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (60 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:262-321 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:269-328 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:262\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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"9060d6c35e8289191fd743f1700093c38abb439835adb9b9322ebd9699eac145"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201330 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:160-189 | archive/ktransformers/server/balance_serve/inference/model_runner.py:268-295 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:191\u0060 calls \u0060batch_embeddings\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py:297\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"60066469d42ae59f2406932c31de05ee363a12a50ff1e2d3c17188ba67dc3cc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:118-147 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:118-147 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"52860507b65447dfe0f04c0fb77215f70ab2ffcf68232eee7bde022827953d97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py:71-100 | archive/ktransformers/server/balance_serve/inference/sampling/sampler.py:76-105 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/sampler.py\u0060 as WHOLE FILES: 96% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e56a9e9d96493f51995bb1ad001331f2cccf86500bb7cab29261261d99b6d50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_24_perms.py:22-55 | archive/kt-sft/csrc/custom_marlin/utils/marlin_24_perms.py:22-55 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:17-50 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:17-50 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_24_perms.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_24_perms.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_24_perms.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"54064bcf811dc69f928d202944846f8e6d61d355b70a73967f2ac0575221a9df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1451-1479 | archive/kt-sft/ktransformers/operators/models.py:624-652 | archive/ktransformers/models/modeling_deepseek.py:1450-1478 | archive/ktransformers/operators/models.py:621-649 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 216 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1451\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1451}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d0e625d649924db3d6ccfbcbca31a84f24c708adbc568d4098bc93586153327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 4): archive/kt-sft/ktransformers/operators/attention.py:211-239 | archive/kt-sft/ktransformers/operators/attention.py:364-392 | archive/ktransformers/operators/attention.py:210-238 | archive/ktransformers/operators/attention.py:363-391 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"588aae4caf11549dedb0965100b1343f0fa7bb5fa09c403715621408b1f79fda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:54-81 | archive/kt-sft/ktransformers/util/textstream.py:19-47 | archive/ktransformers/server/backend/interfaces/transformers.py:64-91 | archive/ktransformers/util/textstream.py:19-47 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/kt-sft/ktransformers/util/textstream.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e46f710cf9a9f298647162ae6dfb9c2222121929d76106ae0bf82e5ed4b061"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 4): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:166-192 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:262-290 | archive/ktransformers/util/modeling_rope_utils.py:166-192 | archive/ktransformers/util/modeling_rope_utils.py:262-290 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:166\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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c963043cf4e8709132f88ca70b36e2ed9e2c05c5e179fc41b9ab6cf9522efb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:795-843 | archive/ktransformers/models/modeling_deepseek_v3.py:799-847 | kt-kernel/examples/modeling_deepseek_v3.py:792-840 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"15291685e474e6aa06433098b26685e6a17ad7528f457c54a0afff7046a7fbc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:268-298 | archive/ktransformers/models/modeling_llama.py:267-297 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba011959085403fc65424701ae099d7c64644663e30d41220d99fcc9cd6eabe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:331-359 | archive/ktransformers/operators/linear.py:346-374 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"1540d40905ef0920d2e1060b65d4a28269ea939b07b0c132225a829cc79520ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/log.py:145-173 | archive/ktransformers/server/config/log.py:145-173 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/log.py\u0060 and \u0060archive/ktransformers/server/config/log.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4d6bf75104a623b10c4a1730857beed8e8d31314c2f72a511da57c151f3722"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/setup.py:214-243 | archive/setup.py:193-222 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ed3330b8e6ac87f76d4192ecb51126dc72e71045aa4535f25ebf0c208752e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): kt-kernel/python/utils/loader.py:467-495 | kt-kernel/python/utils/loader.py:1128-1155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c7deeda4116decb1d03db8bf1f5a7c270f902f72952d08f8b9ff39e95f74b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:59-87 | kt-kernel/scripts/convert_cpu_weights_ds4.py:88-114 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"9911f0d09403d54459ec0eea5e9e886fc6b51a04421d95a89815887070969eec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:641-669 | kt-kernel/scripts/convert_cpu_weights_ds4.py:708-736 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/convert_cpu_weights.py:641\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e47eb560f340e01c8e0235fba34ad0d40b60ae751d1b5db042ed12ab77fbf72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1241-1268 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1210-1235 | archive/kt-sft/ktransformers/models/modeling_llama.py:806-831 | archive/ktransformers/models/modeling_deepseek.py:1240-1267 | archive/ktransformers/models/modeling_deepseek_v3.py:1216-1241 | archive/ktransformers/models/modeling_llama.py:805-830 | kt-kernel/examples/modeling_deepseek_v3.py:1207-1232 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe6c2c49cd3189a082e8e596de7af43f3c7693f5be976a7550e46a2e59f6bc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:662-689 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:665-692 | archive/ktransformers/models/modeling_mixtral.py:661-688 | archive/ktransformers/models/modeling_qwen2_moe.py:664-691 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f32a30f108432ca3b4e4ef515349e4c171058a1f549ded40bd813ffe563322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201328 lines \u00D7 4): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:71-91 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:363-390 | archive/ktransformers/operators/balance_serve_attention.py:74-94 | archive/ktransformers/operators/balance_serve_attention.py:366-393 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py:395\u0060 calls \u0060transpose_\u0060 and \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py:94\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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f6afec12328bf9880e5fdbdbc9069acbd47ae340278550af1f06772086f0ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1743-1770 | archive/ktransformers/models/modeling_deepseek_v3.py:1757-1784 | kt-kernel/examples/modeling_deepseek_v3.py:1739-1766 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1743\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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1743}}}],"partialFingerprints":{"codehealthFindingId/v1":"797e9ee5b2726d65fac27b09e97b0211f070d71827dd2ca09754171459e02e05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py:150-177 | archive/ktransformers/models/configuration_qwen2_moe.py:150-177 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/configuration_qwen2_moe.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e931bf092d83dfca2117c2e82082aaa3180f81e5df2b2683aedcc33f010843e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:628-684 | archive/ktransformers/operators/attention.py:627-683 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:628\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1323fd28c11ed5ba974d94fc79f6ac223fe7bdd71c7fa5b1a8918fb3f29c49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:123-150 | archive/ktransformers/operators/flashinfer_wrapper.py:131-158 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b19e19bd8140d723aa85509d1a7fc373b0ec93ab754b3281c7eea2333def65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:595-622 | archive/ktransformers/operators/models.py:592-619 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:595\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5856cc0a9276cb4c267b1e6bf4aab47a08cce6305fd8af41090904c48b30d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:835-862 | archive/ktransformers/operators/models.py:844-871 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc2d1c6f0407c9b069531b4e9a8c2532c92d8cebd8de39725842e5c6400f8f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:186-213 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:186-213 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c35ccdfc4210b8ac3f130a04f92821e11368b38b61fafb88397a1f74c8af5f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 2): archive/ktransformers/server/balance_serve/inference/forward_batch.py:255-282 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:518-543 \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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0210f9b4744f04fbc6fba068f0f52d90390044e510977bc369dc4d72161f4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): kt-kernel/python/sft/lora.py:592-619 | kt-kernel/python/sft/lora.py:642-668 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb59a9ee2d7fef7c68959afb4759ab9d34c2b495793363748bff3f44f84d13b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1922-1948 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1867-1893 | archive/kt-sft/ktransformers/models/modeling_llama.py:1481-1507 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1584-1608 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1614-1638 | archive/ktransformers/models/modeling_deepseek.py:1918-1944 | archive/ktransformers/models/modeling_deepseek_v3.py:1881-1907 | archive/ktransformers/models/modeling_llama.py:1480-1506 | archive/ktransformers/models/modeling_mixtral.py:1583-1607 | archive/ktransformers/models/modeling_qwen2_moe.py:1613-1637 | kt-kernel/examples/modeling_deepseek_v3.py:1863-1889 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1922}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e71145023175bd95f16ffe6bb00e51b8e4239c4402be6f4128aa3f1a1228236"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:417-443 | archive/kt-sft/ktransformers/models/modeling_llama.py:545-571 | archive/kt-sft/ktransformers/models/modeling_llama.py:676-702 | archive/ktransformers/models/modeling_llama.py:416-442 | archive/ktransformers/models/modeling_llama.py:544-570 | archive/ktransformers/models/modeling_llama.py:675-701 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26fa181e1736a59e626069565d1f71896a2161ff56d84ade694fc4a66a5aa51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1133-1159 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1099-1125 | archive/ktransformers/models/modeling_deepseek.py:1132-1158 | archive/ktransformers/models/modeling_deepseek_v3.py:1103-1129 | kt-kernel/examples/modeling_deepseek_v3.py:1096-1122 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"062338a5b893fb531b479bcf818e95906efdc23ae65645cf74a56230168981bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 4): archive/kt-sft/ktransformers/operators/cpuinfer.py:439-465 | archive/kt-sft/ktransformers/operators/cpuinfer.py:478-504 | archive/ktransformers/operators/cpuinfer.py:439-465 | archive/ktransformers/operators/cpuinfer.py:478-504 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"823c4a196faba11963e10b6d8b313348ffdea450b1cda6c363a19f37b0ffaad7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:577-603 | archive/ktransformers/operators/dynamic_attention.py:577-603 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"188fb0ce0056c8dafa687f509c73544e76403054a166ccdcf41f5d7f9092e91d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:62-88 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:62-88 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"735d66d63cd115ebf778b9e435d6b21fc73b8cf2627ad971af247e1e27ff9e6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (144 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/config.py:62-205 | archive/ktransformers/server/config/config.py:62-205 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/config.py\u0060 and \u0060archive/ktransformers/server/config/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/config/config.py:62\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":"archive/kt-sft/ktransformers/server/config/config.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"6093694febd6ef584fc823f179b2d3b631b3c321395a484d86242f16c713d516"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:398-424 | archive/ktransformers/util/custom_loader.py:425-451 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"7286de9ee162ff026cb33e7c4ac508e67e445fd1059581fb01af1eb288a9a892"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:480-526 | archive/ktransformers/util/modeling_rope_utils.py:480-526 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:480\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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a3989830b51bf8af270c63ddea6821fb05bb00db351be4531c82188f9665fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201326 lines \u00D7 9): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1148-1173 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1114-1139 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:678-701 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:681-704 | archive/ktransformers/models/modeling_deepseek.py:1147-1172 | archive/ktransformers/models/modeling_deepseek_v3.py:1118-1143 | archive/ktransformers/models/modeling_mixtral.py:677-700 | archive/ktransformers/models/modeling_qwen2_moe.py:680-703 | kt-kernel/examples/modeling_deepseek_v3.py:1111-1136 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"c723f6497777311ab3564a451bd6867c5cb9906c1f84936642571848e9cb9699"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:220-268 | archive/kt-sft/ktransformers/util/utils.py:294-342 | archive/ktransformers/server/backend/interfaces/transformers.py:232-280 | archive/ktransformers/util/utils.py:345-393 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"465c5794a539a3743f33a9c75c98f522587dd53c73119421e90aa7083fc43392"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201326 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_loader.py:351-376 | archive/kt-sft/ktransformers/util/weight_loader.py:264-285 | archive/ktransformers/util/custom_loader.py:378-403 | archive/ktransformers/util/weight_loader.py:264-285 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c356ea79cc8ee552c3a2c554b92f96bc0aacd8b79fbcc87270cbee57326ed0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201326 lines \u00D7 3): archive/kt-sft/ktransformers/util/utils.py:371-396 | archive/kt-sft/ktransformers/util/utils.py:560-585 | archive/ktransformers/util/utils.py:475-499 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/utils.py:371\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 before the matched lines, \u0060archive/ktransformers/util/utils.py:474\u0060 calls \u0060set_device\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:559\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"937d4d69c597ea055fdd1db4285e30a5f0852b66d9f5aeb5afb07a78b4b10d42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:244-269 | archive/ktransformers/operators/dynamic_attention.py:244-269 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py:244\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":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"b642a9b2599b505d0741934786cada13b9db9471df162edc0a03072bb2d90342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1393-1434 | archive/ktransformers/operators/experts.py:781-822 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1393}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a059a4771c871608fd2bda59d9b131e769d3ebdb9dd84350a7b9c4424e6baa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (119 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:119-237 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:126-244 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:119\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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b94ce5d7385ed5da85b40537e4138737b6d7a437d001dcdb9d4788d6f5262e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/context_manager.py:30-55 | archive/ktransformers/server/backend/context_manager.py:30-55 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/context_manager.py\u0060 and \u0060archive/ktransformers/server/backend/context_manager.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/context_manager.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"06223365e7267b77c56ff77a8b89c16e17338fc39a6a81e6b7bbe8c7817cac7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201326 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:154-179 | archive/ktransformers/server/backend/interfaces/balance_serve.py:234-257 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"66415a99832740330c3395dea87e909a57f2de7a325ea29bbe0f9fddeb536611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:456-499 | kt-kernel/scripts/convert_cpu_weights_ds4.py:523-566 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"d832964f54128ae41f708ae9d7a660e9066a3b16bde45f77e153c79faeb84b5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201326 lines \u00D7 2): kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:212-237 | kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:297-312 \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 \u0060kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:212\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":"kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"db86314ab1c6cd69d119f0f8643b896c2627e898008e72582cfa989493e659ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:976-997 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:950-971 | archive/kt-sft/ktransformers/models/modeling_llama.py:564-588 | archive/ktransformers/models/modeling_deepseek.py:975-996 | archive/ktransformers/models/modeling_deepseek_v3.py:954-975 | archive/ktransformers/models/modeling_llama.py:563-587 | kt-kernel/examples/modeling_deepseek_v3.py:947-968 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:564\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f5617e6c2f3e9d626982744c899d419ccb1983badadd9d4d0d701fbc30fe96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1439-1463 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1405-1429 | archive/kt-sft/ktransformers/operators/models.py:612-636 | archive/ktransformers/models/modeling_deepseek.py:1438-1462 | archive/ktransformers/models/modeling_deepseek_v3.py:1411-1435 | archive/ktransformers/operators/models.py:609-633 | kt-kernel/examples/modeling_deepseek_v3.py:1402-1426 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1439\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"666b23d511cbfecf1972c54f6451c18cd1dc9d662c262a467fb45e5229ec5bf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1540-1561 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1500-1521 | archive/kt-sft/ktransformers/operators/models.py:808-832 | archive/ktransformers/models/modeling_deepseek.py:1539-1560 | archive/ktransformers/models/modeling_deepseek_v3.py:1506-1527 | kt-kernel/examples/modeling_deepseek_v3.py:1497-1518 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:808\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"f438a5709a04b76fd0c221f391913266abda6db222d240b5e6003ff0c2f0764d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:290-314 | archive/ktransformers/models/modeling_deepseek_v3.py:294-318 | kt-kernel/examples/modeling_deepseek_v3.py:287-311 | kt-kernel/examples/torch_attention.py:273-297 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/examples/torch_attention.py:299\u0060 calls \u0060isinstance\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:316\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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc13d732a60c9516561f21beea3a3c01f769a1f767edafbf5929667e4eb34d9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:292-316 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:286-310 | archive/ktransformers/models/modeling_mixtral.py:291-315 | archive/ktransformers/models/modeling_qwen2_moe.py:285-309 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MixtralConfig\u0060 in one and \u0060Qwen2MoeConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"460e1b70c7b2172345715de193051f9eac25c1980225ded8c74946aa872acae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1230-1254 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1221-1245 | archive/ktransformers/models/modeling_mixtral.py:1229-1253 | archive/ktransformers/models/modeling_qwen2_moe.py:1220-1244 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62a877c4c27efdf0669e63adf237a60e06356ff34486676a7149d87996f9303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 3): archive/kt-sft/ktransformers/util/utils.py:446-470 | archive/kt-sft/ktransformers/util/utils.py:635-659 | archive/ktransformers/util/utils.py:687-709 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/util/utils.py:710\u0060 calls \u0060get_rank\u0060, \u0060get_tensor_parallel_size\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:471\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"d76d68b5a4859923bd5b25b50528965168e50a5d976f9d7bc29481eb0a1385ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:30-68 | archive/ktransformers/operators/flashinfer_wrapper.py:38-76 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7b134d8211e36f821874c2b16e416cefa3b0055ca0202ff4bb8d36320fe900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:173-197 | archive/ktransformers/operators/linear.py:186-210 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab55d11be830a6dc56c92358b901fe24174f3648caae84139c8edb32824545e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:657-681 | archive/ktransformers/operators/models.py:653-677 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b25ea369cd70bd1e008476eceaf723df50779b41f7d0e2b4738fcfcfb0d4a13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:26-50 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py:26-50 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"f773da75d02bee3fdb0b6ecbd3f2bdcafb1304c6fb287392996bbcd1acbe5981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:556-580 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:556-580 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"190c48a8ddc2760d2a30610589671bd8f5c72bd0e5a2d8d56650e81e3304ffbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/threads.py:22-46 | archive/ktransformers/server/crud/assistants/threads.py:22-46 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/threads.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccff3c1a389869a0d65d7f0178927cc6f57fccf4d151767f47aec5287ee420b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:202-226 | archive/ktransformers/util/custom_loader.py:226-250 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"f82b81967758b0f7d1fe00c110c74374e2a84461c1d7ad054c73a7be6aa56d44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/util/vendors.py:76-100 | archive/ktransformers/util/vendors.py:76-100 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/vendors.py\u0060 and \u0060archive/ktransformers/util/vendors.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc1b88b57db42e3b29d223e8c79a3a4ee9364d69c7226faf22f64d15b93b4cc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:158-182 | archive/ktransformers/util/weight_loader.py:158-182 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"201508d9fe2cecbe78dfc5b95665b831f223f364f1fb044ed8a14c6d8b222042"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:105-129 | kt-kernel/scripts/convert_cpu_weights_ds4.py:134-155 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/convert_cpu_weights.py:105\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, \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py:156\u0060 calls \u0060get\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights.py:130\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4b52fde1ebab10b711bc6c449159e767a3ce94936d96e86fc0291ac96e3c0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1693-1716 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1427-1449 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1417-1439 | archive/ktransformers/models/modeling_mixtral.py:1426-1448 | archive/ktransformers/models/modeling_qwen2_moe.py:1416-1438 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1693\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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1693}}}],"partialFingerprints":{"codehealthFindingId/v1":"c46e6cb3ce47ec4a38f429ec9cba443d561dedd9fb83e9a9b1fbfcd5e4c84acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 4): archive/csrc/custom_marlin/utils/format24.py:280-308 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:280-308 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:280-308 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:280-308 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/format24.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/format24.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 251 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccbe947e3a5addafc686745948782b74fafc67a9ddb8cb5b6952430dcc839c5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:128-151 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:128-151 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:164-187 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:164-187 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ca6931108fb17d77a3f25ffce1564a174488b71ac7d32d68a63b13049665c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:344-368 | archive/ktransformers/models/modeling_deepseek_v3.py:348-372 | kt-kernel/examples/modeling_deepseek_v3.py:341-365 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:344\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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a85779b39e6f930ea6337755efedde7cb7dc22efbc9cf2d0f9878988ba9a5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201324 lines \u00D7 4): kt-kernel/python/cli/utils/model_table_builder.py:49-68 | kt-kernel/python/cli/utils/model_table_builder.py:109-132 | kt-kernel/python/cli/utils/model_table_builder.py:211-230 | kt-kernel/python/cli/utils/run_interactive.py:99-102 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/python/cli/utils/model_table_builder.py:70\u0060 calls \u0060add_column\u0060 and \u0060kt-kernel/python/cli/utils/model_table_builder.py:232\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":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7385e6a9bd1acb0f2871a4ec8ccf68c57f7e1bdd5b0f3db0e54ac831a38c26ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201324 lines \u00D7 13): archive/kt-sft/ktransformers/models/modeling_deepseek.py:146-149 | archive/kt-sft/ktransformers/models/modeling_llama.py:165-188 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:224-227 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:206-209 | archive/kt-sft/ktransformers/operators/RoPE.py:91-94 | archive/kt-sft/ktransformers/operators/RoPE.py:394-397 | archive/ktransformers/models/modeling_deepseek.py:145-148 | archive/ktransformers/models/modeling_llama.py:164-187 | archive/ktransformers/models/modeling_mixtral.py:223-226 | archive/ktransformers/models/modeling_qwen2_moe.py:205-208 | archive/ktransformers/operators/RoPE.py:92-95 | archive/ktransformers/operators/RoPE.py:395-398 | kt-kernel/examples/torch_attention.py:166-169 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 428 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd72ca1f20817f7cbc3798401a425d31f79f1973fbf3b98296d32c9bd330110"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:110-133 | archive/ktransformers/operators/cpuinfer.py:110-133 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b9c80925ec3255f1927b4ea45e6f09097a5b45a61bc3a72da49922b95ad9d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:640-663 | archive/ktransformers/operators/cpuinfer.py:640-663 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"0626ccfd669019a4bee86d9e7ef9252574e1955de5f1ec363e5d821dc6a7ce2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/config.py:27-50 | archive/ktransformers/server/config/config.py:27-50 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/config.py\u0060 and \u0060archive/ktransformers/server/config/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/config.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"79c2cdaf2673317025195d840ba07f5f427cf686b6a2a821702fde2922f5327a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:214-251 | archive/ktransformers/util/utils.py:270-307 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"9577a5ea516d4bf5396dc3a5e3af35d032cdfb532d308c62e3c7936af401ebec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:72-95 | archive/merge_tensors/merge_safetensor_gguf.py:72-95 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"190b07441b670775fe45186ec6bd39f44bfccd2eb3658f1390affe13705d42cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): kt-kernel/python/utils/loader.py:1252-1275 | kt-kernel/python/utils/loader.py:1418-1440 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0887b75aac308062c8959056139fc58dffac413a8f99959af441b163b79d0e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 14): archive/kt-sft/ktransformers/operators/experts.py:1553-1575 | archive/kt-sft/ktransformers/operators/experts.py:1653-1675 | archive/kt-sft/ktransformers/operators/experts.py:1852-1874 | archive/kt-sft/ktransformers/operators/experts.py:2038-2060 | archive/kt-sft/ktransformers/operators/experts.py:2160-2182 | archive/kt-sft/ktransformers/operators/experts.py:2281-2303 | archive/ktransformers/operators/experts.py:941-963 | archive/ktransformers/operators/experts.py:1043-1065 | archive/ktransformers/operators/experts.py:1242-1264 | archive/ktransformers/operators/experts.py:1580-1602 | archive/ktransformers/operators/experts.py:1702-1724 | archive/ktransformers/operators/experts.py:1836-1858 | archive/ktransformers/operators/experts.py:1942-1964 | archive/ktransformers/operators/experts.py:2068-2090 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:1553\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1553}}}],"partialFingerprints":{"codehealthFindingId/v1":"0524f020e1c72488d8d06fe2e1460d5306523959231fb7d69978baec6c1fff35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_llama.py:1043-1065 | archive/kt-sft/ktransformers/operators/models.py:296-316 | archive/kt-sft/ktransformers/operators/models.py:1584-1604 | archive/ktransformers/models/modeling_llama.py:1042-1064 | archive/ktransformers/operators/models.py:293-313 \u2014 there are 5 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1043\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, \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1068\u0060 calls \u0060rotary_emb\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:1608\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"35ba2899ed8e1cfa27767017f088d926ece4b41f4ccaaa7a8c68536db1fc863b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 5): archive/kt-sft/ktransformers/util/custom_loader.py:59-81 | archive/kt-sft/ktransformers/util/weight_loader.py:74-96 | archive/ktransformers/util/custom_loader.py:69-91 | archive/ktransformers/util/weight_loader.py:74-96 | kt-kernel/python/utils/loader.py:166-188 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b599f70893c15614eab7d86a67dba3c73a99706c1c91865932f46ba6327b09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 5): archive/ktransformers/server/balance_serve/settings.py:99-121 | archive/ktransformers/server/balance_serve/settings.py:153-175 | archive/ktransformers/server/balance_serve/settings.py:205-227 | archive/ktransformers/server/balance_serve/settings.py:257-279 | archive/ktransformers/server/balance_serve/settings.py:309-331 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd98e15076366cd62c2567825d64a8cae983b78ea26e412d3df10444635acdda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:1008-1030 | archive/kt-sft/ktransformers/operators/models.py:1063-1085 | archive/ktransformers/models/modeling_llama.py:1007-1029 | archive/ktransformers/operators/models.py:1072-1094 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1008\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, \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1033\u0060 calls \u0060embed_tokens\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:1087\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e59ec36f6620b2613b5d1ed5cd8aed98006e6690d3e51fcf62d50119100c3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:585-607 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:588-610 | archive/ktransformers/models/modeling_mixtral.py:584-606 | archive/ktransformers/models/modeling_qwen2_moe.py:587-609 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:585\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b78f0e0a29ecaabd713f13803b192a6d9d0157c980e227f4a7a56e3861cd08d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1139-1161 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1130-1152 | archive/ktransformers/models/modeling_mixtral.py:1138-1160 | archive/ktransformers/models/modeling_qwen2_moe.py:1129-1151 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f2ab601f837ae6835dc8a646c10bb57cc82e7562636f934c419092d00650c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49\u201350 lines \u00D7 4): archive/kt-sft/ktransformers/operators/attention.py:299-348 | archive/kt-sft/ktransformers/operators/attention.py:476-524 | archive/ktransformers/operators/attention.py:298-347 | archive/ktransformers/operators/attention.py:475-523 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7acfaa2171d3884dc706e81f8ef8a72aeafcfd218831b2c378e947643179604"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): archive/kt-sft/ktransformers/operators/dynamic_attention.py:343-365 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:440-462 | archive/ktransformers/operators/dynamic_attention.py:343-365 | archive/ktransformers/operators/dynamic_attention.py:440-462 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3498fb4cd008e50eee984157343e9ad4811cac692666f76dd1addeaa0a9b2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:123-169 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:123-169 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:123\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":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce51e6bf4bd6a6ebe6cf7ea94a58c3cf35d1c25b09dc3e4c1e75a52dd445f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:537-559 | archive/ktransformers/operators/attention.py:536-558 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3e08a3377199cb7dda823d1fdf8c25c99c065ec738fa3be0a5ede23c28e114"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:680-702 | archive/ktransformers/operators/cpuinfer.py:680-702 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8082f51250b89db2bc9262929e737666674f538949bc27268d07aab53b8854b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:454-476 | archive/ktransformers/server/backend/interfaces/transformers.py:493-515 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/server/backend/interfaces/transformers.py:492\u0060 calls \u0060equal\u0060 and \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:453\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":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b446749171162d6029fc7557978af62fe880e02507c3d3f8713f35d1e6c1872"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:33-55 | archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:33-55 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8e3e05943f1c83cc731f203e03a992f73a9bb8b64f4aabcf9fb05a99c569d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/settings.py:97-119 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:151-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"e065f41618bee081c3779109182f55e7358c2cc4f23985f1cdfbd6cba7c041b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/log.py:107-129 | archive/ktransformers/server/config/log.py:107-129 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/log.py\u0060 and \u0060archive/ktransformers/server/config/log.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"636e56531fe441c3a0cf5c01b17a49ff1376198e5699c3bc7291819865cf1084"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:227-253 | archive/ktransformers/util/custom_gguf.py:234-260 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db416b28ea1908174bdd096250bf73a86d88b68e6a68331891fa21edc1aca23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): archive/kt-sft/setup.py:294-316 | archive/setup.py:275-297 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"22afdc92d507710254c40c0b3a740485d8931cfd5b9070f00736c6dcb582ea88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): archive/ktransformers/server/balance_serve/inference/forward_batch.py:222-244 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:486-507 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7b5588d5e233fb8bd61d57def0ae49f0787419f98a3a9f92010c3608ea4fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): kt-kernel/python/utils/loader.py:834-856 | kt-kernel/python/utils/loader.py:868-890 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fda3cf0889bf3cf6aef4410bf8a4c7723c3240a44752a81d59571a75de6fc65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 9): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1912-1933 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1857-1878 | archive/kt-sft/ktransformers/models/modeling_llama.py:1471-1492 | archive/kt-sft/ktransformers/models/modeling_llama.py:1706-1727 | archive/ktransformers/models/modeling_deepseek.py:1908-1929 | archive/ktransformers/models/modeling_deepseek_v3.py:1871-1892 | archive/ktransformers/models/modeling_llama.py:1470-1491 | archive/ktransformers/models/modeling_llama.py:1705-1726 | kt-kernel/examples/modeling_deepseek_v3.py:1853-1874 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d23f7beed0829506f0a4381ed7e95a9fddb334ad8236053450f281b93c3299"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 8): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:88-108 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:92-113 | archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:80-100 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:80-100 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:88-108 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:92-113 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:80-100 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:80-100 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:78\u0060 calls \u0060calc_batch_indices\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:85\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":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0b5bba84feacb1a437762cabdebb69a5dbdaca77ba07405ab85844a8f3f643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1808-1829 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1760-1781 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1504-1525 | archive/ktransformers/models/modeling_deepseek.py:1804-1825 | archive/ktransformers/models/modeling_deepseek_v3.py:1774-1795 | archive/ktransformers/models/modeling_qwen2_moe.py:1503-1524 | kt-kernel/examples/modeling_deepseek_v3.py:1756-1777 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1808}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1ca6ab0c0ce053419b3dcac88cff2488235003d51eef66a312ef118c791662"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201322 lines \u00D7 6): archive/kt-sft/ktransformers/operators/cpuinfer.py:108-121 | archive/kt-sft/ktransformers/operators/cpuinfer.py:442-463 | archive/kt-sft/ktransformers/operators/cpuinfer.py:481-502 | archive/ktransformers/operators/cpuinfer.py:108-121 | archive/ktransformers/operators/cpuinfer.py:442-463 | archive/ktransformers/operators/cpuinfer.py:481-502 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:440\u0060 calls \u0060dim\u0060, \u0060size\u0060 and \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:108\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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14e2e50b6d50b0575beb894fe6df44824300ab45765bcbde0e365e255fc1774"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:870-891 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:840-861 | archive/ktransformers/models/modeling_deepseek.py:869-890 | archive/ktransformers/models/modeling_deepseek_v3.py:844-865 | kt-kernel/examples/modeling_deepseek_v3.py:837-858 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:870\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb39f39ceb45df92e3eb6962bb7e552539a1b5ff646d6d79428ab80dcebf8cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1140-1161 | archive/kt-sft/ktransformers/operators/models.py:270-291 | archive/ktransformers/models/modeling_qwen2_moe.py:1139-1160 | archive/ktransformers/operators/models.py:267-288 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"793522805f38ad6d5a27e9a2f7fc1e8bcddb90d6cea74415a894a2dfa6566924"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:97-118 | archive/kt-sft/ktransformers/util/textstream.py:63-84 | archive/ktransformers/server/backend/interfaces/transformers.py:107-128 | archive/ktransformers/util/textstream.py:63-84 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/kt-sft/ktransformers/util/textstream.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4ee0d201397c316005e66479ea35e5d9b5afbb2115bd5302f98b0e309686e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201322 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:339-360 | archive/ktransformers/models/modeling_deepseek.py:338-359 | archive/ktransformers/operators/ascend/ascend_attention.py:40-42 | kt-kernel/examples/torch_attention.py:97-118 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7ab5968ebab307f38390441ff74af60b75d31509a21b9c3a1bacbeae53f00d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1150-1171 | archive/ktransformers/models/modeling_deepseek_v3.py:1154-1175 | kt-kernel/examples/modeling_deepseek_v3.py:1147-1168 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1150}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a7899ced06889e1b05f12c6999e6bbe693b5f7b61e3e84bb0d1ba878822dd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 3): archive/kt-sft/ktransformers/operators/attention.py:545-590 | archive/ktransformers/operators/ascend/ascend_attention.py:439-484 | archive/ktransformers/operators/attention.py:544-589 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:545\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"02771cc101ea70d81b1f0278856f39e442a1c0e25ff503bbc6c61dd7060ca738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/csrc/custom_marlin/utils/quant_utils.py:15-36 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:15-36 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fa4486d7a7bca4b4c31596730381bf063110a551f68868c3b72cef2c856f12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1183-1204 | archive/ktransformers/models/modeling_deepseek.py:1182-1203 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b201333befd028c45fd5817c8455d372f8abbd796f62359292a5193b27c44f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:136-157 | archive/ktransformers/models/modeling_llama.py:135-156 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4bebb6557086b5dde71ff416f592ffc19a5ae8525eaf0e7e766bb17829b540"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:118-139 | archive/ktransformers/operators/attention.py:117-138 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b6d306da8447c592e0b8a9fc94ae49494c548c4fa964de514d0a77752e5dc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:184-205 | archive/ktransformers/operators/experts.py:188-209 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:184\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec570748cbc4f75d982765df31b6c981f8a22925d4405f8c1d2d0bb8ce4bb18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (105 lines \u00D7 2): archive/kt-sft/ktransformers/server/args.py:33-137 | archive/ktransformers/server/args.py:41-145 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/args.py\u0060 and \u0060archive/ktransformers/server/args.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/server/args.py:37\u0060 calls \u0060add_argument\u0060 and \u0060archive/kt-sft/ktransformers/server/args.py:29\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":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"69cf09eb73d4b792546e2e6483a94565f6c6fa6916c853f2705a6ecf3805afff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:515-536 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:515-536 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce6d00ab8b4497603b7ffd04b3841d8db4deaf04478ffad33be7b180baa4c80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1096-1117 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1096-1117 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae02cc3cb27d0290ffd48fa5fd54d1e2c106330813f98c87fdc7537deb3be926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:119-140 | archive/ktransformers/server/balance_serve/inference/query_manager.py:165-186 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1de5b6d9ac03df363f1b3e6db72d23031f105493401375fb16a5003436e8da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py:23-44 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py:23-44 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"44da163d7c1456f481521213dbe95eaf35b695109cd6e61179db0c44eddfa2db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py:23-44 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py:23-44 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"426352a3b59e277e4dde0f39aaaadeb963ae42f5c54f3af9223e7238e7892922"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py:23-44 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py:23-44 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c47b0b2295ef0f24d173fa526562080173b31ea33ebe55b8967095b38a5690d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/util/vendors.py:103-124 | archive/ktransformers/util/vendors.py:103-124 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/vendors.py\u0060 and \u0060archive/ktransformers/util/vendors.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a067b697a709598e447ddac8317d75907ea9f8f48c770cc5e1e129d6c4d28de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:924-947 | kt-kernel/scripts/convert_cpu_weights_ds4.py:993-1016 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4caceef38b0df4ab19a644ad0cb909cb828fcf1810102b3ba3789a2d72090e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_llama.py:1073-1093 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1191-1211 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1182-1202 | archive/kt-sft/ktransformers/operators/models.py:1225-1245 | archive/ktransformers/models/modeling_llama.py:1072-1092 | archive/ktransformers/models/modeling_mixtral.py:1190-1210 | archive/ktransformers/models/modeling_qwen2_moe.py:1181-1201 | archive/ktransformers/operators/models.py:1234-1254 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1073\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d299ede8ec9a8db0a888fb04a6653634ac53f145119c0fea8fab8b09be86ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:720-740 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:679-699 | archive/ktransformers/models/modeling_deepseek.py:719-739 | archive/ktransformers/models/modeling_deepseek_v3.py:683-703 | kt-kernel/examples/modeling_deepseek_v3.py:676-696 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e888fdf8ffacad40152a6be9585a8fb2f063727053fc99f7fd8554d0272629"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): archive/kt-sft/ktransformers/models/custom_cache.py:235-257 | archive/ktransformers/models/custom_cache.py:425-447 | kt-kernel/examples/torch_attention.py:44-66 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"3740f0dd1d472991748398c8796a32c1fb9ee56cf95f19460e07ec12727c4929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:399-419 | archive/ktransformers/models/modeling_deepseek_v3.py:403-423 | kt-kernel/examples/modeling_deepseek_v3.py:396-416 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5180ad43dee1a88efac5f099124d9ad46d0922f0b19dab32c3f3a1f884d4f1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:2097-2117 | archive/ktransformers/operators/experts.py:1639-1659 | archive/ktransformers/operators/experts.py:1773-1793 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:2097\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2097}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d68ed23af2060b8659781bea1b0cd8f588779723b1701a93820422d601c67d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): kt-kernel/python/utils/loader.py:1239-1259 | kt-kernel/python/utils/loader.py:1334-1354 | kt-kernel/python/utils/loader.py:1405-1425 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc5ffd205a9eb8d103d635a223ecbe6af4b4c84938d414b1ce9e4183f28720e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201321 lines \u00D7 3): kt-kernel/scripts/convert_cpu_weights.py:672-692 | kt-kernel/scripts/convert_cpu_weights_ds4.py:739-759 | kt-kernel/scripts/merge_cpu_weights.py:59-69 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bb94877bf06e5de37d5348b6dcf8cb5989b9954aabaa1381d26afb6d8624a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:650-670 | archive/ktransformers/models/modeling_llama.py:649-669 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe190f10d3371906ed42960dc2f05ef0d937db0ee827e3c9cecfd3b4254a918"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1697-1730 | archive/ktransformers/operators/experts.py:1087-1120 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1697}}}],"partialFingerprints":{"codehealthFindingId/v1":"06a142a62a54952fda69b641235398cb8f9fe0d007820f318314e6b5319be819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:447-467 | archive/ktransformers/operators/models.py:444-464 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b27b04acec6e800157fc75f9254d0eb405f526d34eccc00cf688f9fcc9e26d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:82-106 | archive/ktransformers/optimize/optimize.py:94-118 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/optimize/optimize.py:82\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"be002d231a09abe267764f79374b6ea44618e56bce7cabcd1633083b486ea2bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:53-73 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:53-73 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"244c8e4bb690e6ec032079c3e7d836586c1736bb7eb3814fd35a22fb1eb35bd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:421-461 | archive/ktransformers/util/custom_gguf.py:428-468 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/custom_gguf.py:421\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"d861ef3a220a1bd4767e02a354ccfc2d3473bc6f60e1d0eed74553a35bfa43d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:288-308 | archive/ktransformers/util/weight_loader.py:288-308 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e4393822e26f6123f2c118335aa13c77d823546187d5221309e88ceed8d532"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:347-367 | archive/ktransformers/util/weight_loader.py:347-367 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"19336aaa84166ef6611367f340ea196ea94bca045794f14d7fd297862b63ab0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): archive/ktransformers/util/utils.py:535-555 | archive/ktransformers/util/utils.py:567-586 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb246b35c7b13577e3196c39b678c6b580663d2b6b87e70613a7f91620558a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:135-155 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:172-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8abbfc19fe0ed96d6293a917e36bf6ed32977b0440e71f32111b94df2fe8acb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201320 lines \u00D7 12): archive/kt-sft/ktransformers/models/modeling_deepseek.py:819-835 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:937-956 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:778-794 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:911-930 | archive/kt-sft/ktransformers/operators/attention.py:615-629 | archive/ktransformers/models/modeling_deepseek.py:818-834 | archive/ktransformers/models/modeling_deepseek.py:936-955 | archive/ktransformers/models/modeling_deepseek_v3.py:782-798 | archive/ktransformers/models/modeling_deepseek_v3.py:915-934 | archive/ktransformers/operators/attention.py:614-628 | kt-kernel/examples/modeling_deepseek_v3.py:775-791 | kt-kernel/examples/modeling_deepseek_v3.py:908-927 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:819\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"2482179349780610c81e6f9096fbe9ce7b0bbea07646602eda109a1c0fcea05d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1576-1595 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1699-1718 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1606-1625 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1729-1748 | archive/ktransformers/models/modeling_mixtral.py:1575-1594 | archive/ktransformers/models/modeling_mixtral.py:1698-1717 | archive/ktransformers/models/modeling_qwen2_moe.py:1605-1624 | archive/ktransformers/models/modeling_qwen2_moe.py:1728-1747 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"0253550b8b4b363c12d05b86d247db962b0994a54daa1644ffe86882d3db1f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:199-218 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:206-225 | archive/ktransformers/models/modeling_deepseek.py:198-217 | archive/ktransformers/models/modeling_deepseek_v3.py:210-229 | kt-kernel/examples/modeling_deepseek_v3.py:203-222 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"362297f48978798556455d3c4a4689178a419dc83980d623fcef3bb77e2442dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:155-174 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:155-174 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:191-210 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:191-210 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_utils.py:155\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37bfacd257b36fa1f96ea7fc36b74dcb1cb4834bf5b81b01f6fc4d8fb129e80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:170-189 | archive/kt-sft/ktransformers/operators/experts.py:516-535 | archive/ktransformers/operators/experts.py:174-193 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/operators/experts.py:170\u0060 calls \u0060get_tensor_parallel_size\u0060, \u0060is_initialized\u0060, \u0060get_rank\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:169\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"396a3700bfeae892698944c47bde0379380ea6015e5f7ebe6fc5f19d660eab3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:1974-1995 | archive/ktransformers/operators/experts.py:1516-1537 | archive/ktransformers/operators/experts.py:2004-2025 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:1974\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/operators/experts.py:2001\u0060 calls \u0060sum\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:1971\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"5feb0d4c3bfdd56b1d9921382b9eb049e0fb23f6b96e86233aa17565d2254ba0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:12-31 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:12-31 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0cfbb9a1f2c185072d67ea676cad256be2c9f162dcce1de2deb69dca08ade50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:205-224 | archive/ktransformers/operators/experts.py:211-229 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:205\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d11de1be153da416a1234ea5d83caca01bc48234b7ca73c70aea509f17c84a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:941-960 | archive/ktransformers/operators/linear.py:945-964 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a1466815460c6a98978a27c608e478ab375581efb75c7e88afce2112c6e1e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:59-78 | archive/ktransformers/optimize/optimize.py:71-90 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/optimize/optimize.py:70\u0060 calls \u0060translate_name_to_gguf\u0060 and \u0060archive/kt-sft/ktransformers/optimize/optimize.py:56\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0105f87a53f9000d4fcd746ea953f657bcd5d582078a363f5bcbdfbec829e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:182-201 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:182-201 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"df23a265dd9446390d6d294f9a6e29ba39fb1e67615aa453cd559318de92b4f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:263-282 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:263-282 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"29747802a911f682df51dfc49fcb58507fe11566df183d7e655ef59c7bdfd10b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py:122-141 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py:122-141 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"930574c513adef6bc27562765dfe1c8c898373fbd3454ef89da78e2880088fe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/log.py:85-104 | archive/ktransformers/server/config/log.py:85-104 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/log.py\u0060 and \u0060archive/ktransformers/server/config/log.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"91cc136a18013044b7dcbdbb87ca5c759cdef9a672eb6970a7df2c606bd74d1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:157-176 | archive/ktransformers/server/schemas/assistants/assistants.py:157-176 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b7efcb24653f6cac1957e4cf155ffb6d9d8e06c6c3b40218646897a9d0268a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:274-305 | archive/ktransformers/util/custom_gguf.py:281-312 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e524f74b86d816568894f1d2beb70e50239a9d68adc8126b78d5d5083e0de0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:637-656 | archive/ktransformers/util/custom_gguf.py:644-663 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"03635697a9aa409e4ab711a7dadb9aaaa7471fdebf499cce0a4a2dd4abcca821"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:385-404 | archive/ktransformers/util/modeling_rope_utils.py:385-404 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3070426f838f58fa380ac16ab9a933f848986fe93a065585b5c6448b45c54c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 2): archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:151-170 | kt-kernel/scripts/check.py:204-220 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"663d11c7f77ad4d46f13b4f0dbb4302fb5d3189288e8e6f435d7b40de72fb02b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:265-284 | kt-kernel/scripts/convert_cpu_weights_ds4.py:293-312 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py:316\u0060 calls \u0060_detect_key_format\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights.py:286\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"90478d018432cff11ab7a86b5047b4ac7555a6b8cce0cc58774764bb7732aa91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 8): archive/kt-sft/ktransformers/server/balance_serve/settings.py:25-43 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:78-96 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:132-150 | archive/ktransformers/server/balance_serve/settings.py:80-98 | archive/ktransformers/server/balance_serve/settings.py:134-152 | archive/ktransformers/server/balance_serve/settings.py:186-204 | archive/ktransformers/server/balance_serve/settings.py:238-256 | archive/ktransformers/server/balance_serve/settings.py:290-308 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9df688ec1e62ef728e06d3afb438c21a712420df934e79dfe21ab345e69225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:587-605 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:504-522 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:503-521 | archive/ktransformers/models/modeling_llama.py:586-604 | archive/ktransformers/models/modeling_mixtral.py:503-521 | archive/ktransformers/models/modeling_qwen2_moe.py:502-520 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfee69bf9749f3a6a739a53b735ab28c72117e1b56c332204c5d836b9fcd70d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1168-1185 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1159-1176 | archive/ktransformers/models/modeling_mixtral.py:1167-1184 | archive/ktransformers/models/modeling_qwen2_moe.py:1158-1175 | archive/ktransformers/models/modeling_smallthinker.py:521-539 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:1168\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, \u0060archive/ktransformers/models/modeling_smallthinker.py:541\u0060 calls \u0060rotary_emb\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:1188\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1168}}}],"partialFingerprints":{"codehealthFindingId/v1":"5100c9e90c3c54753041f63589fd561976c13013d15b5bda133478d46836ce04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1108-1126 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:631-649 | archive/ktransformers/models/modeling_deepseek.py:1107-1125 | archive/ktransformers/models/modeling_qwen2_moe.py:630-648 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 412 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1108}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad3a03d6067e3b1971b0845bb8d7415d6caabc80cc6f0e0adbb9dcb4ed662a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:725-753 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:726-754 | archive/ktransformers/models/modeling_mixtral.py:724-752 | archive/ktransformers/models/modeling_qwen2_moe.py:725-753 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f405890e4f215174c511a2849b2a49ca0344542f2565630a3fb308b8dac68ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1363-1381 | archive/ktransformers/models/modeling_deepseek_v3.py:1369-1387 | kt-kernel/examples/modeling_deepseek_v3.py:1360-1378 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1363}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e801b107d9ca9c1ca7092dd6b6e2dea1c3cdc1005d337431fedaf15f63b92bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): kt-kernel/python/utils/loader.py:472-490 | kt-kernel/python/utils/loader.py:611-629 | kt-kernel/python/utils/loader.py:1132-1150 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"55d9e8c278648726696b240dffe7f1da8c4c0a79655283d79e89a12d45e1d773"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:58-76 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:58-76 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee93f64a453f8b55a4d141cba8eb4ea304d5b223b92c963f0305ea28071d932e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:389-407 | archive/ktransformers/models/modeling_deepseek.py:388-406 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc814b356aa5999d5c9dbb1dc220513497960f1180ffdedc37eb8f58fa22399"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1397-1415 | archive/ktransformers/models/modeling_deepseek.py:1396-1414 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1397}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0770469318435b04c9522729eada49ddb126ebca58c93e8715e114d6520daf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:966-984 | archive/ktransformers/models/modeling_llama.py:965-983 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"180f44fe81c8dc5767fb0c0624f2cddde978d8440190ba0444ff8e85b27371b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:240-258 | archive/ktransformers/operators/RoPE.py:241-259 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf64114274a9c322e2fb4e587e49079d428972f2f03d9cea2622954e128ae8dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:59-77 | archive/ktransformers/operators/linear.py:68-86 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c7bd9e5f27be6506e7aade9ce3752f15acd62c43ae971375a22607264ab309"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:367-392 | archive/ktransformers/server/backend/interfaces/transformers.py:380-405 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eeb4e43d9209e0e0a6cfe2bf63d2acb2647439c63ae4e1cf7a92fa9a4939f13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:150-168 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:150-168 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bce1788a8abbc7aec2a48fafa55a0e9b644a3f7c0190fc34bcf0b280e920602"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:398-415 | archive/kt-sft/ktransformers/util/utils.py:586-604 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"428166aaa29d43610ae0bccb8ffb4b3c0561a28e986f10608aee44daef3428d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:193-211 | archive/merge_tensors/merge_safetensor_gguf.py:193-211 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4b8d04b2369602a5b42f8e6554c0b190d08c15fed38df9c1b01fe89f329b04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:159-177 | kt-kernel/scripts/convert_cpu_weights_ds4.py:187-205 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"22bc449695b5ac4c4de4bf6c1e0eb32e5c351f4e5c2ceef6e07d34b09314b957"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:611-629 | kt-kernel/scripts/convert_cpu_weights_ds4.py:678-696 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8cdc8dde03e6f987b58653a916e9389b62e8bb2d4e23bc8197018522ae1bcfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 13): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1627-1642 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1587-1602 | archive/kt-sft/ktransformers/models/modeling_llama.py:1217-1234 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1320-1335 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1311-1326 | archive/kt-sft/ktransformers/operators/models.py:1369-1386 | archive/ktransformers/models/modeling_deepseek.py:1626-1641 | archive/ktransformers/models/modeling_deepseek_v3.py:1593-1608 | archive/ktransformers/models/modeling_llama.py:1216-1233 | archive/ktransformers/models/modeling_mixtral.py:1319-1334 | archive/ktransformers/models/modeling_qwen2_moe.py:1310-1325 | archive/ktransformers/operators/models.py:1378-1395 | kt-kernel/examples/modeling_deepseek_v3.py:1584-1599 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0262e62703ed7b5976ec60ea126558dc452200e95fb10fa2d05b4a85672cfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 10): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1499-1516 | archive/kt-sft/ktransformers/models/modeling_llama.py:1071-1088 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1189-1206 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1180-1197 | archive/kt-sft/ktransformers/operators/models.py:1223-1240 | archive/ktransformers/models/modeling_deepseek.py:1498-1515 | archive/ktransformers/models/modeling_llama.py:1070-1087 | archive/ktransformers/models/modeling_mixtral.py:1188-1205 | archive/ktransformers/models/modeling_qwen2_moe.py:1179-1196 | archive/ktransformers/operators/models.py:1232-1249 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 428 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1499\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"d845158de403c6da818248fc24be92b81172a72bbc081c16c5f767ef8b2336e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 9): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1524-1541 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1484-1501 | archive/kt-sft/ktransformers/models/modeling_llama.py:1098-1115 | archive/kt-sft/ktransformers/operators/models.py:1250-1267 | archive/ktransformers/models/modeling_deepseek.py:1523-1540 | archive/ktransformers/models/modeling_deepseek_v3.py:1490-1507 | archive/ktransformers/models/modeling_llama.py:1097-1114 | archive/ktransformers/operators/models.py:1259-1276 | kt-kernel/examples/modeling_deepseek_v3.py:1481-1498 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1524\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e18bae3a6f3e4b8b0dbd0bc0ea533a6cc715a8222b243c0c7f979cad1766547"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 6): archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py:165-182 | archive/kt-sft/ktransformers/models/configuration_deepseek.py:164-181 | archive/kt-sft/ktransformers/models/configuration_deepseek_v3.py:155-172 | archive/ktransformers/models/configuration_deepseek.py:164-181 | archive/ktransformers/models/configuration_deepseek_v3.py:155-172 | kt-kernel/examples/configuration_deepseek_v3.py:155-172 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/configuration_deepseek.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"6caafcb3a17f75ff7898a69e3205e182eea725ef310f4417d0091410babd1fad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1758-1775 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1716-1733 | archive/kt-sft/ktransformers/models/modeling_llama.py:1358-1375 | archive/ktransformers/models/modeling_deepseek.py:1754-1771 | archive/ktransformers/models/modeling_llama.py:1357-1374 | kt-kernel/examples/modeling_deepseek_v3.py:1712-1729 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1758}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c7e2f619c59d2bc180cdb9e7012db1d596f6ded60ceea8f1af98f00848e364"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:452-469 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:377-392 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:368-383 | archive/ktransformers/models/modeling_llama.py:451-468 | archive/ktransformers/models/modeling_mixtral.py:376-391 | archive/ktransformers/models/modeling_qwen2_moe.py:367-382 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:377\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd463f73f8a4c184174dc3b34d0034fad7079d81477229b0d329d07fedabfd15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201318 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:400-417 | archive/kt-sft/ktransformers/operators/attention.py:812-822 | archive/ktransformers/models/modeling_llama.py:399-416 | archive/ktransformers/operators/attention.py:811-821 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:400\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"0085ac514fa489d6dd23055275caf76ad78bb8ad4e23a95e734916e0610001ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:1035-1052 | archive/kt-sft/ktransformers/operators/models.py:1087-1104 | archive/ktransformers/models/modeling_llama.py:1034-1051 | archive/ktransformers/operators/models.py:1096-1113 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1035\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, \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1033\u0060 calls \u0060embed_tokens\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:1085\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1970d205f5639a1083d2ad75bebfe1a015f16f07b2dae0d3c999b25747ecab8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 4): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:174-201 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:263-290 | archive/ktransformers/operators/balance_serve_attention.py:177-204 | archive/ktransformers/operators/balance_serve_attention.py:266-293 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce2090ffb524b05b144f748089fcc262a8ee4b6ecab57e2ae9ecb3f5b7b172c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1414-1431 | archive/kt-sft/ktransformers/operators/experts.py:1712-1727 | archive/ktransformers/operators/experts.py:802-819 | archive/ktransformers/operators/experts.py:1102-1117 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:1414\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1414}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0138655ebb40a8ebb294570213a3c5af2c107848f9725223878e10c0952383"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): archive/kt-sft/ktransformers/operators/linear.py:443-460 | archive/kt-sft/ktransformers/operators/linear.py:599-616 | archive/ktransformers/operators/linear.py:458-475 | archive/ktransformers/operators/linear.py:614-631 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44c4dec085aa00844026a1cdb56eee4fd5ec6462fc9d870189e8a2a74fb0b58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 4): kt-kernel/scripts/convert_cpu_weights.py:741-758 | kt-kernel/scripts/convert_cpu_weights.py:770-784 | kt-kernel/scripts/convert_cpu_weights_ds4.py:808-825 | kt-kernel/scripts/convert_cpu_weights_ds4.py:837-851 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"635a0081c2f91ded38ea9a42c457191ea8038930164a345d7a8eea8bb7fbc169"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): kt-kernel/scripts/convert_cpu_weights.py:909-927 | kt-kernel/scripts/convert_cpu_weights_ds4.py:978-996 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1042-1060 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"b96970fc8a05689d411142e28d42f58f510807997c6f3a08d7e7c8dbd16d0674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:86-107 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:86-107 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"474c1edd2b244e9bc2a5088ceb9fb5fdfaf062d111aeee7a49699a70bf96406e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/local_chat.py:338-355 | archive/ktransformers/local_chat.py:182-199 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/local_chat.py\u0060 and \u0060archive/ktransformers/local_chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"d51305d31a4b30c188ab09e9923ded5660f6cdd2afdb35a60b2142a89518e1be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:77-106 | archive/ktransformers/operators/flashinfer_wrapper.py:85-114 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a492e784c2a30af6f212a09f93a0cfb93351d3879cdfbaf3679e768441171bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:96-125 | archive/ktransformers/operators/linear.py:112-141 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/operators/linear.py:110\u0060 calls \u0060Parameter\u0060 and \u0060archive/kt-sft/ktransformers/operators/linear.py:95\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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9365598cb8c0feed91767aca2589858154733d5cb47672889457410abb66e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:561-578 | archive/ktransformers/operators/linear.py:576-593 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/linear.py:561\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"2180d52f0beac70ba73f19c4afdb0ac1e678f50179974499def5bb233430a4ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py:82-99 | archive/ktransformers/server/api/openai/assistants/runs.py:82-99 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4340e061744c025da0c75a2557f3aa1f76cd474483f5b28e5b8b4174a14a7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:361-378 | archive/ktransformers/server/backend/interfaces/balance_serve.py:531-548 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6dd68191bb91cef0b7f9ab645232cfac5e15f3880c34c15ca1452716dfdb279"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:435-452 | archive/ktransformers/server/backend/interfaces/balance_serve.py:621-638 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:435\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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f2181e5123085b9edd9a8327885848e62041a6de0c18ebabe96fa6294078ae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:134-151 | archive/ktransformers/server/backend/interfaces/ktransformers.py:207-223 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:152\u0060 calls \u0060flatten\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py:226\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":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49e55f7aa44de1341a98191d7f14c5f929fd186694d4b0c70e1d44567804af7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:101-118 | archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:101-118 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9209b89039acf4a9cc81bbc20c63cb4de6abc3421e1e1598965df7372f394517"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:29-46 | archive/ktransformers/server/schemas/assistants/assistants.py:29-46 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aac731dd0a93bdf060bc69dda1f51b151b9dcfab7276c86310f6d12c9cc9654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_mlp.py:32-48 | archive/ktransformers/operators/ascend/ascend_mlp.py:98-115 \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":"archive/ktransformers/operators/ascend/ascend_mlp.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b240384f27d4fbb6bb0744992ab1e1f861a264aa65cc454bf1a02c109245d3c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201318 lines \u00D7 2): archive/ktransformers/server/backend/interfaces/balance_serve.py:588-598 | archive/ktransformers/server/backend/interfaces/transformers.py:193-210 \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":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"426f876cb7eaa3a08075ee584af27e1b789b8d3eedd4cccfd6b530de643def3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:2481-2498 | kt-kernel/python/cli/utils/model_verifier.py:835-851 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2481}}}],"partialFingerprints":{"codehealthFindingId/v1":"670fcca417207c61b990f7db560bb251cf92bc11952a7ea24047ef00d2afbfe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): kt-kernel/python/cli/utils/model_scanner.py:437-454 | kt-kernel/python/cli/utils/model_scanner.py:459-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/python/cli/utils/model_scanner.py:477\u0060 calls \u0060exists\u0060, \u0060join\u0060 and \u0060kt-kernel/python/cli/utils/model_scanner.py:455\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":"kt-kernel/python/cli/utils/model_scanner.py"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a75b78d61b6ecda49cf579b645d6bdc6bb32f4cb56c73dbacc3e0b58d2e4396"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_mixtral.py:864-880 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:834-850 | archive/kt-sft/ktransformers/operators/experts.py:1461-1477 | archive/kt-sft/ktransformers/operators/experts.py:1757-1773 | archive/ktransformers/models/modeling_mixtral.py:863-879 | archive/ktransformers/models/modeling_qwen2_moe.py:833-849 | archive/ktransformers/operators/experts.py:849-865 | archive/ktransformers/operators/experts.py:1147-1163 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3c8c3ea0a6a2ef4a6fb60ee61a9865735defc975b38597d22287e540dc7491"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:173-193 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:173-193 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9adb8d66683d92c0a95c7747caf5157ef637f889813c1b9d8c597291832e48a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): archive/kt-sft/ktransformers/local_chat.py:222-236 | archive/ktransformers/local_chat.py:143-159 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/local_chat.py\u0060 and \u0060archive/ktransformers/local_chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9e0ee4119e36dc9535b23039cac83220ccd1b2a631102fe47f07d5ae6e47de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:163-179 | archive/ktransformers/operators/RoPE.py:164-180 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b059a897c0220f01d5a8a90a2d93503e123da2c5a56d796a2a389b6a3da3b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:226-242 | archive/ktransformers/operators/experts.py:232-248 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:226\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ffa4f1a1cbd02b3d77d0c972232574280e264ef34b4f83dcecaf1b581134018"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:929-945 | archive/ktransformers/operators/experts.py:507-523 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":929}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6fb9010c39fb4d6f63a748394a9ed2fff4265f4fcb2a371782569553caa45d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:81-97 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:88-104 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e3cd64b5c1f60872c22c4a79c06cc74f16bf51aea0c1c4d42756860f22a654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:271-287 | archive/ktransformers/server/backend/interfaces/transformers.py:283-299 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"05307eafe7b244fbf72aa22bf1de8ab6e5051e7ff595875593b5fe0ed91fa0cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:71-87 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:71-87 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57fa7a5157b72428a922f3c771e2827f6e250ed9694bc1471cd983d0b65ebc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/log.py:60-76 | archive/ktransformers/server/config/log.py:60-76 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/log.py\u0060 and \u0060archive/ktransformers/server/config/log.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e77957e27062cdc9ca67f0b71580e5971ee4e3491a4b3cf1756c84c306194ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:30-46 | archive/ktransformers/server/main.py:38-54 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d583c2610e7a3ac34b5106551d3986c4d5509115793079191709271b92c99d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:71-87 | archive/ktransformers/server/utils/sql_utils.py:71-87 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c54452056068f2ddde74536458f1ff1c9adfe4075e21ad122b8e24392957ef0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:171-216 | archive/ktransformers/util/custom_gguf.py:178-223 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"085524e10db35e8427c54509de5fd641c90165f0bccfcafa3e05534cb8292ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): kt-kernel/python/cli/utils/model_verifier.py:144-160 | kt-kernel/python/cli/utils/model_verifier.py:548-563 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb05963128a283c41cba1458319106a9abb75115150c0ddd70f10ad9f2f3033f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_llama.py:1010-1024 | archive/kt-sft/ktransformers/operators/models.py:258-273 | archive/kt-sft/ktransformers/operators/models.py:1065-1079 | archive/kt-sft/ktransformers/operators/models.py:1544-1559 | archive/ktransformers/models/modeling_llama.py:1009-1023 | archive/ktransformers/operators/models.py:255-270 | archive/ktransformers/operators/models.py:1074-1088 \u2014 there are 7 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1010\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbb843176bd5014ca0366280b466927c4b1152c526cc8a496efea0109c670cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:659-674 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:732-744 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:733-745 | archive/ktransformers/models/modeling_llama.py:658-673 | archive/ktransformers/models/modeling_mixtral.py:731-743 | archive/ktransformers/models/modeling_qwen2_moe.py:732-744 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:659\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7af201e147f35aa2242f4ffd3653b40d7180edf78a352273009a81b6295da7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): archive/kt-sft/ktransformers/models/custom_cache.py:261-276 | archive/kt-sft/ktransformers/models/custom_cache.py:312-327 | archive/ktransformers/models/custom_cache.py:451-466 | archive/ktransformers/models/custom_cache.py:502-517 | kt-kernel/examples/torch_attention.py:70-85 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"382625f2bc0468c39997508c0c5c7e70b66f323ab4a8bbe639cc4b365df74b94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1023-1037 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:999-1014 | archive/ktransformers/models/modeling_deepseek.py:1022-1036 | archive/ktransformers/models/modeling_deepseek_v3.py:1003-1018 | kt-kernel/examples/modeling_deepseek_v3.py:996-1011 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:1023\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4437ed65e71f232a80c2885e38798f497c2106c2fe6c9cdcae25d765023e782"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:52-67 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:52-67 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:50-65 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:50-65 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_utils.py:52\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de9c4e7e80079b001a2a0b1d02e8d380b5acba4d63f89591e89da8f3680a08d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:87-102 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:87-102 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:123-138 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:123-138 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0609218a30024ab36f6778bc1f672717aacf8d64a06c11963af07f855a393a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/csrc/custom_marlin/utils/quant_utils.py:159-174 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:159-174 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:123-138 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:123-138 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/quant_utils.py:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01864ab7021a39737ea1105b9dd95b0e3a7921e934cec45206406760ecf0929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py:145-160 | archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py:192-207 | archive/ktransformers/models/configuration_qwen2_moe.py:145-160 | archive/ktransformers/models/configuration_qwen3_moe.py:192-207 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/configuration_qwen2_moe.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_qwen2_moe.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7d170b45ec2bb95415215c783b17e05a6ee5a23bc0c65e542b80aeba2e6a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:120-135 | archive/ktransformers/models/modeling_deepseek_v3.py:124-139 | kt-kernel/examples/modeling_deepseek_v3.py:117-132 | kt-kernel/examples/torch_attention.py:174-189 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a8490189634af8b30986b7f4dac2c34e0737d8ca12a6cce3a0be723c5d9419b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:316-331 | archive/ktransformers/models/modeling_deepseek_v3.py:320-335 | kt-kernel/examples/modeling_deepseek_v3.py:313-328 | kt-kernel/examples/torch_attention.py:302-317 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/examples/torch_attention.py:299\u0060 calls \u0060isinstance\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:314\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"621539a8bb2487d870f190e0fc50557168e86576a689cc7c894c0d9bb23c3130"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u201316 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:379-394 | archive/kt-sft/ktransformers/operators/attention.py:798-808 | archive/kt-sft/ktransformers/operators/attention.py:809-809 | archive/ktransformers/models/modeling_llama.py:378-393 | archive/ktransformers/operators/attention.py:797-807 | archive/ktransformers/operators/attention.py:808-808 \u2014 there are 6 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. 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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"df87622f85b9e0b017156a1d840a21953ca6635baf53c279e805e41311cbf23b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 4): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:172-187 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:245-259 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:741-756 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:822-836 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bdeb84babf858cb748e4a11a3016bfc37e5fe88d2ffc297560822aa8fcb26e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): archive/kt-sft/ktransformers/util/weight_loader.py:103-118 | archive/kt-sft/ktransformers/util/weight_loader.py:123-138 | archive/ktransformers/util/weight_loader.py:103-118 | archive/ktransformers/util/weight_loader.py:123-138 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e29c2296b206016ee5527bb6d682159b940402c16fdb7e438c4f971889b534e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:2072-2087 | archive/ktransformers/operators/experts.py:1614-1629 | archive/ktransformers/operators/experts.py:1977-1992 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2072}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d543a3f198606a944789bc6b86c4fc74f5665871136a6c24f485e94fe67be99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): kt-kernel/python/experts_base.py:558-573 | kt-kernel/python/experts_base.py:615-629 | kt-kernel/python/experts_base.py:693-707 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/python/experts_base.py:631\u0060 calls \u0060_should_bypass_stream_callback\u0060 and \u0060kt-kernel/python/experts_base.py:709\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"88d8586b0ff6f711ed56016a34d068927dcad1b9a8f6ee99307388796c6d77d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/csrc/custom_marlin/utils/quant_utils.py:119-134 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:119-134 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"47abd2e91d3c2809d8e00d8ec63ccc2fc5065562b20eb4847d04b4f8d4a84dcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:85-100 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:85-100 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"af35da8aff82f48b0403729670046bcb2a17558dc32dc887fd43617f47a799f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/operators/gate.py:150-165 | archive/ktransformers/operators/gate.py:160-175 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c7518ca2f160340fa2abe48c4de60b87a217c24753afebf0f69820602a1b92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:773-791 | archive/ktransformers/operators/linear.py:788-806 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"7acdeed4833d591b8c0f40b2760ca67859fd0885fd731b63bba4654f9db21082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py:21-36 | archive/ktransformers/server/api/openai/assistants/runs.py:21-36 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/runs.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de0c03256678c47054375d2a7cd33f83bf8bed9bd2628d60e87054c708e21c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/args.py:142-157 | archive/ktransformers/server/args.py:161-176 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/args.py\u0060 and \u0060archive/ktransformers/server/args.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a44524862a6c96297a78cf28505feb3429f42ba4ae847de46a0d78b9ebfee73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:181-196 | archive/ktransformers/server/backend/interfaces/balance_serve.py:265-280 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e2b1b1c1ea813bb6d0c011d675a60310f535f0d8868eb9eee832bcf0a57872b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:391-406 | archive/ktransformers/server/backend/interfaces/balance_serve.py:561-576 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"63074ba714440b1fbbc2208668b5441e798f2351e96b4211f7aafcaf84be8981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:32-47 | archive/ktransformers/server/backend/interfaces/ktransformers.py:64-79 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb6f771616e4e0c56991f6a07dde42215dcc5491afcdd5ce903b1d11ff7fa53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:147-162 | archive/ktransformers/server/backend/interfaces/transformers.py:157-172 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7cc3bec1c3da0d33a6be4b56a7286176964a5d55f6950dcfda85a767df658e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:227-242 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:227-242 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"878b2e0d2eab35bdaaf14da1c833eac42ad2b1ad8b2186b792de7efbfa760c35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:285-300 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:285-300 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"906d91f59b06183a5e6af45003c06c0364ad5fb52d0960a459c133ab81dfd9e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py:144-159 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py:144-159 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60f9d92b7cd90720969751c1aeefb6441668afb9b5e333afa7e4509068721da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py:162-177 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py:162-177 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f20e437c215e6902aa438e60b44a565daec65643ec089465e95c7a28e78213"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:147-162 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:147-162 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf2a767d56a280e4dca9a85a639579696646075893f52cf78912c36a3b8eff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:34-49 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:34-49 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"41abd9cb194d0a0f7fc2217ec90925b109646f85c100c8e0008bd8e686a60d5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:103-115 | archive/ktransformers/server/balance_serve/sched_rpc.py:130-145 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd90d1650b2e94e9a0f356317d6bb9a53c9234abd8524322d91afa1b80af61f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201316 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_gguf.py:364-379 | archive/kt-sft/ktransformers/util/custom_gguf.py:388-390 | archive/ktransformers/util/custom_gguf.py:371-386 | archive/ktransformers/util/custom_gguf.py:395-397 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d140fbd966cbee81e276376500f1f0c2578736231707a3b3e6e5566ee94127"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:577-592 | archive/ktransformers/util/modeling_rope_utils.py:577-592 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"b21aa92ce606304442ddf4f5c6fb5c362b090f2d4ce6bd685d3438d7d4af522a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py:94-109 | archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py:142-156 \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 \u0060archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py:94\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"6767775a881b84fd1cda04f7a2b430424407cd35682bf83eb2806c81f2d8492a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:353-367 | archive/ktransformers/operators/ascend/ascend_attention.py:392-407 \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 \u0060archive/ktransformers/operators/ascend/ascend_attention.py:353\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"523b21e2004809e5243fc3bab9888f893cc0398cdc561da29fbf4b3e95dd73c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/ktransformers/server/backend/interfaces/ktransformers.py:325-340 | archive/ktransformers/util/utils.py:665-680 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py:325\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":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae83f933cbc69aad9ead36bb48218de2fa19bb1db7adf6a1f1a06cccd7597b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): kt-kernel/python/sft/autograd.py:164-179 | kt-kernel/python/sft/layer.py:543-556 \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":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c249bc6e7d36301ba3d341f737bb3482e75bce659c8cc0b19545ea1af31616"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:353-368 | kt-kernel/scripts/convert_cpu_weights_ds4.py:416-431 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"35921674303737fa79d6842c9beb6b2d7bf0d394a0c95f1e94cee726d037609a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 14): archive/kt-sft/ktransformers/operators/experts.py:1508-1521 | archive/kt-sft/ktransformers/operators/experts.py:1608-1621 | archive/kt-sft/ktransformers/operators/experts.py:1806-1819 | archive/kt-sft/ktransformers/operators/experts.py:1993-2006 | archive/kt-sft/ktransformers/operators/experts.py:2115-2128 | archive/kt-sft/ktransformers/operators/experts.py:2236-2250 | archive/ktransformers/operators/experts.py:896-909 | archive/ktransformers/operators/experts.py:996-1009 | archive/ktransformers/operators/experts.py:1196-1209 | archive/ktransformers/operators/experts.py:1535-1548 | archive/ktransformers/operators/experts.py:1657-1670 | archive/ktransformers/operators/experts.py:1791-1804 | archive/ktransformers/operators/experts.py:1897-1910 | archive/ktransformers/operators/experts.py:2023-2036 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:1508\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 before the matched lines, \u0060archive/ktransformers/operators/experts.py:1889\u0060 calls \u0060shared_experts\u0060, \u0060squeeze\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:2105\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1508}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae26ca2b855a530f2e04f17439ab6a2955d0df2acf1d6b32962c048985a08cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1437-1451 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1403-1417 | archive/kt-sft/ktransformers/models/modeling_llama.py:1006-1019 | archive/kt-sft/ktransformers/operators/models.py:610-624 | archive/kt-sft/ktransformers/operators/models.py:1061-1074 | archive/ktransformers/models/modeling_deepseek.py:1436-1450 | archive/ktransformers/models/modeling_deepseek_v3.py:1409-1423 | archive/ktransformers/models/modeling_llama.py:1005-1018 | archive/ktransformers/operators/models.py:607-621 | archive/ktransformers/operators/models.py:1070-1083 | kt-kernel/examples/modeling_deepseek_v3.py:1400-1414 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d4d995c9e7460518677d60d135afc033528414b57240f4dff319d4f44fde458"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 7): kt-kernel/python/cli/commands/run.py:153-167 | kt-kernel/python/experts.py:222-236 | kt-kernel/python/experts.py:252-266 | kt-kernel/python/experts.py:452-466 | kt-kernel/python/sft/amx.py:133-147 | kt-kernel/python/utils/amx.py:707-721 | kt-kernel/python/utils/llamafile.py:136-150 \u2014 there are 7 copies across 5 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/python/cli/commands/run.py:153\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":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e79fdcc163de2fc8aae1d41e5c27ec65b455fddd14858a7c9f49069c8bb9d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 6): archive/csrc/custom_marlin/utils/marlin_utils.py:96-109 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:96-109 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:93-107 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:132-145 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:93-107 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:132-145 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_utils.py:96\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":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9dc4fb7f5fd280dde839735805c7d663de26ce960eb9326692113e53147f36a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:436-450 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:446-460 | archive/ktransformers/models/modeling_deepseek.py:435-449 | archive/ktransformers/models/modeling_deepseek_v3.py:450-464 | kt-kernel/examples/modeling_deepseek_v3.py:443-457 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:436\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"499bce88f1b4014e2fd5bbe8566310a1211dff632b35abadaf0a7d64fd59c3a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:533-547 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:498-512 | archive/ktransformers/models/modeling_deepseek.py:532-546 | archive/ktransformers/models/modeling_deepseek_v3.py:502-516 | kt-kernel/examples/modeling_deepseek_v3.py:495-509 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:533\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b5d5a06deeb08f60fb0f37bcb45a9c49e98adf38112355f0e2aacddcfb17061"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201315 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:480-494 | archive/kt-sft/ktransformers/operators/attention.py:867-874 | archive/ktransformers/models/modeling_llama.py:479-493 | archive/ktransformers/operators/attention.py:866-873 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:480\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"77f1c58eb0ad1fa0a07efa53fa521fbc67ddbd84dbd763b4498f660a9a33229e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:805-819 | archive/ktransformers/models/modeling_deepseek_v3.py:1215-1229 | archive/ktransformers/models/modeling_llama.py:804-818 | archive/ktransformers/models/modeling_smallthinker.py:366-381 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 389 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:805\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5ec008bd102d3299375d55b34952ebf920c54588dbab1f089ea0dba4554989"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:355-369 | archive/kt-sft/ktransformers/operators/experts.py:801-815 | archive/kt-sft/ktransformers/operators/gate.py:44-59 | archive/ktransformers/operators/experts.py:369-383 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"13137fcbe46a238c1bd6a04dc8751080b41ed685b1196af7c9dc899e31032ee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:253-269 | archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py:424-438 | archive/ktransformers/server/api/openai/endpoints/chat.py:253-269 | archive/ktransformers/server/api/openai/endpoints/chat.py:424-438 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py\u0060 and \u0060archive/ktransformers/server/api/openai/endpoints/chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 486 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"5633d7bcb8c2506f098cb7a4c35b1e53b28b3b0b3197ebd86bd22e5040c85c85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 4): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:153-166 | archive/merge_tensors/merge_safetensor_gguf.py:153-166 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:158-172 | kt-kernel/scripts/check.py:209-222 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:151\u0060 calls \u0060keys\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:157\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":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e98cca6941c4e0ff271ae9e325f6edaf88be44c35cd8355e0dcf2e90e835ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:84-98 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:84-98 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"cabee7831ed9cf92f1b6ed39f657bb4a23da04fcd32baa431b6f04bf5d26c103"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:35-53 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:35-53 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:35\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":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"be1c66ef7d1798c8cddba710d41645cfcc3e938a7a0e3dcfd38c2d292ae14bd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/local_chat.py:132-146 | archive/ktransformers/local_chat.py:103-117 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/local_chat.py\u0060 and \u0060archive/ktransformers/local_chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8278da88e607ce10fa7a9a695f02ffda41bd2a89265e062a6385e756a3bc5a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:1060-1074 | archive/ktransformers/models/modeling_smallthinker.py:291-305 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:1060\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, \u0060archive/ktransformers/models/modeling_smallthinker.py:289\u0060 calls \u0060NotImplementedError\u0060 and \u0060archive/kt-sft/ktransformers/operators/attention.py:1059\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ccd7b97368527c1b4f1af3ad26ead4468bbdeb676e2506d2356230eedc0e7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:38-62 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:45-69 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:38\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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"2046a855f97e1df7badd48f11d53547579d9885215f6a2fe1f3dd84b01b807bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/operators/gate.py:133-147 | archive/ktransformers/operators/gate.py:143-157 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"80d89f7398b147f44a91ae549fe421b969180b8b20ea58c5c12a113918609d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:225-237 | archive/ktransformers/operators/linear.py:238-252 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"c523ec96aa85255e260ee400a5e0eec12b6b148a3a901a4bf9fdd64e8fa6cdcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:199-213 | archive/ktransformers/server/backend/interfaces/ktransformers.py:266-280 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:199\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":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff7a4b07104ad772de378205928badb43060d50372e47992d324d4861502b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:104-118 | archive/ktransformers/server/balance_serve/inference/query_manager.py:149-163 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b66310bcd30b33b8a1fbf5315e235088215756c775995bfc109d2e8c1108eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:143-157 | archive/ktransformers/server/balance_serve/sched_rpc.py:174-188 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"325a155c4a474880ae800e33cf9363f3284134ccb2f5bee739e6f5b3b13db47c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/settings.py:38-52 | archive/ktransformers/server/balance_serve/settings.py:41-55 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f03c00e887a5bcf84e400402f0cd1b253878ed70b159f784a200ec1eb5c7e6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/threads.py:72-86 | archive/ktransformers/server/crud/assistants/threads.py:72-86 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/threads.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2790dfe3001837a967cd89878e691e938246bacfe6bfa65fcef87808374764fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/sft/flops_utils/custom_profile.py:107-121 | archive/kt-sft/ktransformers/sft/flops_utils/custom_profile.py:192-206 \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":"archive/kt-sft/ktransformers/sft/flops_utils/custom_profile.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb40b93fa13123d3fd5345080b3c42266f6d180e998f0181cbcd2a9227f44f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:740-754 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:971-985 \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e6e40c176d783730b10c3be23bb0a9f1c6dc4820bf527c96051132a6db55d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:785-799 | archive/ktransformers/operators/ascend/ascend_attention.py:827-842 \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 \u0060archive/ktransformers/operators/ascend/ascend_attention.py:785\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":785}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf6e827a369deca432bbd26e05c738bf29962931c41412fd9d8940fc9a69a6f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): kt-kernel/python/cli/utils/input_validators.py:48-62 | kt-kernel/python/cli/utils/input_validators.py:106-120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/input_validators.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"d199dae408cdec33a2306eb9176b78459491560748e67b706f94d01db857d24a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): kt-kernel/python/utils/amx.py:588-602 | kt-kernel/python/utils/moe_kernel.py:307-321 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/python/utils/amx.py:588\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":"kt-kernel/python/utils/amx.py"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8bcfff959f86b91305648b14edd3d3ab794e33ea67efd9fc70e2e4957ad737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 9): archive/kt-sft/ktransformers/server/balance_serve/settings.py:34-47 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:87-100 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:141-154 | archive/ktransformers/server/balance_serve/settings.py:37-50 | archive/ktransformers/server/balance_serve/settings.py:89-102 | archive/ktransformers/server/balance_serve/settings.py:143-156 | archive/ktransformers/server/balance_serve/settings.py:195-208 | archive/ktransformers/server/balance_serve/settings.py:247-260 | archive/ktransformers/server/balance_serve/settings.py:299-312 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5859a4e9e84b66eb8d48608a566d3ba6ede761ffbe38dcebf7a3bd40f584cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 6): archive/kt-sft/ktransformers/operators/experts.py:1328-1341 | archive/kt-sft/ktransformers/operators/experts.py:1914-1927 | archive/ktransformers/operators/experts.py:717-730 | archive/ktransformers/operators/experts.py:1310-1323 | archive/ktransformers/operators/experts.py:1383-1396 | archive/ktransformers/operators/experts.py:1455-1468 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/operators/experts.py:1327\u0060 calls \u0060unload\u0060 and \u0060archive/ktransformers/operators/experts.py:1381\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b6e9f06c0c361db03d93cf900b120f196477f76fadc1b220cf4e33a445fccf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): kt-kernel/python/sft/amx.py:131-144 | kt-kernel/python/utils/amx.py:361-377 | kt-kernel/python/utils/amx.py:705-718 | kt-kernel/python/utils/llamafile.py:134-147 | kt-kernel/python/utils/moe_kernel.py:84-100 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/python/sft/amx.py:131\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/python/utils/amx.py:704\u0060 calls \u0060abspath\u0060, \u0060super\u0060, \u0060__init__\u0060 and \u0060kt-kernel/python/utils/amx.py:361\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":"kt-kernel/python/sft/amx.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7933c07a76e4a54368c85f42fe4c01e53d0319e89418301bf28bad1f32add9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:1397-1410 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1502-1514 | archive/ktransformers/models/modeling_llama.py:1396-1409 | archive/ktransformers/models/modeling_mixtral.py:1501-1513 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:1397\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1397}}}],"partialFingerprints":{"codehealthFindingId/v1":"3975e62f2bd82cc54af0f6ea043933bbd18f900637ae424050cd98a0c6adc09c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:622-635 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:625-638 | archive/ktransformers/models/modeling_mixtral.py:621-634 | archive/ktransformers/models/modeling_qwen2_moe.py:624-637 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py:622\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbf7499d8e85494d3957228e0fc3cc8abb399b65fd87a0c54a045969f25cebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): archive/kt-sft/ktransformers/operators/attention.py:102-115 | archive/ktransformers/operators/ascend/ascend_attention.py:171-184 | archive/ktransformers/operators/ascend/ascend_attention.py:614-627 | archive/ktransformers/operators/attention.py:101-114 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a783ef2e51012ba22b3504a67772066e0aba2f7a78273c92f529561738d1772"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201327 lines \u00D7 4): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:183-209 | archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:232-250 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:190-216 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:239-257 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:183\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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ae202c3564a9a1d034bd64aba8a851656cabd1c86ebf480bb1ed6aa6685bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): archive/kt-sft/ktransformers/operators/models.py:400-413 | archive/kt-sft/ktransformers/operators/models.py:1682-1695 | archive/ktransformers/operators/models.py:397-410 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c44ef7df5a5ae76ba7c2f6fef61945482f2b426fdeae540e402bb2d68728caa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): archive/kt-sft/ktransformers/operators/models.py:463-476 | archive/kt-sft/ktransformers/operators/models.py:1742-1755 | archive/ktransformers/operators/models.py:460-473 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060layer\u0060 to \u0060Qwen2MoeDecoderLayer\u0060 in one and \u0060Qwen3MoeDecoderLayer\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d6daad5db2105eae8a4d1580d745e8a0d430704cbd720c06949a3899d70d0fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:121-134 | archive/merge_tensors/merge_safetensor_gguf.py:121-134 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:121-134 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"319a563d99ac4d93326b007f8bc92ca1a652b0f169f60155460bb38a7e7628d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/csrc/custom_marlin/utils/quant_utils.py:182-195 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:182-195 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"874c6e0057e31bf3bbfc4fa5ae63194c3ffb78f09974085e49c5c0f39177e1a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:20-33 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:20-33 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa48bbd0a4577ef36c5fbab07b5f1e1f8f7d790aadf98a3e76a7daa552709a16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:42-55 | archive/ktransformers/models/custom_cache.py:54-67 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a60e52e972848fd96edf814d9743d49a88e265e09e18ad32bbd9740269677a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:252-265 | archive/ktransformers/models/modeling_llama.py:251-264 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d0f41a7d94a5784d2b0748916287d01b35aac793559da623530029a4a2ba11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1101-1114 | archive/ktransformers/models/modeling_mixtral.py:1100-1113 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa5dd60cf95d043c2bf2257bbc3a0d15484fef4def66f52081a903bd0160d90e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:868-881 | archive/ktransformers/models/modeling_qwen2_moe.py:867-880 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"666f0bb25205dd91901b40c040dc3e41b235d279844af1ab5cd2cf4b7be8436e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1093-1106 | archive/ktransformers/models/modeling_qwen2_moe.py:1092-1105 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1093}}}],"partialFingerprints":{"codehealthFindingId/v1":"14da9ddb37b58d92638cebdabff46421f8c7262825a5a3830fcc0513e900b6f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:125-138 | archive/ktransformers/operators/RoPE.py:126-139 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea855413bf28d856d277cc717bae3c011d8095ba18116b4e10530e672e374b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:339-352 | archive/ktransformers/operators/cpuinfer.py:339-352 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:339\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ec2ea8b50219677886e651a9c67088e38abc75a98e9d55dcfc3f31919492952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:365-378 | archive/ktransformers/operators/cpuinfer.py:365-378 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:365\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"94392800b43ceb13ae63212007467096ca7f176c3041e7ad40d6655f43d571b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:391-404 | archive/ktransformers/operators/cpuinfer.py:391-404 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:391\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"324812a69a9e3956894af5439eb8138c0289e13da7ad4e69333799c8ebcf1e26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:419-432 | archive/ktransformers/operators/cpuinfer.py:419-432 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:419\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"a00ec95985201aafc978521cd3eaac13260a29c621383a313466947f2339bc06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:534-547 | archive/ktransformers/operators/dynamic_attention.py:534-547 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c86f679520bba10bc1d9859236ebcf5ab6a8a5d6beb4dad581bd1fde2473674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:244-262 | archive/ktransformers/operators/experts.py:251-269 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:244\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"6995b20624cc7bed1a718800e02f4694f27362e1fabb4b5f79de79572d04dbb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:1556-1579 | archive/ktransformers/models/modeling_smallthinker.py:508-521 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e73c9e324d23b090ac7882dfe31ec4cb1f88ae0a2949ba1cc596ed76a14519"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:210-223 | archive/ktransformers/server/backend/interfaces/balance_serve.py:304-317 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py:318\u0060 calls \u0060clone\u0060, \u0060cat\u0060 and \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:224\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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"f59869c6e92f2b617a867ca5709383a42fafb236ed1718341e7e37ac8f5773a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:68-81 | archive/ktransformers/server/backend/interfaces/ktransformers.py:114-127 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"582e5d4c352ad76f9b7572252d612e818d4b962b33c30ae110bb91571988cbf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:212-225 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:784-797 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2913f99bb0d24a00903906b543d344f218843e7260f03917d758667fafb3b3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:43-54 | archive/ktransformers/server/balance_serve/inference/query_manager.py:63-76 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py:61\u0060 calls \u0060print_all\u0060 and \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:42\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6cb3d5f7902fa4e97db671ab4adcce487d197bc4752b78277a3e9a58d82174"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/settings.py:19-32 | archive/ktransformers/server/balance_serve/settings.py:22-35 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"6743a525306bad8a6f7a354889b6178ec6178f28d39be6dace87e849dadec156"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:52-65 | archive/ktransformers/server/schemas/assistants/assistants.py:52-65 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"170fd64d7b38f046a217fd2c50f444b91e5b916ffe68a5d93d7158253ae0b49c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:54-67 | archive/ktransformers/server/utils/sql_utils.py:54-67 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d4ca014279619289059846e6fccd2fc05075d27d6a7e4bffe0b514f710e95ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:98-111 | archive/ktransformers/util/utils.py:158-171 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b1581379de16d9c5bed5f7884468f9fdab47fc0cfa666d042261e497bb985f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): archive/ktransformers/models/custom_modeling_glm4_moe.py:73-86 | archive/ktransformers/models/custom_modeling_smallthinker.py:73-85 \u2014 before extracting anything, compare \u0060archive/ktransformers/models/custom_modeling_glm4_moe.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_smallthinker.py\u0060 as WHOLE FILES: 87% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_modeling_glm4_moe.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d3d4d9961c5ce2322687e36e0860397003b04277989c7fb3019432f15d42a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:1636-1649 | kt-kernel/python/cli/commands/model.py:1669-1682 \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 \u0060kt-kernel/python/cli/commands/model.py:1636\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":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1636}}}],"partialFingerprints":{"codehealthFindingId/v1":"f47a874dd6b7758a72cac3991834e3d14ac0e769a0199ff9fd5cd959c551f471"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:137-155 | kt-kernel/scripts/convert_cpu_weights_ds4.py:165-183 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"def11db5d7a4716be4a3173fc5e5d7473c6c6c23c0a63bfb384bd3dad44309b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:888-901 | kt-kernel/scripts/convert_cpu_weights_ds4.py:959-972 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/convert_cpu_weights.py:888\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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9a67df392dee477193ec4d2de5d1502e2fc5beab388e6a384b2a1da906571e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:947-960 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1087-1100 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e517f8b0ae44df283307cc75cec9e52066458c01d0ba9af281b48cd6047e07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201313 lines \u00D7 16): archive/kt-sft/ktransformers/models/modeling_llama.py:533-545 | archive/kt-sft/ktransformers/models/modeling_llama.py:667-676 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:341-347 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:424-430 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:740-746 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:332-338 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:425-431 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:741-747 | archive/ktransformers/models/modeling_llama.py:532-544 | archive/ktransformers/models/modeling_llama.py:666-675 | archive/ktransformers/models/modeling_mixtral.py:340-346 | archive/ktransformers/models/modeling_mixtral.py:423-429 | archive/ktransformers/models/modeling_mixtral.py:739-745 | archive/ktransformers/models/modeling_qwen2_moe.py:331-337 | archive/ktransformers/models/modeling_qwen2_moe.py:424-430 | archive/ktransformers/models/modeling_qwen2_moe.py:740-746 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:533\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f991a31311aa4aa70fa05c8de646a8364fdbb9d949dfc22e6c48e526806afe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 10): archive/kt-sft/ktransformers/operators/cpuinfer.py:210-222 | archive/kt-sft/ktransformers/operators/cpuinfer.py:335-346 | archive/kt-sft/ktransformers/operators/cpuinfer.py:361-372 | archive/kt-sft/ktransformers/operators/cpuinfer.py:387-398 | archive/kt-sft/ktransformers/operators/cpuinfer.py:415-426 | archive/ktransformers/operators/cpuinfer.py:210-222 | archive/ktransformers/operators/cpuinfer.py:335-346 | archive/ktransformers/operators/cpuinfer.py:361-372 | archive/ktransformers/operators/cpuinfer.py:387-398 | archive/ktransformers/operators/cpuinfer.py:415-426 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:210\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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ee72897abf80ca567d9c2064078b659e8515d58e87e592b77841d56ce55575"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:676-688 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:635-647 | archive/kt-sft/ktransformers/models/modeling_llama.py:319-331 | archive/ktransformers/models/modeling_deepseek.py:675-687 | archive/ktransformers/models/modeling_deepseek_v3.py:639-651 | archive/ktransformers/models/modeling_llama.py:318-330 | kt-kernel/examples/modeling_deepseek_v3.py:632-644 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"660df1901d511c7ddb8df8941335bace7127b4c0a1b3ee9d1f61c9ac2f215fa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py:186-198 | archive/kt-sft/ktransformers/models/configuration_deepseek.py:185-197 | archive/kt-sft/ktransformers/models/configuration_llama.py:176-188 | archive/ktransformers/models/configuration_deepseek.py:185-197 | archive/ktransformers/models/configuration_llama.py:176-188 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/configuration_deepseek.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/configs/model_config/configuration_deepseek.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dac3baf6f2f14e15c9ea09af5ef49a3fd8e8be064d2e4cc3e48474297abb18b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): archive/kt-sft/ktransformers/operators/models.py:234-246 | archive/kt-sft/ktransformers/operators/models.py:594-606 | archive/kt-sft/ktransformers/operators/models.py:1520-1532 | archive/ktransformers/operators/models.py:231-243 | archive/ktransformers/operators/models.py:591-603 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/models.py:607\u0060 calls \u0060empty_cache\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:247\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49cff22b85ff557978a6334b8e498566dddcb4e33b7173ffc4a7ca062d37678"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): archive/csrc/custom_marlin/utils/quant_utils.py:138-150 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:138-150 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:102-114 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:102-114 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"9924a95ec0139719a89a9fd7cca3402df2893d0c4ac24a7dbf58794f122ef654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_llama.py:466-478 | archive/kt-sft/ktransformers/operators/attention.py:855-865 | archive/ktransformers/models/modeling_llama.py:465-477 | archive/ktransformers/operators/attention.py:854-864 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:855\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9bd5983d603e4eeca5656301a64dce5895f5506f945f92abdd2b11042cee01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): archive/kt-sft/ktransformers/operators/layernorm.py:145-157 | archive/ktransformers/operators/layernorm.py:148-160 | archive/ktransformers/operators/layernorm.py:225-237 | archive/ktransformers/operators/layernorm.py:268-280 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/layernorm.py\u0060 and \u0060archive/ktransformers/operators/layernorm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc836356cc1c9e301fd0827f23b9508cf31da934472f92547b98f62abaf4ef6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 4): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:130-141 | archive/merge_tensors/merge_safetensor_gguf.py:130-141 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:129-141 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:166-178 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4514cd091e7ae776eef3f62b0b8ee421108f51324278055a08689f3e2699c235"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): archive/kt-sft/setup.py:336-348 | archive/kt-sft/setup.py:369-381 | archive/setup.py:317-329 | archive/setup.py:350-362 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"8792e40597c40938721267edab175e7a7ebcea2cbea6b3fe69d00a69eaf34722"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): archive/ktransformers/operators/ascend/ascend_mlp.py:29-40 | archive/ktransformers/operators/ascend/ascend_mlp.py:66-77 | archive/ktransformers/operators/ascend/ascend_mlp.py:95-107 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/operators/ascend/ascend_mlp.py:78\u0060 calls \u0060npu_swiglu\u0060, \u0060npu_dynamic_quant\u0060, \u0060view\u0060 and \u0060archive/ktransformers/operators/ascend/ascend_mlp.py:41\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":"archive/ktransformers/operators/ascend/ascend_mlp.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68ae724abb010c992e34c042bd3ffbc4835deecc40bcc755c3f791cff36ea31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): archive/ktransformers/operators/ascend/ascend_mlp.py:50-61 | archive/ktransformers/operators/ascend/ascend_mlp.py:79-90 | archive/ktransformers/operators/ascend/ascend_mlp.py:119-131 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_mlp.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b359d4be31a113cce96177abde58aeceff3cbdc13643c6f2e0425a89ef5c6c57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:61-73 | archive/ktransformers/models/custom_cache.py:83-95 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc67917c93f9cfd82e376e129bf8f569efb563de3a535f00a3fbcf269e9cb8a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:835-847 | archive/ktransformers/models/modeling_mixtral.py:834-846 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fda057646752091ceaf7c093bee025087c671d73d418490b977ea08a6dd91f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:806-818 | archive/ktransformers/models/modeling_qwen2_moe.py:805-817 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"261cf6cf8873fb958161a62061e3333f4c7cf93944d76def93bc348ca59ab324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:103-115 | archive/ktransformers/operators/balance_serve_attention.py:106-118 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2ed4468519e6bd23050e86e0d02506a4af5bf2f9eeafe20294238cda48f981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:566-578 | archive/kt-sft/ktransformers/operators/experts.py:585-597 \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f89dfc1243cf4ae22a575ea477b5235417008317510039e033be3f5bb7a2f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/operators/gate.py:60-72 | archive/ktransformers/operators/gate.py:70-82 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8a65ddf3124c069990dccad7b3a69efe7e23241f46faa6ddcf65e51d25dff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:402-414 | archive/ktransformers/operators/linear.py:417-429 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd4de6bd5a5e619b7a758764c3208b96673dd71ef1a87dfe3b1b73b7bef0f01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py:91-103 | archive/ktransformers/server/api/openai/assistants/assistants.py:91-103 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/assistants.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa6e4b77f7dd1c1a5747d8004f4fd8b0b1479b80258a36868a41de4b889ac87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:290-302 | archive/ktransformers/server/backend/interfaces/transformers.py:302-314 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"3542f03ddd4c248b9fbddb46262835ae02ede220e8855a5b042c8ca03f0e8eac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:137-160 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:142-165 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07e94c50db399a511642097aa77741d04d5eec39f6059a246b4a1b67be3c93c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py:34-52 | archive/ktransformers/server/balance_serve/inference/sampling/sampler.py:39-57 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/sampler.py\u0060 as WHOLE FILES: 96% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91558d4847a0bca080a1087abbaf7c13434abaf7631d85050b2ebfd7eb07b5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/messages.py:191-203 | archive/ktransformers/server/schemas/assistants/messages.py:191-203 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/messages.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdec33e8776d676cdc70dd95ac0a47a34a9f119df21385ab05e6d8c4a6b18c15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:90-102 | archive/ktransformers/server/utils/sql_utils.py:90-102 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd7074c0e04b9c3fffcfa51029dc82870131fb02d4b7699f1727c22ab881daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:116-128 | archive/ktransformers/server/utils/sql_utils.py:116-128 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fddfa04186c4a55fa0c5d3b4f836f361abd3bfbcb6dff7101fc41885558b1e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201313 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_gguf.py:381-382 | archive/kt-sft/ktransformers/util/custom_gguf.py:391-403 | archive/ktransformers/util/custom_gguf.py:388-389 | archive/ktransformers/util/custom_gguf.py:398-410 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c019c0ba1ce2dfd4b784f5e84088449075efc35495705f980862e0f6bc3ae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:262-274 | archive/ktransformers/util/custom_loader.py:286-298 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9ad645b943a56a370aabecdf300be6c9b2ea4326834f47deedc8b048fe9e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/util/vendors.py:61-73 | archive/ktransformers/util/vendors.py:61-73 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/vendors.py\u0060 and \u0060archive/ktransformers/util/vendors.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6dffb20a7c54e9aecf8aea1bf49ae14d032314b5848935a8d676125497b2534"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:234-245 | archive/ktransformers/operators/ascend/ascend_attention.py:722-734 \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 \u0060archive/ktransformers/operators/ascend/ascend_attention.py:234\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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f683fac33f2a581a371c7a64f67abaaa1352b667b2fb8fe566a57cfc236335"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): kt-kernel/python/experts_base.py:660-672 | kt-kernel/python/experts_base.py:718-730 \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 \u0060kt-kernel/python/experts_base.py:660\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"1daef43b01b96e73eaaa2286e39565eb0b5476e5ecb780347e998324e30bd99a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): kt-kernel/python/experts_base.py:668-680 | kt-kernel/python/experts_base.py:814-826 \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 \u0060kt-kernel/python/experts_base.py:668\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"443bc19cb316fd3a7ea985805a1e633a2545095b480b051e4fd89b2e61760d04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): kt-kernel/python/sft/wrapper.py:239-251 | kt-kernel/python/sft/wrapper.py:272-283 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"f90ae2cee822ea6411073d59af1900ecbc5c7db6502c751a1c440adbf9bbf649"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): kt-kernel/python/utils/amx.py:445-457 | kt-kernel/python/utils/amx.py:581-593 \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":"kt-kernel/python/utils/amx.py"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fe58a5d6daaafb42ab889274e64808c4a4c1b75c728ad61ec1f656a81bc1262"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): kt-kernel/python/utils/amx.py:567-584 | kt-kernel/python/utils/moe_kernel.py:286-303 \u2014 before extracting anything, compare \u0060kt-kernel/python/utils/amx.py\u0060 and \u0060kt-kernel/python/utils/moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"157c9f05163628af94685d7ff1fae168b93b4f58b5a1d054ab9b316149e8aed5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): kt-kernel/python/utils/moe_kernel.py:168-180 | kt-kernel/python/utils/moe_kernel.py:300-312 \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":"kt-kernel/python/utils/moe_kernel.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"563abfb79afcb4033790540d3d8fa38a0f7a3a8e353264bb5a777e1dabae1ee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 16): archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:64-75 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:64-75 | archive/kt-sft/ktransformers/operators/experts.py:1568-1579 | archive/kt-sft/ktransformers/operators/experts.py:1668-1679 | archive/kt-sft/ktransformers/operators/experts.py:1867-1878 | archive/kt-sft/ktransformers/operators/experts.py:2053-2064 | archive/kt-sft/ktransformers/operators/experts.py:2175-2186 | archive/kt-sft/ktransformers/operators/experts.py:2296-2307 | archive/ktransformers/operators/experts.py:956-967 | archive/ktransformers/operators/experts.py:1058-1069 | archive/ktransformers/operators/experts.py:1257-1268 | archive/ktransformers/operators/experts.py:1595-1606 | archive/ktransformers/operators/experts.py:1717-1728 | archive/ktransformers/operators/experts.py:1851-1862 | archive/ktransformers/operators/experts.py:1957-1968 | archive/ktransformers/operators/experts.py:2083-2094 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:64\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":"archive/csrc/ktransformers_ext/bench/bench_moe_torch.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4fe1e2b3b3a4c75e91fe0d906de1beaac5fe4a8d9bbaab7f997f15572a6e55e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 14): archive/kt-sft/ktransformers/operators/experts.py:1536-1547 | archive/kt-sft/ktransformers/operators/experts.py:1636-1647 | archive/kt-sft/ktransformers/operators/experts.py:1835-1846 | archive/kt-sft/ktransformers/operators/experts.py:2021-2032 | archive/kt-sft/ktransformers/operators/experts.py:2143-2154 | archive/kt-sft/ktransformers/operators/experts.py:2264-2275 | archive/ktransformers/operators/experts.py:924-935 | archive/ktransformers/operators/experts.py:1026-1037 | archive/ktransformers/operators/experts.py:1225-1236 | archive/ktransformers/operators/experts.py:1563-1574 | archive/ktransformers/operators/experts.py:1685-1696 | archive/ktransformers/operators/experts.py:1819-1830 | archive/ktransformers/operators/experts.py:1925-1936 | archive/ktransformers/operators/experts.py:2051-2062 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"afa3cdb72d204aaa07f51f3ed9878f01aa8492f01ef60411a6e43c2651f9cfc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 12): archive/kt-sft/ktransformers/models/modeling_deepseek.py:815-824 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:933-945 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:774-783 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:907-919 | archive/kt-sft/ktransformers/operators/attention.py:93-104 | archive/ktransformers/models/modeling_deepseek.py:814-823 | archive/ktransformers/models/modeling_deepseek.py:932-944 | archive/ktransformers/models/modeling_deepseek_v3.py:778-787 | archive/ktransformers/models/modeling_deepseek_v3.py:911-923 | archive/ktransformers/operators/attention.py:92-103 | kt-kernel/examples/modeling_deepseek_v3.py:771-780 | kt-kernel/examples/modeling_deepseek_v3.py:904-916 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:905\u0060 calls \u0060q_proj\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:931\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":815}}}],"partialFingerprints":{"codehealthFindingId/v1":"944df849c46eeb38fb16d170c9362c8719e2bb80a66c5c6eb108d9a97822aea4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201312 lines \u00D7 12): archive/kt-sft/ktransformers/models/modeling_llama.py:435-446 | archive/kt-sft/ktransformers/models/modeling_llama.py:694-705 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:363-369 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:757-762 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:354-360 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:757-762 | archive/ktransformers/models/modeling_llama.py:434-445 | archive/ktransformers/models/modeling_llama.py:693-704 | archive/ktransformers/models/modeling_mixtral.py:362-368 | archive/ktransformers/models/modeling_mixtral.py:756-761 | archive/ktransformers/models/modeling_qwen2_moe.py:353-359 | archive/ktransformers/models/modeling_qwen2_moe.py:756-761 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:435\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"901ae86d7ca35ebcc9de31e2a3ae536035e954e03f2ad3ec93c4cec1ae75eaa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1752-1763 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1710-1721 | archive/kt-sft/ktransformers/models/modeling_llama.py:1352-1363 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1443-1454 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1433-1444 | archive/ktransformers/models/modeling_deepseek.py:1748-1759 | archive/ktransformers/models/modeling_deepseek_v3.py:1721-1732 | archive/ktransformers/models/modeling_llama.py:1351-1362 | archive/ktransformers/models/modeling_mixtral.py:1442-1453 | archive/ktransformers/models/modeling_qwen2_moe.py:1432-1443 | kt-kernel/examples/modeling_deepseek_v3.py:1706-1717 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1752}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ecd67ffab286da38c1cb75efb6562aea75145f2963d1cb8f7800c7ef680d97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 8): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:127-136 | archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:158-167 | archive/merge_tensors/merge_safetensor_gguf.py:127-136 | archive/merge_tensors/merge_safetensor_gguf.py:158-167 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:126-136 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:162-173 | kt-kernel/scripts/check.py:190-199 | kt-kernel/scripts/check.py:214-223 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3c70167bef53cc655e8da81b7f973243fa0e947b5a2e1e54b77cc6658b8ae7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:520-531 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:485-496 | archive/ktransformers/models/modeling_deepseek.py:519-530 | archive/ktransformers/models/modeling_deepseek_v3.py:489-500 | kt-kernel/examples/modeling_deepseek_v3.py:482-493 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:520\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"751075b1780378f4296148a015befde23ede33760188e1f048c0d681c5fecd64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 5): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:185-196 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:274-285 | archive/ktransformers/operators/balance_serve_attention.py:188-199 | archive/ktransformers/operators/balance_serve_attention.py:277-288 | archive/ktransformers/operators/balance_serve_attention.py:538-545 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9ed6c170cc86bb78f135f4bac29a04c38e1f9dee3375b4dd8042394c406731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 4): archive/csrc/custom_marlin/utils/format24.py:23-46 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:23-46 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:23-46 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:23-46 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/format24.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/format24.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 251 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/format24.py:23\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9acc339f3f13a8c6e7f64ddfe4372f7fdbf6d30d429a6032447de74ef0becd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): archive/csrc/custom_marlin/utils/quant_utils.py:17-28 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:17-28 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:16-27 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:16-27 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/csrc/custom_marlin/utils/quant_utils.py:29\u0060 calls \u0060contiguous\u0060 and \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:29\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":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8947ad5df4c3fa68dbde1b8b2d95951985602c572903d32ee04aaa261f0e554"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 4): archive/csrc/custom_marlin/utils/quant_utils.py:104-124 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:104-124 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:70-89 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:70-89 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/csrc/custom_marlin/utils/quant_utils.py:101\u0060 calls \u0060half\u0060 and \u0060archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/quant_utils.py:67\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":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"981da976dea55f2766c407171b9f6f9c8497de227a24713d0b5a4b6f69964efd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:345-355 | archive/kt-sft/ktransformers/operators/attention.py:111-122 | archive/ktransformers/models/modeling_qwen2_moe.py:344-354 | archive/ktransformers/operators/attention.py:110-121 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"beae953d40862693c40f99c3293daddcedf0f2a7b6937f1becbe34c4edf57bd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_loader.py:297-305 | archive/kt-sft/ktransformers/util/weight_loader.py:237-248 | archive/ktransformers/util/custom_loader.py:324-332 | archive/ktransformers/util/weight_loader.py:237-248 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b3046a3427dd1aea140492e7c784d5ac11fac447f17f4b9a5b1fe5a7de66ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 4): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:21-32 | archive/merge_tensors/merge_safetensor_gguf.py:21-32 | archive/merge_tensors/merge_safetensor_gguf_for_qwen3.py:28-38 | kt-kernel/scripts/check.py:48-59 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"e841661d9c22bb1b1636e55919860fc64792c79c925e80cc25e844fd4a3321cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): archive/kt-sft/ktransformers/local_chat.py:279-292 | archive/kt-sft/ktransformers/local_chat.py:360-373 | archive/ktransformers/local_chat.py:231-244 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/local_chat.py\u0060 and \u0060archive/ktransformers/local_chat.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6e6384cba621b7e33560acd160dcb1a5d9ff8d92bfb13e3b8a187bd6f9aaaa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_llama.py:118-129 | archive/ktransformers/models/modeling_llama.py:117-128 | archive/ktransformers/models/modeling_smallthinker.py:401-408 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:118\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dbc98eb61bdd77a85ae0f184cf41fe5316d3dcb2af92e9ba1927b89678f3c51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): archive/kt-sft/ktransformers/operators/linear.py:907-918 | archive/ktransformers/operators/ascend/ascend_linear.py:216-227 | archive/ktransformers/operators/linear.py:922-933 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a01a8f9b69da0e35e565a4214691d0a70715739797b7e57d4c198cfd8d11308"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:177-188 | archive/ktransformers/server/backend/interfaces/balance_serve.py:582-593 | archive/ktransformers/server/backend/interfaces/transformers.py:187-198 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"488e031374156c3a8369737fd28130915a5fe31a9d791a229517ffab303b4bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): archive/ktransformers/operators/ascend/ascend_attention.py:356-366 | archive/ktransformers/operators/ascend/ascend_attention.py:376-386 | archive/ktransformers/operators/ascend/ascend_attention.py:395-406 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"364c0edd872d82d080406bf2e4a977c33751fde41283302cee32466ae2da3911"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:560-579 | archive/ktransformers/models/modeling_deepseek.py:559-578 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"4001e1fd507ec075cf40c0a087235033f5e712fed4135cf8c69422a762d54be3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:748-759 | archive/ktransformers/models/modeling_llama.py:747-758 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbceb3a1d31cff0f527fed0d1e6d81ebeca94799ebdc66d07aee68f42faac09c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:182-193 | archive/ktransformers/operators/RoPE.py:183-194 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2457c4de3ba45d68873140af826146cf26a2d0f46657ea4e25e03ec8f094523e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:256-267 | archive/ktransformers/operators/balance_serve_attention.py:259-270 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"842f8b08b0680e9f86ce588cd0954e3b45681bc7d430460cd1061a64d2c5eee4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:520-531 | archive/ktransformers/operators/dynamic_attention.py:520-531 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05ff5c8720fc908c3a9fa0a3db8e4a1fedfaebd59114f605c3cb30cbf2dd50c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:551-562 | archive/ktransformers/operators/dynamic_attention.py:551-562 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"a834e4a0a64f7ad43320a1fb1ee0402ddc671effa2561c435cace5521762ad54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:889-919 | archive/ktransformers/operators/experts.py:467-497 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":889}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d57cf8aa1eecf33c262ffbf6439f60b8576a2f200f672d451de038ae0e74c99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:126-137 | archive/ktransformers/optimize/optimize.py:150-161 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b510c8fdf75c56cfae94ce2bea3b8d7fc6683d00c139a19ccf2a091fecf4aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:427-435 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:445-456 \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 \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:427\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":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a531c0fca056f3968be7d0f1fb3a32da6db1b558c75a66286791fd5d6e52fe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:241-252 | archive/ktransformers/server/backend/interfaces/ktransformers.py:411-422 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"980b68ca4575a953c95412898870e1b229a50a5651d7a92ed6ccbc28c0d8c0c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:200-211 | archive/ktransformers/server/backend/interfaces/transformers.py:211-222 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"41e2c8e263a2572704188c03bc7f197da0e2a9d8510772355b2c61efaafb1242"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:403-423 | archive/ktransformers/server/backend/interfaces/transformers.py:417-437 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/server/backend/interfaces/transformers.py:416\u0060 calls \u0060info\u0060 and \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:402\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":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcaedd0a279584bd1d8736d7af85c2cd2eff4396e2ad2b2b9694849f65ed1003"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/config.py:57-68 | archive/ktransformers/server/balance_serve/inference/config.py:59-70 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/config.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/config.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"54cc5ccf9b51656b7adc8048785d7e3e9f7069cef879ad2894cf09e2670a7224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/config.py:71-82 | archive/ktransformers/server/balance_serve/inference/config.py:73-84 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/config.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/config.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad2d5f9480617ededcc5c28ca03bc5999d50d33fcba29fd3b0460187d20dd97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:839-850 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:839-850 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c5701a113bf5985c213cc098c90457d65dc1c26a8d75b45652517ee312c73c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:853-864 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:853-864 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a96e3f232c603d814d91a675308131f67b62df9238135f8be4e1291a7fdfde5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:59-70 | archive/ktransformers/server/crud/assistants/messages.py:59-70 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f59d27ff03a4ac1a7ada9ba902fe51d89297d9387659b44f3f3afc85028d3ef4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/runs.py:27-38 | archive/ktransformers/server/crud/assistants/runs.py:27-38 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/runs.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98a8114808a7cc571d3297a5d697cc7cf51a438aede2bc9447045014750a622"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/util/cuda_graph_runner.py:70-81 | archive/ktransformers/util/cuda_graph_runner.py:70-81 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/cuda_graph_runner.py\u0060 and \u0060archive/ktransformers/util/cuda_graph_runner.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/cuda_graph_runner.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc20b33ad7ef47c5ef973999dce589241befdc39719cc8bb5242c65a9265cc92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:128-139 | archive/ktransformers/util/utils.py:194-205 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5820cd58c0f4b3b07eb5da5aff5330ce0a37afbfdb1105525e9583a9ad7641"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:413-423 | archive/ktransformers/util/utils.py:597-608 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/utils.py:413\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 before the matched lines, \u0060archive/ktransformers/util/utils.py:596\u0060 calls \u0060set_device\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:412\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c61d5bb7dcd778d93738b90c62cbf9d00c9e5ada3a4a78748a93d0e424bd76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py:75-86 | archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py:124-135 \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 \u0060archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py:75\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":"archive/ktransformers/models/ascend/custom_ascend_modeling_deepseek_v3.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d7ce271539f8568058005b5f681e3b25239579e0448810e6b0f96d58cdb38b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:1474-1485 | kt-kernel/python/cli/commands/model.py:1488-1499 \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":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1474}}}],"partialFingerprints":{"codehealthFindingId/v1":"83510a9a56152ccd5e1d91e17e242fd7e7799517727e55c84bd6b081eb46203f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:1809-1820 | kt-kernel/python/cli/commands/model.py:1927-1938 \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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060name\u0060 to \u0060str = typer.Argument(..., help=\u0022Name of model to display\u0022)\u0060 in one and \u0060str = typer.Argument(..., help=\u0022Name of model to remove\u0022)\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1809}}}],"partialFingerprints":{"codehealthFindingId/v1":"af110fca947ba402a0a149d7dfc433f5795d9a8d60169926707cf2c77a1e50b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 2): kt-kernel/python/utils/loader.py:375-386 | kt-kernel/python/utils/loader.py:1073-1080 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd1985d011abdaa50179ba2ff7e8116c30a34e996d02ad50dc8d92501da5f02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:340-351 | kt-kernel/scripts/convert_cpu_weights_ds4.py:404-415 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/scripts/convert_cpu_weights.py:352\u0060 calls \u0060is_main_model_layer\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py:416\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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0a712485db43d3ad678b853aed0db60e0c596615c62cd4d1b9c55e199c6d5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights_ds4.py:385-396 | kt-kernel/scripts/convert_cpu_weights_ds4.py:428-439 \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":"kt-kernel/scripts/convert_cpu_weights_ds4.py"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"26d9a3783c9f51f9ed4869ebf8e9bcb8261df1dd03e34cc7a32069f6b6f9cc80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 13): archive/kt-sft/ktransformers/models/modeling_deepseek.py:659-669 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:617-627 | archive/kt-sft/ktransformers/models/modeling_llama.py:302-312 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:272-280 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:267-275 | archive/kt-sft/ktransformers/operators/attention.py:950-958 | archive/ktransformers/models/modeling_deepseek.py:658-668 | archive/ktransformers/models/modeling_deepseek_v3.py:621-631 | archive/ktransformers/models/modeling_llama.py:301-311 | archive/ktransformers/models/modeling_mixtral.py:271-279 | archive/ktransformers/models/modeling_qwen2_moe.py:266-274 | archive/ktransformers/models/modeling_smallthinker.py:202-210 | kt-kernel/examples/modeling_deepseek_v3.py:614-624 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c8629c25244a3aee68548cbd4c9aa9d9aa9b2cc8cf0a74a9c71c38b6510c14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 11): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:58-68 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:62-72 | archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:49-59 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:49-59 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:58-68 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:62-72 | archive/ktransformers/models/custom_modeling_glm4_moe.py:50-60 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:49-59 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:49-59 | archive/ktransformers/models/custom_modeling_qwen3_next.py:51-61 | archive/ktransformers/models/custom_modeling_smallthinker.py:50-60 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"558224152eb890091bb0990494c9c7b5a7eed344a81da1bcaaee5983bdad9f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 10): archive/kt-sft/ktransformers/operators/cpuinfer.py:193-204 | archive/kt-sft/ktransformers/operators/cpuinfer.py:334-344 | archive/kt-sft/ktransformers/operators/cpuinfer.py:360-370 | archive/kt-sft/ktransformers/operators/cpuinfer.py:386-396 | archive/kt-sft/ktransformers/operators/cpuinfer.py:414-424 | archive/ktransformers/operators/cpuinfer.py:193-204 | archive/ktransformers/operators/cpuinfer.py:334-344 | archive/ktransformers/operators/cpuinfer.py:360-370 | archive/ktransformers/operators/cpuinfer.py:386-396 | archive/ktransformers/operators/cpuinfer.py:414-424 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:193\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 before the matched lines, \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:383\u0060 calls \u0060size\u0060 and \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:332\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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddaf040fc6f395bc514da6b4f025a1bf783d6517680bd069676ab8f5a90f7fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_deepseek.py:876-886 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:846-856 | archive/kt-sft/ktransformers/operators/attention.py:183-193 | archive/ktransformers/models/modeling_deepseek.py:875-885 | archive/ktransformers/models/modeling_deepseek_v3.py:850-860 | archive/ktransformers/operators/ascend/ascend_attention.py:315-325 | archive/ktransformers/operators/attention.py:182-192 | kt-kernel/examples/modeling_deepseek_v3.py:843-853 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba0d64f7dc343592e51cfaf582eef4423c0f22b205cf32f4887a97dd68fe436"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_mixtral.py:349-359 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:432-442 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:340-350 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:433-443 | archive/ktransformers/models/modeling_mixtral.py:348-358 | archive/ktransformers/models/modeling_mixtral.py:431-441 | archive/ktransformers/models/modeling_qwen2_moe.py:339-349 | archive/ktransformers/models/modeling_qwen2_moe.py:432-442 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"015f26179e387b30b0ea990ec3b66f6366397272573b592b88883edbc5e65510"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:1674-1684 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1667-1677 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1697-1707 | archive/ktransformers/models/modeling_llama.py:1673-1683 | archive/ktransformers/models/modeling_mixtral.py:1666-1676 | archive/ktransformers/models/modeling_qwen2_moe.py:1696-1706 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b60bf31085c5a9d3d28e5052824349687692eb9b30b1279eb3bd8aa92991c8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 6): archive/kt-sft/ktransformers/operators/cpuinfer.py:174-183 | archive/kt-sft/ktransformers/operators/cpuinfer.py:454-464 | archive/kt-sft/ktransformers/operators/cpuinfer.py:493-503 | archive/ktransformers/operators/cpuinfer.py:174-183 | archive/ktransformers/operators/cpuinfer.py:454-464 | archive/ktransformers/operators/cpuinfer.py:493-503 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:174\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"652869995623fe340a554c6a994adede9a311287deede175ea8bb8607dded3f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): archive/kt-sft/ktransformers/operators/cpuinfer.py:194-205 | archive/kt-sft/ktransformers/operators/cpuinfer.py:443-453 | archive/kt-sft/ktransformers/operators/cpuinfer.py:482-492 | archive/ktransformers/operators/cpuinfer.py:194-205 | archive/ktransformers/operators/cpuinfer.py:443-453 | archive/ktransformers/operators/cpuinfer.py:482-492 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:194\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:206\u0060 calls \u0060size\u0060 and \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:454\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":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe518fb1de52a0e9131f5e92ef5fee8d72b5edaa8e18391b499e7540b86b6b9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:852-862 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:812-822 | archive/ktransformers/models/modeling_deepseek.py:851-861 | archive/ktransformers/models/modeling_deepseek_v3.py:816-826 | kt-kernel/examples/modeling_deepseek_v3.py:809-819 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"b462c524ffd965a481ccc85fe783e75d1925445710640ba7f6f773129e5933e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1311-1321 | archive/kt-sft/ktransformers/operators/experts.py:1897-1907 | archive/ktransformers/operators/experts.py:700-710 | archive/ktransformers/operators/experts.py:1293-1303 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"a027cb7d84ae7d5368ba404edb6b99b23f0b0cd50deac7b6a96d922ed8d880da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:173-183 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:353-363 | archive/ktransformers/server/backend/interfaces/ktransformers.py:240-250 | archive/ktransformers/server/backend/interfaces/transformers.py:366-376 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"6862fdd65b2cc1587c9993171f8b6770477a67003b85a57f7d9f1621fd08f62b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 4): kt-kernel/scripts/convert_cpu_weights.py:434-444 | kt-kernel/scripts/convert_cpu_weights.py:461-469 | kt-kernel/scripts/convert_cpu_weights_ds4.py:496-506 | kt-kernel/scripts/convert_cpu_weights_ds4.py:528-536 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1bca33f38a3ca8f230b8b1a3841c979d97f13ca24155d8f809f0b7397570b28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): archive/kt-sft/ktransformers/operators/models.py:449-459 | archive/kt-sft/ktransformers/operators/models.py:1728-1738 | archive/ktransformers/operators/models.py:446-456 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:449\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060layer\u0060 to \u0060Qwen2MoeDecoderLayer\u0060 in one and \u0060Qwen3MoeDecoderLayer\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8232a38d7910ca46c3c8679ebf2377c7b45270691b85ef48963ea0aee186db9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:425-432 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:443-453 | archive/ktransformers/server/backend/interfaces/balance_serve.py:605-613 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py:614\u0060 calls \u0060equal\u0060 and \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:433\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"6287fee81209506d6e7f9fd9c276837643d7700de02bdf5e6f20dc07d7364b5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): kt-kernel/python/cli/commands/model.py:175-185 | kt-kernel/python/cli/commands/model.py:2275-2285 | kt-kernel/python/cli/utils/model_verifier.py:739-749 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"2acc31eca19ad460741a7be5596c4219f6226c85e7eecd54209c7482e9a45234"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 4): kt-kernel/python/sft/arch.py:103-114 | kt-kernel/python/sft/arch.py:116-126 | kt-kernel/python/sft/arch.py:127-134 | kt-kernel/python/sft/arch.py:151-161 \u2014 all 4 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 \u0060kt-kernel/python/sft/arch.py:103\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"kt-kernel/python/sft/arch.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"d41c9c036fdfca2ed6dd42bf0d17ae251ca27afd709b22b262117ad5e599dacd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u201311 lines \u00D7 4): kt-kernel/python/utils/loader.py:917-927 | kt-kernel/python/utils/loader.py:929-939 | kt-kernel/python/utils/loader.py:941-952 | kt-kernel/python/utils/loader.py:953-957 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":917}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89a6cfe846db4b6db4d80b9f6e014a91dfc26f023ef297d209d58a0c3262742"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): kt-kernel/scripts/convert_cpu_weights.py:943-953 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1012-1022 | kt-kernel/scripts/convert_cpu_weights_ds4.py:1083-1093 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"b866817254aaccfe905f22864e898b6725aa597c8122f9d05299542bf28eabca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:297-307 | archive/ktransformers/models/custom_cache.py:487-497 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c4ac2f74ccec42ccbda023600b5006fca1be7175016f3d863ab10e5517135e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201311 lines \u00D7 6): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:45-55 | archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:47-48 | archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:45-46 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:45-55 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:47-48 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:52-53 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:45\u0060 calls \u0060empty\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:47\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"280fba956235027e92e4ec9946aace1cc6e46f297940613a4a3729aec0febb72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:47-59 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:47-59 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"a95ab2ea7ee6c5d764625b8f7113ddeb8a28be813012dc3ad66dd8bc560cfa4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:280-290 | archive/ktransformers/operators/cpuinfer.py:280-290 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:280\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aefa84d8cdb1a4880c49f6244f94496cf7b34a650ce86e5a53fb1762f83d530"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:316-326 | archive/ktransformers/operators/cpuinfer.py:316-326 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:316\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee1f0de3e58de77d601f8c15b0f188d00432773c2d3b65dcf15301e3ff43b56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:872-882 | archive/ktransformers/operators/experts.py:450-460 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0dfc0d0ae3733f8299c8cf1478d3d80fb4cc4d8d93b7b7e9116c144334aaffc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:1794-1804 | archive/ktransformers/operators/experts.py:1184-1194 | archive/ktransformers/operators/experts.py:1889-1896 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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, \u0060archive/kt-sft/ktransformers/operators/experts.py:1804\u0060 calls \u0060isinstance\u0060 and \u0060archive/ktransformers/operators/experts.py:1896\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1794}}}],"partialFingerprints":{"codehealthFindingId/v1":"f54e170069526f3d4aa24c1184d0b69c76ca533b3501d19017003716d341d9d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/gate.py:205-215 | archive/ktransformers/operators/gate.py:215-225 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7791c0f9a958225a987822aa489a2b4c70104ed81f42fdf8ecbc1c34bc48be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:245-255 | archive/ktransformers/server/backend/interfaces/balance_serve.py:361-371 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f995a2cc52035b7afb939b8608595916de34456b3f124d96baaf06a70ec9927"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:223-233 | archive/ktransformers/server/backend/interfaces/ktransformers.py:292-302 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d3f9df9df25e53d302fa1da68d4c5bec12a6ccce8a2ed74685d083872f03db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:305-315 | archive/ktransformers/server/backend/interfaces/transformers.py:317-327 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"45bd5385b988ebacb1cb9c991312ca0ac690d2faaf6772d2a14894aa8e953399"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:103-113 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:103-113 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98087b0cc71c18506b84c5c78200d05fe10327eb62ec93cf5fb3facf56731bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:126-157 | archive/ktransformers/server/balance_serve/inference/model_runner.py:173-204 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1bbe382b9bd906600ee5b0f3478082854b1767e5c757330e49e3f3cdc6678fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:26-34 | archive/ktransformers/server/balance_serve/sched_rpc.py:37-47 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/server/balance_serve/sched_rpc.py:36\u0060 calls \u0060set_device\u0060 and \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:25\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":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b3b26ec57c5a073ea7351b93ee7a4e388cff4bcc6451bd66e1a168f8c97200"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/log.py:33-43 | archive/ktransformers/server/config/log.py:33-43 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/log.py\u0060 and \u0060archive/ktransformers/server/config/log.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a23db4ed11c5b88cc20471109ce33d85ecffffd0ebad4083c0dab4bd5c1f04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:62-72 | archive/ktransformers/server/main.py:70-80 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3adcce7838108729ab87f6f376199b7761c9bf927f10963bf1e78c19087c797"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:234-248 | archive/ktransformers/util/custom_loader.py:258-272 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060device\u0060 to \u0060str=\u0022cpu\u0022\u0060 in one and \u0060str = \u0022cpu\u0022\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8067475c7c323050a27df1326333e378a629004f5c7d9b53ca1b5fb7394b35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:428-438 | archive/ktransformers/util/modeling_rope_utils.py:428-438 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5ce19f5a0ec1f3405935fecf893b9752df92b8603c4d8af9d04e9d7dfb252c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:180-190 | archive/ktransformers/util/utils.py:242-251 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff66f9f58839894c6a21ed52e7ed6807a82506bad49d9f622bba53322f5fd07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:352-362 | archive/ktransformers/util/utils.py:414-423 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060None\u0060 to \u0060q_head_dim =\u0060 in one and \u0060static_cache =\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"492dcf0b1f222d6bec1c9158b6b4cc0f9245e51b223a3f7a6e5fe9343e0cfd5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:478-488 | archive/kt-sft/ktransformers/util/utils.py:666-676 \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 \u0060archive/kt-sft/ktransformers/util/utils.py:478\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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"362a347bf966c9cd6c07f6684ef9249a10ff0c8fae68ba1898530cf569d0b2e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/ktransformers/operators/balance_serve_attention.py:586-596 | archive/ktransformers/operators/balance_serve_attention.py:697-707 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"e961849ab5ce406617655092e66a83ea7954d6811a594c328264b3df2d693d24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): kt-kernel/python/cli/utils/environment.py:561-571 | kt-kernel/python/cli/utils/environment.py:587-596 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"d34e797f884314dfc5e30148b94bde880bbf4ad6457cb3dee299dd22394ce691"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/python/experts_base.py:632-642 | kt-kernel/python/experts_base.py:784-794 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/python/experts_base.py:782\u0060 calls \u0060_wait_device\u0060 and \u0060kt-kernel/python/experts_base.py:631\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5bc8d167e16966b7e1de8e74cc4377cf28724eea159078a5b31259d8a3807b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/python/sft/artifacts.py:1612-1622 | kt-kernel/python/sft/artifacts.py:1675-1685 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1612}}}],"partialFingerprints":{"codehealthFindingId/v1":"063da75c86ec3d41a4cb951760810aa0e316582af2355fc225068bce86cdb93c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/python/sft/autograd.py:182-192 | kt-kernel/python/sft/autograd.py:225-235 \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":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff1522536899917a0643c81da07d7f6d004293b74a3e138f55b48dceebc4fe88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 2): kt-kernel/python/sft/ephemeral.py:121-131 | kt-kernel/python/sft/weight_manifest.py:196-202 \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":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14b0c857a5bb5db032ed6e7245b9e9353c61c3b3ba95f43d92399e62f0ac5b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:502-512 | kt-kernel/scripts/convert_cpu_weights_ds4.py:569-579 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1464bcbe8e70d8deedb0ce0bde61221c1dc01fa6374cecf0f753f77ddbc034c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/scripts/merge_cpu_weights.py:16-26 | kt-kernel/scripts/merge_cpu_weights.py:30-40 \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":"kt-kernel/scripts/merge_cpu_weights.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8625b9dfdc42457037e18f7c44b9c7a8d3877934271e2916b188ebe21beeeacb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/scripts/merge_cpu_weights.py:99-109 | kt-kernel/scripts/merge_cpu_weights.py:111-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/merge_cpu_weights.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d87b79c5086c7d94039625a1590f6c8b5e9733d1cca617b67cce738d608351"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 21): archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:69-78 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:69-78 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:646-655 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:603-612 | archive/kt-sft/ktransformers/operators/experts.py:1573-1582 | archive/kt-sft/ktransformers/operators/experts.py:1673-1682 | archive/kt-sft/ktransformers/operators/experts.py:1872-1881 | archive/kt-sft/ktransformers/operators/experts.py:2058-2067 | archive/kt-sft/ktransformers/operators/experts.py:2180-2189 | archive/kt-sft/ktransformers/operators/experts.py:2301-2310 | archive/ktransformers/models/modeling_deepseek.py:645-654 | archive/ktransformers/models/modeling_deepseek_v3.py:607-616 | archive/ktransformers/operators/experts.py:961-970 | archive/ktransformers/operators/experts.py:1063-1072 | archive/ktransformers/operators/experts.py:1262-1271 | archive/ktransformers/operators/experts.py:1600-1609 | archive/ktransformers/operators/experts.py:1722-1731 | archive/ktransformers/operators/experts.py:1856-1865 | archive/ktransformers/operators/experts.py:1962-1971 | archive/ktransformers/operators/experts.py:2088-2097 | kt-kernel/examples/modeling_deepseek_v3.py:600-609 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe_torch.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e18c0b409f9afa2d58d931970239f8373e3e844fea65285fb583d1a0a326d96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 19): archive/kt-sft/ktransformers/models/modeling_deepseek.py:621-630 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:578-587 | archive/kt-sft/ktransformers/operators/experts.py:1557-1566 | archive/kt-sft/ktransformers/operators/experts.py:1657-1666 | archive/kt-sft/ktransformers/operators/experts.py:1856-1865 | archive/kt-sft/ktransformers/operators/experts.py:2042-2051 | archive/kt-sft/ktransformers/operators/experts.py:2164-2173 | archive/kt-sft/ktransformers/operators/experts.py:2285-2294 | archive/ktransformers/models/modeling_deepseek.py:620-629 | archive/ktransformers/models/modeling_deepseek_v3.py:582-591 | archive/ktransformers/operators/experts.py:945-954 | archive/ktransformers/operators/experts.py:1047-1056 | archive/ktransformers/operators/experts.py:1246-1255 | archive/ktransformers/operators/experts.py:1584-1593 | archive/ktransformers/operators/experts.py:1706-1715 | archive/ktransformers/operators/experts.py:1840-1849 | archive/ktransformers/operators/experts.py:1946-1955 | archive/ktransformers/operators/experts.py:2072-2081 | kt-kernel/examples/modeling_deepseek_v3.py:575-584 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"052ac4e3af20f46267af357100f26cffe3e4100f4f2254c609a43d8b1533ffe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 8): archive/csrc/custom_marlin/utils/marlin_24_perms.py:35-44 | archive/csrc/custom_marlin/utils/marlin_perms.py:34-43 | archive/kt-sft/csrc/custom_marlin/utils/marlin_24_perms.py:35-44 | archive/kt-sft/csrc/custom_marlin/utils/marlin_perms.py:34-43 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:30-39 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:29-38 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_24_perms.py:30-39 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_perms.py:29-38 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_24_perms.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_24_perms.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_24_perms.py:35\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_24_perms.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e9528d608032bfab29b8902b03c91f4aea38e8e36a9dc8a86986a4d133ffe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_llama.py:465-471 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:388-394 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:379-385 | archive/kt-sft/ktransformers/operators/attention.py:851-860 | archive/ktransformers/models/modeling_llama.py:464-470 | archive/ktransformers/models/modeling_mixtral.py:387-393 | archive/ktransformers/models/modeling_qwen2_moe.py:378-384 | archive/ktransformers/operators/attention.py:850-859 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:851\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d9fe83401ff32cf243b171c854f2ce9fcd8366e166260220c4662ff2e792b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:806-815 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:765-774 | archive/kt-sft/ktransformers/operators/attention.py:603-612 | archive/ktransformers/models/modeling_deepseek.py:805-814 | archive/ktransformers/models/modeling_deepseek_v3.py:769-778 | archive/ktransformers/operators/attention.py:602-611 | kt-kernel/examples/modeling_deepseek_v3.py:762-771 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/attention.py:615\u0060 calls \u0060kv_a_proj_with_mqa\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:817\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"c871c418fd8f4dfd39dfbcb4786e6e7b14ed6ea147ad4ec90b5fb8b71f31e7a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 6): archive/kt-sft/ktransformers/operators/attention.py:96-105 | archive/kt-sft/ktransformers/operators/attention.py:217-225 | archive/kt-sft/ktransformers/operators/attention.py:370-378 | archive/ktransformers/operators/attention.py:95-104 | archive/ktransformers/operators/attention.py:216-224 | archive/ktransformers/operators/attention.py:369-377 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"94a082c3dd042138be36e8a46366b4c24559ff5584e9e33f5d85149a173d7f64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:169-178 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:177-186 | archive/ktransformers/models/modeling_deepseek.py:168-177 | archive/ktransformers/models/modeling_deepseek_v3.py:181-190 | kt-kernel/examples/modeling_deepseek_v3.py:174-183 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab09638b4e925f0fb21a479d85f426df8663a1c87c3a72d34d6d0b4b2877f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): archive/kt-sft/ktransformers/operators/layernorm.py:63-72 | archive/kt-sft/ktransformers/operators/layernorm.py:104-113 | archive/ktransformers/operators/layernorm.py:66-75 | archive/ktransformers/operators/layernorm.py:107-116 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/layernorm.py\u0060 and \u0060archive/ktransformers/operators/layernorm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"db2ea48e9f8df29ab9f5d873bd2ae11192a9a76d9fab9db14988a38d060fdeca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): kt-kernel/python/cli/commands/model.py:849-858 | kt-kernel/python/cli/commands/model.py:970-979 | kt-kernel/python/cli/commands/model.py:2167-2176 | kt-kernel/python/cli/utils/run_interactive.py:111-120 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc03c44f4b9a56f9a1ae3c5b9339b4975dd43919508ead11db6363b6a718e2ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:527-536 | archive/ktransformers/models/modeling_deepseek_v3.py:531-540 | kt-kernel/examples/modeling_deepseek_v3.py:524-533 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4b8b6b18fcfbc5d29828d368e3f46b10bd83881bdd0d682bb14faa089d6513"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): archive/kt-sft/ktransformers/operators/linear.py:970-979 | archive/ktransformers/operators/ascend/ascend_linear.py:280-289 | archive/ktransformers/operators/linear.py:974-983 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb6a072387d6aaf415789f1d030126cb3b13beb8ddea7bb978fb24454203356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:119-128 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:308-317 | archive/ktransformers/server/backend/interfaces/transformers.py:320-329 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:119\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dfbb236dea06364ec22ed7617590ee94e28f2e069a49bb2d695588b7ef92472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): kt-kernel/python/experts_base.py:632-641 | kt-kernel/python/experts_base.py:709-718 | kt-kernel/python/experts_base.py:784-793 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/python/experts_base.py:631\u0060 calls \u0060_should_bypass_stream_callback\u0060 and \u0060kt-kernel/python/experts_base.py:707\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d3a8f1cd293e7393e653d195f66d02eb452f185255464d36024d4d221437248"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:143-152 | archive/ktransformers/models/custom_cache.py:193-202 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9052c79ded0da2bece7800fd7d8af536ad49809aef51bcc6042894cb52db31c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:838-847 | archive/ktransformers/models/modeling_deepseek.py:837-846 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"51d9f1f389b08b7945b2bc9b96d9a68bb63aeaf083b9f667ec3be5074642877e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1333-1342 | archive/ktransformers/models/modeling_qwen2_moe.py:1332-1341 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"978236dddad8c7f23a8289b09b927364a4c9e966b6c232857f7817ef8072d831"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/dynamic_attention.py:763-773 | archive/ktransformers/operators/dynamic_attention.py:763-773 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"394250ed5a472bb6c91393b5360e27c5c4905f22843dd4bb2e476927d77ff719"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1959-1969 | archive/ktransformers/operators/experts.py:1501-1511 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1959}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49d6b72191ebc89934f692370c609d8d26f67cac16f5f5d079897ca20169d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201310 lines \u00D7 4): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:142-151 | archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:211-213 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:149-158 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:218-220 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:214\u0060 calls \u0060tensor\u0060 and \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:151\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfeaad8a89f4ccb8fca0b85e19f94bc0bf94b233eb0d67d695f8b2471c5f38ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:722-731 | archive/ktransformers/operators/linear.py:737-746 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f1ed15dc752225d251cc30d6155b95f8a8d21348445990c9e8448409e3de7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/base.py:58-67 | archive/ktransformers/server/backend/base.py:58-67 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/base.py\u0060 and \u0060archive/ktransformers/server/backend/base.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/base.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3591d69bafc790d36357f514fc9477b5a8bc26d7620b3663052b52301dead6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:95-104 | archive/ktransformers/server/backend/interfaces/balance_serve.py:133-142 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"df75a7f42d13624793585c8f490fda3a626091be2795876bcf0922204b801335"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:301-310 | archive/ktransformers/server/backend/interfaces/balance_serve.py:444-453 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0320de388066044d9299c24ae5b38f2e1bbc1b6d1801efb705d6446740bcc1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:312-321 | archive/ktransformers/server/backend/interfaces/balance_serve.py:478-487 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"9105c5ed355340d159d2d193847013d0790caedc3ac049d0c6f068ef3f0a4c0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:825-834 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:825-834 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7f2fbfb21cdfd562956f372b16f6e117681cf4bfab24e32d6d66c2812ffd88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:165-174 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:165-174 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"332ba742f7a6a97be25f8f29405823cd3d2005362d412c6ea025f42740ea788b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 4): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:43-53 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:106-115 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:48-58 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:111-120 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:103\u0060 calls \u0060tensor\u0060 and \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:41\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddae27cf638a3955ac6b7629732ff5c328abdd96508633341346b579d49a1b18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/runs.py:15-24 | archive/ktransformers/server/crud/assistants/runs.py:15-24 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/runs.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e43d2ed04f243c99efbe32f932b5c2b2d24234315905f80204b599c60a106f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/threads.py:60-69 | archive/ktransformers/server/crud/assistants/threads.py:60-69 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/threads.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a2317688eed7dcb83a67290cfcf37766617683ab99bb25e92a46d4d10664c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:76-85 | archive/ktransformers/server/main.py:84-93 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"323ac72edc5939b2c25b7c60c8bb50da667b0682dad7dac4d7d23075af954864"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/endpoints/chat.py:37-46 | archive/ktransformers/server/schemas/endpoints/chat.py:37-46 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/endpoints/chat.py\u0060 and \u0060archive/ktransformers/server/schemas/endpoints/chat.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/endpoints/chat.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"03407bbbbd0bd2b14506c2e2fe0dcce0c92a6a9d5ac381befeeac1e4f43b3b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/create_interface.py:20-29 | archive/ktransformers/server/utils/create_interface.py:20-29 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/create_interface.py\u0060 and \u0060archive/ktransformers/server/utils/create_interface.py\u0060 as WHOLE FILES: 97% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/create_interface.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c487737dc1b0be4921502f98e5b5fe858b32ad75856910b28a766e0fccee86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:87-96 | archive/ktransformers/util/custom_loader.py:97-106 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/util/custom_loader.py:108\u0060 calls \u0060get_tensor\u0060, \u0060to\u0060 and \u0060archive/kt-sft/ktransformers/util/custom_loader.py:97\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e1d91bb652388f2f9ae218ecf37c3061133146cb608f8b0ece7455a31271e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:114-123 | archive/ktransformers/util/utils.py:182-191 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"95726484553a895883c4f6df6f371bff99690252dbe657ae7d128bd4c227dffe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:188-196 | archive/kt-sft/ktransformers/util/utils.py:199-208 \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"354e5f9e7eb3969701adf635e753dde28327c6616689934bc6574c83c81ff844"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:686-695 | archive/ktransformers/util/utils.py:744-753 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd960121a2d61fa12726273489be41567523f5dbe4f6d228dd80c6a1b8ad60e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:526-533 | archive/ktransformers/operators/ascend/ascend_attention.py:879-888 \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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"f903a9229b76582752cd86c49f027154455ec2da6fb738680c022cdb064e092e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): kt-kernel/python/cli/utils/model_table_builder.py:71-80 | kt-kernel/python/cli/utils/model_table_builder.py:231-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e31faf269d9411627f5155bcca6c54acba3413c899f3b5e7664f0b0ee757f9c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 16): archive/kt-sft/ktransformers/models/modeling_deepseek.py:834-843 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:793-802 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:351-359 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:434-442 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:342-350 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:435-443 | archive/kt-sft/ktransformers/operators/attention.py:108-116 | archive/ktransformers/models/modeling_deepseek.py:833-842 | archive/ktransformers/models/modeling_deepseek_v3.py:797-806 | archive/ktransformers/models/modeling_mixtral.py:350-358 | archive/ktransformers/models/modeling_mixtral.py:433-441 | archive/ktransformers/models/modeling_qwen2_moe.py:341-349 | archive/ktransformers/models/modeling_qwen2_moe.py:434-442 | archive/ktransformers/operators/ascend/ascend_attention.py:620-628 | archive/ktransformers/operators/attention.py:107-115 | kt-kernel/examples/modeling_deepseek_v3.py:790-799 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:834\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 before the matched lines, \u0060archive/kt-sft/ktransformers/operators/attention.py:105\u0060 calls \u0060kv_a_layernorm\u0060, \u0060view\u0060, \u0060transpose\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:834\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"43050615b84a3007ba1e25bef806896ce036f15e04f3715e96a90a814dd7b6cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 16): archive/kt-sft/ktransformers/models/modeling_deepseek.py:836-844 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:352-360 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:435-444 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:343-351 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:436-445 | archive/kt-sft/ktransformers/operators/attention.py:109-118 | archive/kt-sft/ktransformers/operators/attention.py:229-238 | archive/kt-sft/ktransformers/operators/attention.py:382-391 | archive/ktransformers/models/modeling_deepseek.py:835-843 | archive/ktransformers/models/modeling_mixtral.py:351-359 | archive/ktransformers/models/modeling_mixtral.py:434-443 | archive/ktransformers/models/modeling_qwen2_moe.py:342-350 | archive/ktransformers/models/modeling_qwen2_moe.py:435-444 | archive/ktransformers/operators/attention.py:108-117 | archive/ktransformers/operators/attention.py:228-237 | archive/ktransformers/operators/attention.py:381-390 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/operators/attention.py:105\u0060 calls \u0060kv_a_layernorm\u0060, \u0060view\u0060, \u0060transpose\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:834\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"e612e1a72d62eb56294fd393a3268c4d2ed31ed814034f3b5022fdad49e5106b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 16): archive/kt-sft/ktransformers/operators/cpuinfer.py:160-165 | archive/kt-sft/ktransformers/operators/cpuinfer.py:192-200 | archive/kt-sft/ktransformers/operators/cpuinfer.py:263-268 | archive/kt-sft/ktransformers/operators/cpuinfer.py:274-279 | archive/kt-sft/ktransformers/operators/cpuinfer.py:299-304 | archive/kt-sft/ktransformers/operators/cpuinfer.py:310-315 | archive/kt-sft/ktransformers/operators/cpuinfer.py:385-393 | archive/kt-sft/ktransformers/operators/cpuinfer.py:413-421 | archive/ktransformers/operators/cpuinfer.py:160-165 | archive/ktransformers/operators/cpuinfer.py:192-200 | archive/ktransformers/operators/cpuinfer.py:263-268 | archive/ktransformers/operators/cpuinfer.py:274-279 | archive/ktransformers/operators/cpuinfer.py:299-304 | archive/ktransformers/operators/cpuinfer.py:310-315 | archive/ktransformers/operators/cpuinfer.py:385-393 | archive/ktransformers/operators/cpuinfer.py:413-421 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:160\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:261\u0060 calls \u0060size\u0060 and \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py:158\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd0911297f819014a64f52f683bc48e5486ef46a428d9624ac59a87053182f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 14): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1303-1311 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1269-1277 | archive/kt-sft/ktransformers/models/modeling_llama.py:868-876 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1004-1012 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:992-1000 | archive/kt-sft/ktransformers/operators/models.py:973-981 | archive/ktransformers/models/modeling_deepseek.py:1302-1310 | archive/ktransformers/models/modeling_deepseek_v3.py:1275-1283 | archive/ktransformers/models/modeling_llama.py:867-875 | archive/ktransformers/models/modeling_mixtral.py:1003-1011 | archive/ktransformers/models/modeling_qwen2_moe.py:991-999 | archive/ktransformers/models/modeling_smallthinker.py:445-453 | archive/ktransformers/operators/models.py:982-990 | kt-kernel/examples/modeling_deepseek_v3.py:1266-1274 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d6f2d0947c99a9b5682fb5ad7c1564fe1b39b2c56091a1f2118da44975ca985"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:91-100 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:85-94 | archive/ktransformers/models/modeling_deepseek.py:90-99 | archive/ktransformers/models/modeling_deepseek_v3.py:89-98 | kt-kernel/examples/modeling_deepseek_v3.py:82-91 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e42e0348adadba7170c389ebeb4a826f836b85f34ad9cd2e4be202b547dd7fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:370-378 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:380-388 | archive/ktransformers/models/modeling_deepseek.py:369-377 | archive/ktransformers/models/modeling_deepseek_v3.py:384-392 | kt-kernel/examples/modeling_deepseek_v3.py:377-385 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff35f299ada9f8f016d1bbb351cf9d7b5afd0ee787f23aad973f09ba421b6e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:710-718 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:669-677 | archive/ktransformers/models/modeling_deepseek.py:709-717 | archive/ktransformers/models/modeling_deepseek_v3.py:673-681 | kt-kernel/examples/modeling_deepseek_v3.py:666-674 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060DeepseekV3Config\u0060 names \u0060.configuration_deepseek_v3\u0060 in one and \u0060configuration_deepseek_v3\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"b507bb28bb48b0c7ff195b313ff5d142d31ef4dd9ebb52223e1ded635fb6255d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 4): archive/csrc/custom_marlin/utils/format24.py:260-276 | archive/kt-sft/csrc/custom_marlin/utils/format24.py:260-276 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:260-276 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/format_24.py:260-276 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/format24.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/format24.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 251 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/format24.py:260\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/format24.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a734d047c1c80e511609aa4191c23fa9382f9d9efa5348799159d33f003cb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:851-862 | archive/kt-sft/ktransformers/operators/experts.py:1689-1700 | archive/ktransformers/models/modeling_mixtral.py:850-861 | archive/ktransformers/operators/experts.py:1079-1090 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ad67b9d7a18b6d5da59beb862166966ae6616f433dba2b62a8bc7e77ab5bbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:53-61 | archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:43-51 | archive/ktransformers/operators/experts.py:51-59 | archive/ktransformers/server/balance_serve/inference/model_runner.py:60-68 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b3ec5ed0ce7f2d6bfe072877cd9c39846cbcbe6ec25de0ff7ee20ff10eb2db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:217-225 | archive/kt-sft/ktransformers/operators/experts.py:235-243 | archive/ktransformers/operators/experts.py:222-230 | archive/ktransformers/operators/experts.py:241-249 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:217\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa707ccd248981e65a84a8ebbab619b7249e01a2400d5d29353f9a5e166560b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:2082-2091 | archive/kt-sft/ktransformers/operators/experts.py:2202-2211 | archive/ktransformers/operators/experts.py:1624-1633 | archive/ktransformers/operators/experts.py:1987-1996 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/operators/experts.py:2001\u0060 calls \u0060sum\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:2096\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2082}}}],"partialFingerprints":{"codehealthFindingId/v1":"294eb5ca0d1cc84d1a7062a4fea1a85720ad3841f8dd9254fbae036fe698a017"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): archive/kt-sft/ktransformers/operators/gate.py:101-110 | archive/kt-sft/ktransformers/operators/gate.py:168-177 | archive/ktransformers/operators/gate.py:111-120 | archive/ktransformers/operators/gate.py:178-187 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/gate.py:179\u0060 calls \u0060load\u0060 and \u0060archive/kt-sft/ktransformers/operators/gate.py:112\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f8e10613c8266f3b7aec2ad8eee81ba45bc11882e96e83c71e8e70c3ebcc5ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): archive/kt-sft/ktransformers/util/utils.py:685-692 | archive/ktransformers/util/utils.py:537-545 | archive/ktransformers/util/utils.py:569-576 | archive/ktransformers/util/utils.py:743-750 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/util/utils.py:546\u0060 calls \u0060get_rank\u0060, \u0060get_tensor_parallel_size\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:693\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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8f412c8f054c8e643854704b08499970c4970bc9a7aa8aa3d7748d1dfc3c42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): archive/ktransformers/server/backend/interfaces/ktransformers.py:324-332 | archive/ktransformers/util/utils.py:664-672 | archive/ktransformers/util/utils.py:759-767 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py:324\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":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb09c1a0a6065dc0141247bb6c3588e8ed63f940c620184b2faf62259af2374b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): kt-kernel/python/sft/artifacts.py:1572-1580 | kt-kernel/python/sft/artifacts.py:1613-1621 | kt-kernel/python/sft/artifacts.py:1676-1684 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1572}}}],"partialFingerprints":{"codehealthFindingId/v1":"58122ac7e930e90896a60848f68b25beceb2754b19edf6e486ff2f1bb19149f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): kt-kernel/scripts/convert_cpu_weights.py:370-378 | kt-kernel/scripts/convert_cpu_weights_ds4.py:390-397 | kt-kernel/scripts/convert_cpu_weights_ds4.py:432-440 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060kt-kernel/scripts/convert_cpu_weights.py:369\u0060 calls \u0060is_main_model_layer\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py:389\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":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc20eb4f02936fa5d0b6d5c386c50953f9c4ab2b87e6b2b9c61aa36155c68757"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): archive/csrc/custom_marlin/utils/quant_utils.py:46-65 | archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py:46-65 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/quant_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/quant_utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/quant_utils.py:46\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/quant_utils.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fdc7f666e46de03fda70b57435352ea227d60f377e7203f1b4226aebfdcf657"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1342-1350 | archive/ktransformers/models/modeling_mixtral.py:1341-1349 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1342}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd39a1addf31132793ceb4e2b981d952149e7f8d7daa80e78023b9fe1e54edc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:971-984 | archive/ktransformers/models/modeling_smallthinker.py:223-236 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6ac54276fe7ba5802747f40f936d1dedd0c8f0eb3ac8c3470a5c7693a6c731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:170-178 | archive/ktransformers/operators/balance_serve_attention.py:173-181 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"37066adfb2dc82f10ed5e484913c250dc8be748914f3436eab91f4698499db99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/base_operator.py:41-49 | archive/ktransformers/operators/base_operator.py:41-49 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/base_operator.py\u0060 and \u0060archive/ktransformers/operators/base_operator.py\u0060 as WHOLE FILES: 94% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/base_operator.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6810033c2f133e0fdbd6a0bb841d3dea0eede27ef392abf68aeab9f08b4f2e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:309-334 | archive/ktransformers/operators/experts.py:323-348 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4f5eb0a2cc34b92fd58401483bbc763595504d15e651e1a79b0f050bcee423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1043-1053 | archive/ktransformers/operators/experts.py:600-610 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ca3d99361c38566749f6bdb96987eb8a178c068501cc121130dd3a2eac277e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/layernorm.py:187-197 | archive/ktransformers/operators/layernorm.py:312-322 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/layernorm.py\u0060 and \u0060archive/ktransformers/operators/layernorm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"082f982b6ed25c52f5d4a60fdc325ed4eebabe075e6729fa466aa2fc47c41244"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:832-840 | archive/ktransformers/operators/linear.py:847-855 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"4555b4af93702c7a87fbdb474060cfb8cd6b51cd1955bf3aedf0c44aa0cce2c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:21-31 | archive/ktransformers/optimize/optimize.py:29-39 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"4016d06fcbb241e7690add56364a18ed320cb5a28e8223c2dbd623be304b1cf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:32-42 | archive/ktransformers/optimize/optimize.py:44-54 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a2468005111892871c483f5cbb898132925fb31ef2927be506ad3d70c263ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:74-92 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:79-97 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a1973dfd2d37c3360c01c7f4bd8bb9f61c79143455976f7d1a19799294fba0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 3): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:137-145 | archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:204-205 | archive/ktransformers/server/balance_serve/inference/model_runner.py:184-192 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:137\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2366951a9b8bae75aeda84638a9d1c42171e011e6763eb56e0722ec0abbaf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:87-100 | archive/ktransformers/server/balance_serve/inference/query_manager.py:132-145 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"869db3203b232a204854f82172f5e2c230bfc73a52f11cf645af29e214ed954d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:100-108 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py:100-108 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b5dfb8cc0ae479937986501266d84f58a5946b2f194aff9bffd292e86d6501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:50-58 | archive/ktransformers/server/main.py:58-66 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"4527dee04265c1657436bc4f9c65425c5fdc0aa38aafdfccf1aae6f46e17d8ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:135-143 | archive/ktransformers/server/schemas/assistants/assistants.py:135-143 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"458545c0775371abe3fdef5415c3ba1f5ef6d1265b6537f5c5b72505471d00fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py:49-57 | archive/ktransformers/server/schemas/assistants/streaming.py:49-57 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/streaming.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"984938644c606988e7474e0333862c240ca6d22e8d89c9eee2b2c3b966d2a4fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py:152-160 | archive/ktransformers/server/schemas/assistants/streaming.py:152-160 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/streaming.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"e60bb9a7db5b20ac3effa20115cfa66d2fbcbf8b3a90467f5bfe791128b670cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:379-387 | archive/ktransformers/util/custom_loader.py:406-414 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d07ecafd95e2bcf177cabb5306d1c3db77c1771b3eaf0b40e7ff919c5e453ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/ktransformers/operators/experts.py:1368-1376 | archive/ktransformers/operators/experts.py:1440-1448 \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1368}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c58390c35a776b9aab2487ad5fac1adeb9f91b377e76ad42d3c04fd9c9ed2db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/ktransformers/util/custom_gguf.py:676-684 | archive/ktransformers/util/custom_gguf.py:686-694 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"73d57a824810d968a46e9d09830d79939f14a75a88ab8c6cc28b98753496fcbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:560-568 | kt-kernel/python/cli/commands/model.py:751-759 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"174a37644f977dec8cb28514d152d3e807138b2aa4cbf04a1f08a0b73b858b10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): kt-kernel/python/cli/utils/environment.py:298-306 | kt-kernel/python/cli/utils/environment.py:1046-1053 \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":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ffcd29fcddbe0777d64b0750a4b173b12d9fbc9b23c8a07c489c4c23e5d3af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): kt-kernel/python/sft/artifacts.py:1627-1635 | kt-kernel/python/sft/artifacts.py:1686-1693 \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":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"009a1ba0536838e663238d4d0d90f7872bfd6fa116570407894faed677907897"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): kt-kernel/python/sft/ephemeral.py:410-418 | kt-kernel/python/sft/weight_manifest.py:174-180 \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":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"210377ce3d98e25cdd74e4a0fce5a6017efd618ab0d0826b7287743306e71cbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): kt-kernel/python/sft/weights.py:962-970 | kt-kernel/python/sft/weights.py:982-990 | kt-kernel/python/sft/weights.py:991-1009 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ddf2091191c6978af51c493cf360bd1c6acb335218f4427b71516c9bea972a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): kt-kernel/python/utils/loader.py:379-387 | kt-kernel/python/utils/loader.py:571-576 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8720515b037dc65af84f73ad75c0b7b78794d24a89bef972f2c183510a4343"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 16): archive/kt-sft/ktransformers/models/modeling_deepseek.py:817-824 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:935-945 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:776-783 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:909-919 | archive/kt-sft/ktransformers/operators/attention.py:95-104 | archive/kt-sft/ktransformers/operators/attention.py:216-223 | archive/kt-sft/ktransformers/operators/attention.py:369-376 | archive/ktransformers/models/modeling_deepseek.py:816-823 | archive/ktransformers/models/modeling_deepseek.py:934-944 | archive/ktransformers/models/modeling_deepseek_v3.py:780-787 | archive/ktransformers/models/modeling_deepseek_v3.py:913-923 | archive/ktransformers/operators/attention.py:94-103 | archive/ktransformers/operators/attention.py:215-222 | archive/ktransformers/operators/attention.py:368-375 | kt-kernel/examples/modeling_deepseek_v3.py:773-780 | kt-kernel/examples/modeling_deepseek_v3.py:906-916 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c8cab31e93f535297d7adbeed8744fb3a3409d8be68848ae1d2146274ea2c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_llama.py:330-337 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:302-309 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:296-303 | archive/ktransformers/models/modeling_llama.py:329-336 | archive/ktransformers/models/modeling_mixtral.py:301-308 | archive/ktransformers/models/modeling_qwen2_moe.py:295-302 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction \u2014 check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060LlamaConfig\u0060 in one and \u0060MixtralConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee0c76fb347852502a8a5b7724db31d848807c5be395a74d0a9ef651975fb341"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): archive/kt-sft/ktransformers/operators/experts.py:1365-1372 | archive/kt-sft/ktransformers/operators/experts.py:1947-1954 | archive/ktransformers/operators/experts.py:750-757 | archive/ktransformers/operators/experts.py:1343-1350 | archive/ktransformers/operators/experts.py:1416-1423 | archive/ktransformers/operators/experts.py:1488-1495 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1365}}}],"partialFingerprints":{"codehealthFindingId/v1":"322a15592e1d9963e9b22ae07731759f989f59dc7db989825f8a4f70d63a604b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1138-1145 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1129-1136 | archive/ktransformers/models/modeling_mixtral.py:1137-1144 | archive/ktransformers/models/modeling_qwen2_moe.py:1128-1135 | archive/ktransformers/models/modeling_smallthinker.py:499-506 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"40b747c9006261c2e2fff67d1a01676e7b86fc263aace0e980fa4558f6537eec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): archive/kt-sft/ktransformers/operators/models.py:470-477 | archive/kt-sft/ktransformers/operators/models.py:856-863 | archive/kt-sft/ktransformers/operators/models.py:1749-1756 | archive/ktransformers/operators/models.py:467-474 | archive/ktransformers/operators/models.py:865-872 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/models.py:470\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060layer\u0060 to \u0060Qwen2MoeDecoderLayer\u0060 in one and \u0060DeepseekV2DecoderLayer\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/operators/models.py:469\u0060 calls \u0060to\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:854\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"00dd349396614e60c10a6a41dc2cae44d16e3d8f7c1525d62f69ffae237424af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:139-146 | archive/ktransformers/models/modeling_deepseek_v3.py:143-150 | kt-kernel/examples/modeling_deepseek_v3.py:136-143 | kt-kernel/examples/torch_attention.py:193-200 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"45eb5e0943be14a1b62a2078310586535f40b7e438d55799436e7f70ac8126bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:822-829 | archive/kt-sft/ktransformers/operators/experts.py:1386-1393 | archive/ktransformers/models/modeling_qwen2_moe.py:821-828 | archive/ktransformers/operators/experts.py:774-781 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"76dffbf6b712ff77b391b634051a76f2b0023172df4deb9fe923dee97b30fb21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1444-1453 | archive/kt-sft/ktransformers/operators/experts.py:1740-1749 | archive/ktransformers/operators/experts.py:832-841 | archive/ktransformers/operators/experts.py:1130-1139 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4b8783c0bdfc5cb7ef217ae84e2c1c0d0fca70572903577eb3b7b1098a033b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1937-1944 | archive/ktransformers/operators/experts.py:1333-1340 | archive/ktransformers/operators/experts.py:1406-1413 | archive/ktransformers/operators/experts.py:1478-1485 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060InferenceState\u0060 names \u0060ktransformers.util.inference_state\u0060 in one and \u0060ktransformers.util.utils\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1937}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c9ad23d29c22193ac188bcfd52ffa56ab43c45b093effdd6a08d80ac0845342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1967-1974 | archive/kt-sft/ktransformers/operators/experts.py:2089-2096 | archive/ktransformers/operators/experts.py:1509-1516 | archive/ktransformers/operators/experts.py:1631-1638 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1967}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff549e3431ad46c2af1cb5a208468f7cbdfcdd97b7aae2888ef31796e86e972b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_loader.py:239-247 | archive/kt-sft/ktransformers/util/weight_loader.py:134-142 | archive/ktransformers/util/custom_loader.py:263-271 | archive/ktransformers/util/weight_loader.py:134-142 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060device\u0060 to \u0060str=\u0022cpu\u0022\u0060 in one and \u0060str = \u0022cpu\u0022\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1f70c9efe3725e9205f6cf0b33c65e2bd3d56b75647882ebfeee4ebc14ef1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): archive/kt-sft/ktransformers/util/utils.py:471-484 | archive/kt-sft/ktransformers/util/utils.py:660-672 | archive/ktransformers/util/utils.py:715-728 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e176ba67b78a9cf18358ff2a4f1da05a54285d582cd7262f6a18f34d3b81ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): kt-kernel/python/experts_base.py:668-675 | kt-kernel/python/experts_base.py:726-733 | kt-kernel/python/experts_base.py:814-821 \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 \u0060kt-kernel/python/experts_base.py:668\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":"kt-kernel/python/experts_base.py"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e9051aaf279652090e3647b78c1bc3de29e341593d178a6dff967e5f742cca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20138 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_mixtral.py:319-326 | archive/ktransformers/models/modeling_mixtral.py:318-325 | archive/ktransformers/models/modeling_smallthinker.py:251-252 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f91a73a634d75829a2ed84d320552810f6a8605a05f4d4704680bd927d1543"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:892-899 | archive/ktransformers/models/modeling_mixtral.py:891-898 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"85a413f554642bf0e438787f619e7fa7e8f69da7e353a91cdd8673185ae1ef2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:308-320 | archive/ktransformers/models/modeling_qwen2_moe.py:307-319 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:308\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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae09d1fa0f01b3c1613a8c34c19cce22133c749ab0429fe3f31dff126d9a6c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20138 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:337-344 | archive/ktransformers/operators/ascend/ascend_experts.py:60-63 | archive/ktransformers/operators/experts.py:351-358 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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, \u0060archive/kt-sft/ktransformers/operators/experts.py:344\u0060 calls \u0060contiguous\u0060, \u0060cpu\u0060 and \u0060archive/ktransformers/operators/ascend/ascend_experts.py:63\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e7df7141fa97a05e392031e0f93025de447b444f5e03215f349ab4a08dc272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1000-1009 | archive/ktransformers/operators/experts.py:578-587 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"abfdf46376042d154dc9f39ed820bf4f9a974ae69e969cdbba1feada17f43b15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20138 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1494-1495 | archive/kt-sft/ktransformers/operators/experts.py:1587-1594 | archive/ktransformers/operators/experts.py:882-883 | archive/ktransformers/operators/experts.py:975-982 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/operators/experts.py:1594\u0060 calls \u0060hasattr\u0060, \u0060is_available\u0060, \u0060is_current_stream_capturing\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:1495\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2daa59bc4b65d381a33ac6de7c52e78d411d47ee586dc5eac3a65769f7e4029"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:189-196 | archive/ktransformers/server/backend/interfaces/ktransformers.py:256-263 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:189\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"979dc797827c494dcba14c031e8a726cb382cce971213b3fc117fdbaf81c2e6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:224-231 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:224-231 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c3c3c5ae04efca432064c34b7c4c2df2d559557e9921c67dfb275c73ba741d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/assistants.py:35-42 | archive/ktransformers/server/crud/assistants/assistants.py:35-42 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/assistants.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44a980ec5505d4352b92e4b32cf0482e55cb7a71cd36d16a7ac23d24d947152"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:629-636 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:665-673 \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 \u0060archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:629\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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"c09e78c9cded18e7e53f28ec6d61c7127812db339814d6061ab6bf12cb4c5fa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:416-423 | archive/ktransformers/util/modeling_rope_utils.py:416-423 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93c7239ff1c2584b7f523c7e69f37edb789bdf0fa6ff4771009474b6fed82d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:202-210 | archive/ktransformers/util/utils.py:254-261 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/util/utils.py:253\u0060 calls \u0060get_current_device\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:201\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8ca7896f69aebb4048fcdb1d6c7569bdb3ce90160bfb8fe0068a276383bc7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:516-523 | archive/ktransformers/util/utils.py:786-793 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"036507642e302a9c3f1ff615414082030ab8cdfc32f8298dc014ba4154fe5a6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/setup.py:106-113 | archive/setup.py:81-88 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9154365228dec23cd6c3658d6c21786b54502ff3ba8339032978bb4d8f80cdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): kt-kernel/python/cli/utils/model_verifier.py:578-585 | kt-kernel/python/cli/utils/model_verifier.py:592-599 \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 \u0060kt-kernel/python/cli/utils/model_verifier.py:578\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":"kt-kernel/python/cli/utils/model_verifier.py"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"c096c699891612d2f7422484cba7efa436fa096789375eabd1480a69b85daa17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): kt-kernel/python/sft/weights.py:449-456 | kt-kernel/python/sft/weights.py:600-606 \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":"kt-kernel/python/sft/weights.py"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"71689622be9ec656717d14295915604a4dbe260a0648bbd57845983322392de1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:125-132 | archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:109-116 | archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:109-116 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:125-132 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:109-116 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:109-116 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:123\u0060 calls \u0060mlp\u0060 and \u0060archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:108\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":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"6921d40312daa905eac6bf8d510c77e012cf60d3d56173bb91e8dcc24f9a02cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): archive/kt-sft/ktransformers/operators/dynamic_attention.py:519-525 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:535-541 | archive/kt-sft/ktransformers/operators/dynamic_attention.py:550-556 | archive/ktransformers/operators/dynamic_attention.py:519-525 | archive/ktransformers/operators/dynamic_attention.py:535-541 | archive/ktransformers/operators/dynamic_attention.py:550-556 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py\u0060 and \u0060archive/ktransformers/operators/dynamic_attention.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 632 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/dynamic_attention.py:519\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":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b4c8ca29a5d786f8c06062fd65741c557e0f004f383a9c086b5034c4f3251c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): kt-kernel/python/experts_base.py:633-639 | kt-kernel/python/experts_base.py:667-673 | kt-kernel/python/experts_base.py:710-716 | kt-kernel/python/experts_base.py:725-731 | kt-kernel/python/experts_base.py:785-791 | kt-kernel/python/experts_base.py:813-819 \u2014 all 6 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 \u0060kt-kernel/python/experts_base.py:633\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, \u0060kt-kernel/python/experts_base.py:631\u0060 calls \u0060_should_bypass_stream_callback\u0060 and \u0060kt-kernel/python/experts_base.py:707\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f123af316299d58b634b5fd71df22179f1a7c0838bd5e73ebb98f50d29047b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_mixtral.py:860-866 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:830-836 | archive/ktransformers/models/modeling_mixtral.py:859-865 | archive/ktransformers/models/modeling_qwen2_moe.py:829-835 | archive/ktransformers/models/modeling_smallthinker.py:98-105 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/ktransformers/models/modeling_smallthinker.py:95\u0060 calls \u0060softmax\u0060, \u0060sigmoid\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:829\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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6fb5ebeb19756417126b31c3e14dc0a64b0c6dd56d91113dd18e0ae432e9449"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): archive/kt-sft/ktransformers/operators/experts.py:1969-1975 | archive/kt-sft/ktransformers/operators/experts.py:2091-2097 | archive/ktransformers/operators/experts.py:1511-1517 | archive/ktransformers/operators/experts.py:1633-1639 | archive/ktransformers/operators/experts.py:1767-1773 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1969}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad41fc3feb5f60fc0d78aed5eadbc52af74d8eea7e093f6a6aef7e470301dbd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 5): archive/kt-sft/ktransformers/util/weight_loader.py:113-119 | archive/kt-sft/ktransformers/util/weight_loader.py:133-138 | archive/ktransformers/util/custom_loader.py:602-608 | archive/ktransformers/util/weight_loader.py:113-119 | archive/ktransformers/util/weight_loader.py:133-138 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. 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":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a19cb06e771e688ef1a093559247a8b6a6e3488c9455705455c16c844dc4a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_mixtral.py:169-176 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:156-163 | archive/ktransformers/models/modeling_mixtral.py:168-175 | archive/ktransformers/models/modeling_qwen2_moe.py:155-162 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"81d736083d41e96048a7b3670b251773a130e2691d607187f6e70f8c05c47931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/kt-sft/ktransformers/operators/attention.py:666-673 | archive/kt-sft/ktransformers/operators/attention.py:933-939 | archive/ktransformers/operators/attention.py:665-672 | archive/ktransformers/operators/attention.py:932-938 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:666\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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"968028398037cce867c491b49602e8282bde0f2c96b24eaaf6f3b59f43811e79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/kt-sft/ktransformers/server/balance_serve/settings.py:17-23 | archive/kt-sft/ktransformers/server/balance_serve/settings.py:70-76 | archive/ktransformers/server/balance_serve/settings.py:20-26 | archive/ktransformers/server/balance_serve/settings.py:72-78 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"577dab72ebb383a24c3d6bcc14eeec627e8312bbd07cade17deea0d8531728e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:56-62 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:142-148 | archive/ktransformers/util/modeling_rope_utils.py:56-62 | archive/ktransformers/util/modeling_rope_utils.py:142-148 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py:56\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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2352d2e793169cf255c84cfb0137fb2375167032c0d3cfaebd531460380836f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:152-158 | archive/ktransformers/models/modeling_deepseek_v3.py:156-162 | kt-kernel/examples/modeling_deepseek_v3.py:149-155 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d72ce901ac250bb2360c70d849271fa1f21896ef7dbfea8c670fa802ade2d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:249-255 | archive/kt-sft/ktransformers/operators/experts.py:599-606 | archive/ktransformers/operators/experts.py:256-262 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d5f4fa3f03b56b4e8e15c39b7e4bd80bd10ebe04ece17384d3d189991d5acf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:220-226 | archive/ktransformers/server/backend/interfaces/ktransformers.py:289-295 | archive/ktransformers/server/backend/interfaces/ktransformers.py:306-312 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/ktransformers.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c39b35ba40b4912e775b1cd7f8ddb7b4ba1026321af31f85a91d9e13cf7f35b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/util/custom_loader.py:92-98 | archive/kt-sft/ktransformers/util/weight_loader.py:114-120 | archive/ktransformers/util/weight_loader.py:114-120 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060device\u0060 to \u0060str=\u0022cpu\u0022\u0060 in one and \u0060str = \u0022cpu\u0022\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe85c6ecd189c607b38ba9021c642e7c13db4192c6cc9052c088cb77d00aac9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:183-191 | archive/ktransformers/models/custom_cache.py:239-247 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e5eb3f579151642a5e8b0b0edb2603fb8c90e0c69c4b5e72e14ac86b6d42a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py:36-42 | archive/ktransformers/models/custom_modeling_qwen2_moe.py:36-42 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8826c69076eec641e67f83e91a88e83b95ba2acfcee311e33fbadd80d9905a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py:36-42 | archive/ktransformers/models/custom_modeling_qwen3_moe.py:36-42 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_qwen3_moe.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c491e9fbdb6b25609de4c62c453f2160a6426f876f2a4db618e386c98b2d17f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/base.py:90-100 | archive/ktransformers/server/backend/base.py:90-100 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/base.py\u0060 and \u0060archive/ktransformers/server/backend/base.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/base.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1728a4389ccee8355d2b2c85fe411cbda59d81d1cf804f33e59c94166e8e2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:257-263 | archive/ktransformers/util/custom_gguf.py:264-270 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc98085e824e4056b332ef8c722cc723e98595787a41dc610d06b8f06523cc7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:309-315 | archive/ktransformers/util/custom_gguf.py:316-322 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"2715f4cb0b344e05f3206f36559d1197d67cc3c3ad43c02cc0b17e973918cf46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:341-347 | archive/ktransformers/util/custom_gguf.py:348-354 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"413c03d533f618ef9748983f0d8d3a367436fec497e5e309eb89ff16cc71f325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:407-413 | archive/ktransformers/util/custom_gguf.py:414-420 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"3309e43b17857ba0718c083526fe882e5051811488c09cbb475007da50598182"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:662-668 | archive/ktransformers/util/custom_gguf.py:696-702 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"062b74062d44fac8479bf3bbb81302dd124748db37605e64e7102391f184b9ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/setup.py:180-186 | archive/setup.py:155-161 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faf2d240e2919a65a08694f665bdf3eabdffc624775873c1357253fe7d64da9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/setup.py:251-257 | archive/setup.py:230-236 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"63813fa9646dacef3a0a24e9d434de2c840943f3b42ea2d1bf7d436a21e32eec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/ktransformers/server/utils/serve_profiling.py:95-101 | archive/ktransformers/util/utils.py:144-150 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/utils/serve_profiling.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e3210940213cedc23c6a2a1580e6d5c2de5434db6c71f7715c8a331f09c0d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:827-833 | kt-kernel/python/cli/utils/model_table_builder.py:132-138 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7a679a4796a397c2a25e7eba45bba0b9e03d66a1de9568de2feadb4d84e1d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/python/cli/utils/environment.py:97-103 | kt-kernel/python/cli/utils/environment.py:106-112 \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":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"81680b48722532439af3b1e5239f9c39efac0e8a33bbb80693b7ebf0cdf52a38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/python/utils/loader.py:491-497 | kt-kernel/python/utils/loader.py:627-633 \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":"kt-kernel/python/utils/loader.py"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"873158520521b38f448aabe12894c7468c7e9fe6a7937e6fa19d63193e52c128"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/scripts/check.py:200-206 | kt-kernel/scripts/check.py:225-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/scripts/check.py:200\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":"kt-kernel/scripts/check.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"393269b06a8f6c80345a22c49eac597a217c0dada922a5c9b05e014562a1b511"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1824-1829 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1776-1781 | archive/kt-sft/ktransformers/models/modeling_llama.py:1399-1404 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:1504-1509 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1520-1525 | archive/ktransformers/models/modeling_deepseek.py:1820-1825 | archive/ktransformers/models/modeling_deepseek_v3.py:1790-1795 | archive/ktransformers/models/modeling_llama.py:1398-1403 | archive/ktransformers/models/modeling_mixtral.py:1503-1508 | archive/ktransformers/models/modeling_qwen2_moe.py:1519-1524 | kt-kernel/examples/modeling_deepseek_v3.py:1772-1777 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1824}}}],"partialFingerprints":{"codehealthFindingId/v1":"82faac757d2c8de7e662c2562dbd4fc5b894774cb4bd9deda06b6b900cc66a96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): archive/kt-sft/ktransformers/util/custom_gguf.py:257-262 | archive/kt-sft/ktransformers/util/custom_gguf.py:309-314 | archive/kt-sft/ktransformers/util/custom_gguf.py:341-346 | archive/kt-sft/ktransformers/util/custom_gguf.py:407-412 | archive/ktransformers/util/custom_gguf.py:264-269 | archive/ktransformers/util/custom_gguf.py:316-321 | archive/ktransformers/util/custom_gguf.py:348-353 | archive/ktransformers/util/custom_gguf.py:414-419 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"833a73d16123e1f4afbc3a99ec4340786887e701206b92ec20a21fa6d2e82c65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:802-809 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:934-941 | archive/ktransformers/models/modeling_deepseek_v3.py:806-813 | archive/ktransformers/models/modeling_deepseek_v3.py:938-945 | kt-kernel/examples/modeling_deepseek_v3.py:799-806 | kt-kernel/examples/modeling_deepseek_v3.py:931-938 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db7feb349240436e16e2a3fb2991c56ab0fb2526b0d495124a32fa196a16fad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:350-355 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:753-758 | archive/kt-sft/ktransformers/operators/attention.py:116-122 | archive/ktransformers/models/modeling_qwen2_moe.py:349-354 | archive/ktransformers/models/modeling_qwen2_moe.py:752-757 | archive/ktransformers/operators/attention.py:115-121 \u2014 there are 6 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3414cde7979782a83b1f1a585a1ed4a05041e233d30125dde3675d8200b82cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): archive/kt-sft/ktransformers/util/utils.py:384-389 | archive/kt-sft/ktransformers/util/utils.py:454-459 | archive/kt-sft/ktransformers/util/utils.py:573-578 | archive/kt-sft/ktransformers/util/utils.py:643-648 | archive/ktransformers/util/utils.py:487-492 | archive/ktransformers/util/utils.py:695-700 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1dc08ef4142f9852fc1c825b0e25e02ddfa4c6abc7dc60c8c78d0fcce5bb37c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): archive/kt-sft/ktransformers/operators/experts.py:1310-1315 | archive/kt-sft/ktransformers/operators/experts.py:1896-1901 | archive/ktransformers/operators/experts.py:699-704 | archive/ktransformers/operators/experts.py:1367-1372 | archive/ktransformers/operators/experts.py:1439-1444 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1310}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ff69cc4ef368c2f41822017d2aa369024130e16c86745f58e6f481518240d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:36-47 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:36-47 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:34-45 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:34-45 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_utils.py:36\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"961c5ba0b054c29ec75cce75aa8d68fce3b8df60a89751f53fde403504a927cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/operators/RoPE.py:105-112 | archive/kt-sft/ktransformers/operators/RoPE.py:408-415 | archive/ktransformers/operators/RoPE.py:106-113 | archive/ktransformers/operators/RoPE.py:409-416 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"36010f0b40b75983df18cb88d397c4c8d6950d39b2ec8da7b3d311472fa9746f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:419-424 | archive/kt-sft/ktransformers/util/modeling_rope_utils.py:533-538 | archive/ktransformers/util/modeling_rope_utils.py:419-424 | archive/ktransformers/util/modeling_rope_utils.py:533-538 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b6bd0e32cff8cc54b944b788ec448899ec86e0169b0c35d474ec49f0cfe17c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py:185-190 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:365-370 | archive/ktransformers/server/backend/interfaces/transformers.py:378-383 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a55ef47c911c0b0aadd20680e68c235e085755b76b57bdf6d12f053ad7b6c86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): archive/kt-sft/ktransformers/util/custom_gguf.py:694-702 | archive/ktransformers/util/custom_gguf.py:741-746 | kt-kernel/python/utils/loader.py:130-135 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c319dfda15af8745c7c4397102064b71408b9ced952de4ecdf279dbd751294f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:806-814 | archive/ktransformers/models/modeling_mixtral.py:805-813 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce38ff998a4f7f53ad71a21c753bc5e8408de17092e4a0719fe204d5dd6046c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:252-257 | archive/ktransformers/models/modeling_qwen2_moe.py:251-256 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab4ce054ac5345847665e124223b60259f32af4cbc799a71b8d1ef5fe765f8d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:887-892 | archive/ktransformers/operators/attention.py:886-891 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"22df443858ed4c8f1ec743a6e089a70fc1c81efee02d33164a03dd6132c31519"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20136 lines \u00D7 4): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:93-98 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:398-399 | archive/ktransformers/operators/balance_serve_attention.py:96-101 | archive/ktransformers/operators/balance_serve_attention.py:401-402 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py:98\u0060 calls \u0060update\u0060, \u0060unsqueeze\u0060 and \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py:399\u0060 does not \u2014 after which the two agree again for 5 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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f5ea16f511089e12939dae1443f870a6a9c8323a1884a15482747fe031cdbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/base_operator.py:22-27 | archive/ktransformers/operators/base_operator.py:22-27 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/base_operator.py\u0060 and \u0060archive/ktransformers/operators/base_operator.py\u0060 as WHOLE FILES: 94% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/base_operator.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"70aee037f8d301e7d65afdc0fcd2fa616c95273137985b1b9c078aaa50cab952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:794-804 | archive/ktransformers/operators/linear.py:809-819 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"659dea38e537f2f579d6d92c9abdbfbbc3a8c810d9163290c4b1f20571cc9857"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/models.py:1608-1613 | archive/ktransformers/models/modeling_smallthinker.py:544-553 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/ktransformers/models/modeling_smallthinker.py:544\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, \u0060archive/ktransformers/models/modeling_smallthinker.py:541\u0060 calls \u0060rotary_emb\u0060 and \u0060archive/kt-sft/ktransformers/operators/models.py:1604\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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"176e10c46858438a8d656288f8c4c07560dcc036655fb0697832378e22af4a0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/args.py:11-24 | archive/ktransformers/server/args.py:15-28 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/args.py\u0060 and \u0060archive/ktransformers/server/args.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2cf8f23fffb9476ab28561fc594045db42af28843059d3fc4fcf6ef6ca9055c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20136 lines \u00D7 3): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:109-114 | archive/ktransformers/server/balance_serve/inference/model_runner.py:156-161 | archive/ktransformers/server/balance_serve/inference/model_runner.py:232-233 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:115\u0060 calls \u0060tensor\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py:234\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5edce73f7b5b8f54c16f57250eb92329a66fd7011ec702c035c9d8bcab6d224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:31-36 | archive/ktransformers/server/balance_serve/inference/query_manager.py:39-44 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/query_manager.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py:31\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ed2758e7ac9fa12f0587bdadd4d6e326e60e380f49878175dd19e555edd9d5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:172-177 | archive/ktransformers/server/balance_serve/sched_rpc.py:203-208 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84b754fc5a62ba2a0bbf9042eea13b6e2dd591f928bcb2e5c7e0ffafcb5a57a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/multi_timer.py:33-38 | archive/ktransformers/server/utils/multi_timer.py:33-38 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/multi_timer.py\u0060 and \u0060archive/ktransformers/server/utils/multi_timer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/multi_timer.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbc3241118c6437f43b4b456319c98c47d9e087eaad3ff692b0a54486d2c0d05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:635-640 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1084-1088 \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 \u0060archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:635\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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"350934b0f5f4797ed47080b0b3dbe52f8347068815495a250aba13194449f069"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1080-1085 | archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1104-1109 \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 \u0060archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py:1080\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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":1080}}}],"partialFingerprints":{"codehealthFindingId/v1":"02fef43aace451e34b53a40e0cceec505fac1386d25fed2c389dd4b5f149fcc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:522-527 | archive/ktransformers/util/custom_gguf.py:529-534 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7861d7d35124a2f20f23471c5877929cf9c45af3e6edd4ad13f84f77e118ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:541-551 | archive/ktransformers/util/custom_gguf.py:548-558 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"39cc9dd1e3493019f0b3eba438d3831be04d2348dcc5c21b273f860bd6f3e476"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:157-162 | archive/ktransformers/util/utils.py:221-226 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/util/utils.py:228\u0060 calls \u0060set\u0060, \u0060replace\u0060 and \u0060archive/kt-sft/ktransformers/util/utils.py:163\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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e950a175cb4cfc777275d62b488e9df752460a94ed1893b3e6d4bb18f3d516e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 6): archive/ktransformers/operators/ascend/ascend_attention.py:251-253 | archive/ktransformers/operators/ascend/ascend_attention.py:411-413 | archive/ktransformers/operators/ascend/ascend_attention.py:738-740 | archive/ktransformers/operators/ascend/ascend_attention.py:846-848 | archive/ktransformers/operators/ascend/ascend_attention.py:1143-1148 | archive/ktransformers/operators/ascend/ascend_attention.py:1256-1261 \u2014 all 6 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 \u0060archive/ktransformers/operators/ascend/ascend_attention.py:1143\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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"b11c76de08791df18174ff9dd7296cb5c5a3566401c9dab32d347d870e3a0d00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/ktransformers/util/custom_gguf.py:696-701 | kt-kernel/python/utils/loader.py:90-97 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b10537ad26d770c13d1a30a4175dfbc0ac5f56cfe1ede322f898073afe1f555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:1441-1446 | kt-kernel/python/cli/commands/model.py:1754-1759 \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":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c394d780d3438879ac4b0f666fb1e041b652dae373922d77cc86242727b063a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): kt-kernel/python/sft/artifacts.py:621-626 | kt-kernel/python/sft/artifacts.py:709-714 \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":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ffb8f06abf73308c9a36e9c4b28155ce69eeda7be89c0a453b6f6198b64104"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): kt-kernel/python/sft/ephemeral.py:78-83 | kt-kernel/python/sft/ephemeral.py:282-287 \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":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bfcfb7cb925d1c4313ba881f101c6081bc3fb1cc8e8b964345d04cc4f949bec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:199-204 | kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:284-289 \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":"kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0df11488c970c63b34ef8669165c17cdb6ece8878f68a9c5497505cc169387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py:297-303 | kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py:287-293 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddaacda8b8718bfc203e36683aa76a0e215d2547b0df236a792d1e9f754c6af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 20): archive/kt-sft/ktransformers/models/modeling_llama.py:410-417 | archive/kt-sft/ktransformers/models/modeling_llama.py:535-545 | archive/kt-sft/ktransformers/models/modeling_llama.py:669-676 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:343-347 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:426-430 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:742-746 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:334-338 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:427-431 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:743-747 | archive/kt-sft/ktransformers/operators/attention.py:818-822 | archive/ktransformers/models/modeling_llama.py:409-416 | archive/ktransformers/models/modeling_llama.py:534-544 | archive/ktransformers/models/modeling_llama.py:668-675 | archive/ktransformers/models/modeling_mixtral.py:342-346 | archive/ktransformers/models/modeling_mixtral.py:425-429 | archive/ktransformers/models/modeling_mixtral.py:741-745 | archive/ktransformers/models/modeling_qwen2_moe.py:333-337 | archive/ktransformers/models/modeling_qwen2_moe.py:426-430 | archive/ktransformers/models/modeling_qwen2_moe.py:742-746 | archive/ktransformers/operators/attention.py:817-821 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/models/modeling_llama.py:410\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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f04f7fba7fad3e739bdb77b040b37049b9334068528e7da8db24699d720d29a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 18): archive/kt-sft/ktransformers/models/modeling_deepseek.py:140-145 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:317-322 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:219-223 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:200-205 | archive/kt-sft/ktransformers/operators/RoPE.py:85-90 | archive/kt-sft/ktransformers/operators/RoPE.py:264-269 | archive/kt-sft/ktransformers/operators/RoPE.py:388-393 | archive/ktransformers/models/modeling_deepseek.py:139-144 | archive/ktransformers/models/modeling_deepseek.py:316-321 | archive/ktransformers/models/modeling_mixtral.py:218-222 | archive/ktransformers/models/modeling_qwen2_moe.py:199-204 | archive/ktransformers/models/modeling_smallthinker.py:421-423 | archive/ktransformers/operators/RoPE.py:86-91 | archive/ktransformers/operators/RoPE.py:265-270 | archive/ktransformers/operators/RoPE.py:389-394 | archive/ktransformers/operators/RoPE.py:478-480 | archive/ktransformers/operators/RoPE.py:520-524 | kt-kernel/examples/torch_attention.py:160-165 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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, \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:322\u0060 calls \u0060autocast\u0060, \u0060transpose\u0060 and \u0060archive/ktransformers/models/modeling_smallthinker.py:423\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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf08e9daf114f431b4fc97f5f820e87653f90c8301be21055bd92cd2a3dae0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 16): archive/kt-sft/ktransformers/models/modeling_deepseek.py:810-815 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:769-774 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:902-907 | archive/kt-sft/ktransformers/operators/attention.py:89-93 | archive/kt-sft/ktransformers/operators/attention.py:209-214 | archive/kt-sft/ktransformers/operators/attention.py:362-367 | archive/kt-sft/ktransformers/operators/attention.py:607-612 | archive/ktransformers/models/modeling_deepseek.py:809-814 | archive/ktransformers/models/modeling_deepseek_v3.py:773-778 | archive/ktransformers/models/modeling_deepseek_v3.py:906-911 | archive/ktransformers/operators/attention.py:88-92 | archive/ktransformers/operators/attention.py:208-213 | archive/ktransformers/operators/attention.py:361-366 | archive/ktransformers/operators/attention.py:606-611 | kt-kernel/examples/modeling_deepseek_v3.py:766-771 | kt-kernel/examples/modeling_deepseek_v3.py:899-904 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:898\u0060 calls \u0060pop\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py:809\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d219a9f76ac99cf64766b0a0125faf55332dea823a9fe7f3d7252cb3a64bcec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 11): archive/kt-sft/ktransformers/models/modeling_deepseek.py:865-873 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:835-843 | archive/kt-sft/ktransformers/models/modeling_llama.py:454-462 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:381-385 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:372-376 | archive/ktransformers/models/modeling_deepseek.py:864-872 | archive/ktransformers/models/modeling_deepseek_v3.py:839-847 | archive/ktransformers/models/modeling_llama.py:453-461 | archive/ktransformers/models/modeling_mixtral.py:380-384 | archive/ktransformers/models/modeling_qwen2_moe.py:371-375 | kt-kernel/examples/modeling_deepseek_v3.py:832-840 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"7356bae81afa1c51f091aed985dd5c73ee5e26dce6caab11e5d4ec911d51af1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 10): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:828-832 | archive/kt-sft/ktransformers/operators/experts.py:1392-1396 | archive/kt-sft/ktransformers/operators/experts.py:1967-1971 | archive/kt-sft/ktransformers/operators/experts.py:2089-2093 | archive/kt-sft/ktransformers/operators/experts.py:2209-2213 | archive/ktransformers/models/modeling_qwen2_moe.py:827-831 | archive/ktransformers/operators/experts.py:780-784 | archive/ktransformers/operators/experts.py:1509-1513 | archive/ktransformers/operators/experts.py:1631-1635 | archive/ktransformers/operators/experts.py:1994-1998 \u2014 there are 10 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/operators/experts.py:2001\u0060 calls \u0060sum\u0060 and \u0060archive/kt-sft/ktransformers/operators/experts.py:1974\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"0418f2dbb64696b4f1b528a3992025ecee3df8acb886c48ecbe58e354b28e9fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): archive/kt-sft/ktransformers/models/modeling_llama.py:452-459 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:379-384 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:370-375 | archive/kt-sft/ktransformers/operators/attention.py:975-979 | archive/ktransformers/models/modeling_llama.py:451-458 | archive/ktransformers/models/modeling_mixtral.py:378-383 | archive/ktransformers/models/modeling_qwen2_moe.py:369-374 | archive/ktransformers/models/modeling_smallthinker.py:227-231 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"749ff0fe9ce4208fa7e7f6a7dab90e7e7df730ce4a3ec049c7525725a2d26555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 12): archive/kt-sft/ktransformers/models/modeling_deepseek.py:844-848 | archive/kt-sft/ktransformers/models/modeling_deepseek.py:962-966 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:808-809 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:940-941 | archive/kt-sft/ktransformers/operators/attention.py:653-657 | archive/ktransformers/models/modeling_deepseek.py:843-847 | archive/ktransformers/models/modeling_deepseek.py:961-965 | archive/ktransformers/models/modeling_deepseek_v3.py:812-813 | archive/ktransformers/models/modeling_deepseek_v3.py:944-945 | archive/ktransformers/operators/attention.py:652-656 | kt-kernel/examples/modeling_deepseek_v3.py:805-806 | kt-kernel/examples/modeling_deepseek_v3.py:937-938 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/attention.py:653\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4681bd3a8813df582957ac4ab4aed3db8510b693dcd9545697e0faf10d81322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): archive/kt-sft/ktransformers/operators/attention.py:401-409 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:100-104 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:400-407 | archive/ktransformers/operators/attention.py:400-408 | archive/ktransformers/operators/balance_serve_attention.py:103-107 | archive/ktransformers/operators/balance_serve_attention.py:403-410 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d2a2900edd872967ba223327c118d88dc5f4f939adf359ae1ff63ff737d92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:126-131 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:186-191 | archive/ktransformers/models/modeling_deepseek.py:125-130 | archive/ktransformers/models/modeling_qwen2_moe.py:185-190 | kt-kernel/examples/torch_attention.py:146-151 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 412 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"249f35d2cb42245d16878b7bd442017b9d79cca561de20e4455ef620b056bd02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): archive/kt-sft/ktransformers/util/utils.py:497-501 | archive/kt-sft/ktransformers/util/utils.py:685-689 | archive/ktransformers/util/utils.py:537-542 | archive/ktransformers/util/utils.py:569-573 | archive/ktransformers/util/utils.py:743-747 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"6baea169e7780e689bdd590a90d760aacd98ec089eadc34fae44bcc9da8826d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:72-78 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:72-78 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:70-76 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:70-76 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"450e43d460aaa3cbfb74b67dcf0b703b0d0d8311d34dbf2620b3f1d6d36bb369"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py:72-82 | archive/ktransformers/ktransformers_ext/triton/fp8gemm.py:72-82 | kt-kernel/scripts/convert_cpu_weights.py:35-45 | kt-kernel/scripts/convert_cpu_weights_ds4.py:35-45 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 and \u0060archive/ktransformers/ktransformers_ext/triton/fp8gemm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9a4923ee77b2b5fc18404888cde4fd9d30cc06ccd34c960b007cc6c8add1c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): archive/kt-sft/ktransformers/operators/balance_serve_attention.py:46-59 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:310-323 | archive/ktransformers/operators/balance_serve_attention.py:49-62 | archive/ktransformers/operators/balance_serve_attention.py:313-326 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/balance_serve_attention.py\u0060 and \u0060archive/ktransformers/operators/balance_serve_attention.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a941f9c8b7ddd551f73a7ac31cb1c79a34726837e6fbbe5c3a5cb9e4ffdbf4b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:288-292 | archive/kt-sft/ktransformers/operators/experts.py:322-326 | archive/ktransformers/operators/experts.py:302-306 | archive/ktransformers/operators/experts.py:336-340 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/operators/experts.py:288\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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"889a61242dee00e0c118f38319b696a0e0f68286dbac067afd9aaf81ce104230"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/operators/experts.py:1394-1398 | archive/kt-sft/ktransformers/operators/experts.py:1698-1702 | archive/ktransformers/operators/experts.py:782-786 | archive/ktransformers/operators/experts.py:1088-1092 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1394}}}],"partialFingerprints":{"codehealthFindingId/v1":"2833dfb7014307ad6ffb4d6b851c3c479a226a063e4d165f243cb982270bfef6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:32-39 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:95-102 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:37-44 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:100-107 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:103\u0060 calls \u0060tensor\u0060 and \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:40\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4698e15ebf0426d00da9fbbe16b95a136ad9a83cd43ce98dc28b629bb66e8bdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:84-88 | archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py:148-152 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:89-93 | archive/ktransformers/server/balance_serve/inference/forward_batch.py:153-157 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/forward_batch.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe153793175897880ca467d1bd0cdd497cf89ed06ffa9d643d1c64695daf3f3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): archive/kt-sft/ktransformers/util/custom_gguf.py:465-470 | archive/kt-sft/ktransformers/util/custom_gguf.py:506-511 | archive/ktransformers/util/custom_gguf.py:472-477 | archive/ktransformers/util/custom_gguf.py:513-518 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"941d14c63efb2db35c2760395935c8b992d3977f4f87be51a891dedf6eb3c6a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek.py:114-118 | archive/ktransformers/models/modeling_deepseek.py:113-117 | kt-kernel/examples/torch_attention.py:137-141 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed5b83b8a8c8018d43f1efc81c17619baf7487abdc688422dbaa6f0a38af740"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): archive/kt-sft/ktransformers/operators/experts.py:1787-1792 | archive/ktransformers/operators/experts.py:1177-1182 | archive/ktransformers/operators/experts.py:1874-1878 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da6a799749bcaef1358d052a2abb2410147e9d233d93ae83862fea26197a2ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): archive/kt-sft/ktransformers/util/utils.py:485-499 | archive/kt-sft/ktransformers/util/utils.py:673-687 | archive/ktransformers/util/utils.py:731-745 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3f52e7ef2667035363e35739def6e29994dcbfe16bb5b2c5bc270d429e6bdc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:204-208 | archive/ktransformers/models/modeling_mixtral.py:203-207 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb456dac54c3be521b29b1090aaa4cc91066fc1511ee6e050ce3d255ca7ca6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1095-1100 | archive/ktransformers/operators/experts.py:635-640 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/operators/experts.py:1103\u0060 calls \u0060time\u0060 and \u0060archive/ktransformers/operators/experts.py:644\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c9a96198453e4b45ae363556ae801bda1c4ec2552d16ecd0a27fed6167cc0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:1488-1494 | archive/ktransformers/operators/experts.py:876-882 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1488}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d7d5fc2076543bd64384310e80e268b181b7815b5e77feb0ee118700079caa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:100-105 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:107-112 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c82de9f2f697097830dbdf0d5dc1629f32873bb0d67535b6df1e5bb34780107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/optimize/optimize.py:47-53 | archive/ktransformers/optimize/optimize.py:59-65 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/optimize/optimize.py\u0060 and \u0060archive/ktransformers/optimize/optimize.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dbdaf7e7cee80a7aff4ba64492edbe4d1818cabd54c821b8bd8b53d474aa00f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:120-125 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:120-125 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f457e0346ebaecc6b2e42fc46e93cd10d7da2a680e71baa79b65dc587188c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:194-201 | archive/ktransformers/server/balance_serve/inference/model_runner.py:297-304 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:189\u0060 calls \u0060batch_embeddings\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py:294\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fa49b971c4e82dbe0d8a25968670ff7002eef66499cb2b488c1a8f2323fa49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:208-212 | archive/ktransformers/server/balance_serve/inference/model_runner.py:321-325 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:207\u0060 calls \u0060fill_\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py:320\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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fec657b49b7447c6f2b6366814ee4604c2134d1ba90a183973419b9ec0c0c26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/messages.py:130-139 | archive/ktransformers/server/schemas/assistants/messages.py:130-139 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/messages.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"426bd265495dbe95fd2536b35b02f321406dca272cae9b250d866e5223168018"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/multi_timer.py:49-55 | archive/ktransformers/server/utils/multi_timer.py:49-55 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/multi_timer.py\u0060 and \u0060archive/ktransformers/server/utils/multi_timer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/multi_timer.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"8336ee462f9baf23d8113777ebffb5b810db23368f9fd165e135e7e86f49264a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:382-387 | archive/ktransformers/util/custom_gguf.py:389-394 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"770d2f6403aa0261cce430f4c003310b4e43088f912edc09435cadd9bcd8e675"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:170-174 | archive/ktransformers/util/utils.py:235-239 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/kt-sft/ktransformers/util/utils.py:176\u0060 calls \u0060translate_adapter_name_to_gguf\u0060 and \u0060archive/ktransformers/util/utils.py:242\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb66c87a4e60f3c147755a0f38cdbeee32d7a33e311d643f5a234bbcaa6b6a9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:152-174 | archive/ktransformers/operators/ascend/ascend_attention.py:594-617 \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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"2421ef7c5ff49244abf65c1161efb2dfc8de608e06d0cef355bdb8fda6b6881b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 4): archive/ktransformers/operators/ascend/ascend_attention.py:248-251 | archive/ktransformers/operators/ascend/ascend_attention.py:406-410 | archive/ktransformers/operators/ascend/ascend_attention.py:736-738 | archive/ktransformers/operators/ascend/ascend_attention.py:841-845 \u2014 all 4 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 \u0060archive/ktransformers/operators/ascend/ascend_attention.py:248\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/ktransformers/operators/ascend/ascend_attention.py:410\u0060 calls \u0060contiguous\u0060, \u0060view\u0060 and \u0060archive/ktransformers/operators/ascend/ascend_attention.py:251\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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"9574b7d7d8de436e69faf2d44cd94ab79620de1aeaedbc971bc28124947e5ce3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/ktransformers/operators/balance_serve_attention.py:518-522 | archive/ktransformers/operators/balance_serve_attention.py:735-741 \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"934dcf31486911550d9a279d6d1a4acc183ebe6a66aa2da0a2076e11a1b09b80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:247-251 | kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py:319-323 \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":"kt-kernel/tools/ascendc_mxfp4/mxfp4_fused_op.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"d214cce8ec07f1d9735107bfbc037617320866183c42bf41fd352c5216438f73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/operators/mlp.py:17-37 | archive/ktransformers/operators/mlp.py:19-70 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/mlp.py\u0060 and \u0060archive/ktransformers/operators/mlp.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/mlp.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7eea09064dd7e2d7a07bdbc637fd166b3f73d8f3c1d7bff222cdfb767540da7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/messages.py:17-54 | archive/ktransformers/server/api/openai/assistants/messages.py:17-54 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/messages.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/messages.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce540f352820e42819fc918712d813926e2a66df71f49dc098bd60a7c60ec345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/threads.py:15-36 | archive/ktransformers/server/api/openai/assistants/threads.py:15-36 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/threads.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/threads.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e6a195beb037f7ad8f0a996550bd7d26f08ffec3a750f49f4038483289b98b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/communication_op.py:16-39 | archive/ktransformers/server/balance_serve/inference/distributed/communication_op.py:16-39 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/communication_op.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/communication_op.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/communication_op.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2f65208e050ec51a270e8638923e05663f908ffd573085c9071c2ec64f4c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/server/exceptions.py:5-23 | archive/ktransformers/server/exceptions.py:5-23 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/exceptions.py\u0060 and \u0060archive/ktransformers/server/exceptions.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/exceptions.py"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0aeeed36404cefd980102c95869c0cf4c8349c086834aa9b0953f45c7e2550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (107 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/runs.py:85-191 | archive/ktransformers/server/schemas/assistants/runs.py:85-191 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"099dceace6fd3ab125c8942515224b0698b7a5c82cd35e990f9a167d7438f979"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/threads.py:17-38 | archive/ktransformers/server/schemas/assistants/threads.py:17-38 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/threads.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/threads.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0da5fc548865b8ea1aef532f3e897c043c958181017cdcb1de0e06d8b7a900e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/legacy/completions.py:17-51 | archive/ktransformers/server/schemas/legacy/completions.py:17-51 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/legacy/completions.py\u0060 and \u0060archive/ktransformers/server/schemas/legacy/completions.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/legacy/completions.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e294f6a193bdb6d95af3da15313b2515e3e654aec4e4d08aa4ac09f2ec4d647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:120-124 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:120-124 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:156-160 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:156-160 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c29436b192f17d1c7ba30f6f0e3d2bcda342a3fcbf7cd7425eb93441e4444b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): archive/csrc/custom_marlin/utils/marlin_utils.py:226-234 | archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py:226-234 | archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:262-270 | archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py:262-270 \u2014 before extracting anything, compare \u0060archive/csrc/custom_marlin/utils/marlin_utils.py\u0060 and \u0060archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/custom_marlin/utils/marlin_utils.py:226\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":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d37e11067883a308cb61b1ca6018c4fce2cb2b30bfa5ab790cce955acf7bb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:206-213 | archive/ktransformers/models/custom_cache.py:396-403 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"2567170d77f2c2d915a480cadf45e9eea67903e4420dff25a47f4d6638a28497"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:218-222 | archive/ktransformers/models/custom_cache.py:408-412 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d835f591f97ab25762e85317827242c379afa4c616a23ec1c4eab996db97fef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_cache.py:287-293 | archive/ktransformers/models/custom_cache.py:477-483 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_cache.py\u0060 and \u0060archive/ktransformers/models/custom_cache.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"824bc079e562ee60cf446569f9378cc5ba4b91559fa50cf00151ecb37cd9e13a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py:31-37 | archive/ktransformers/models/custom_modeling_deepseek_v2.py:31-37 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_deepseek_v2.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"3640819f53d8fe6056ed07bd1278a3f54e17f056cec544d37c1790895b92fee0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py:36-41 | archive/ktransformers/models/custom_modeling_deepseek_v3.py:36-41 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/custom_modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"66296feda94f775a0d0e4d5d19099262a817919848247a0442dbabf4c3b13115"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:105-111 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:99-105 | archive/ktransformers/models/modeling_deepseek.py:104-110 | archive/ktransformers/models/modeling_deepseek_v3.py:103-109 | kt-kernel/examples/modeling_deepseek_v3.py:96-102 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7216a5c0afe11e54c92b13e539a88be7baf1a26bddd69b29d323b0c5a9610ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_deepseek.py:235-241 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:242-248 | archive/ktransformers/models/modeling_deepseek.py:234-240 | archive/ktransformers/models/modeling_deepseek_v3.py:246-252 | kt-kernel/examples/modeling_deepseek_v3.py:239-245 | kt-kernel/examples/torch_attention.py:228-234 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d153c71d498b439b6ab65a16ed8f0b750037ce0be2cc410f6bcd495a882faa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): archive/kt-sft/ktransformers/models/modeling_deepseek.py:251-256 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:258-263 | archive/ktransformers/models/modeling_deepseek.py:250-255 | archive/ktransformers/models/modeling_deepseek_v3.py:262-267 | kt-kernel/examples/modeling_deepseek_v3.py:255-260 | kt-kernel/examples/torch_attention.py:237-242 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9bd14ee77b4cf22ca440c207082d3ab9f291eb0807f0a15dcd8d5c9f2e54bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): archive/kt-sft/ktransformers/models/modeling_deepseek.py:789-793 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:748-752 | archive/ktransformers/models/modeling_deepseek.py:788-792 | archive/ktransformers/models/modeling_deepseek_v3.py:752-756 | kt-kernel/examples/modeling_deepseek_v3.py:745-749 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9013ff55b65059c42ffefcf410a53b2a3db8edc54f0c138bf0335e966ed10eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1649-1655 | archive/ktransformers/models/modeling_deepseek.py:1648-1654 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1649}}}],"partialFingerprints":{"codehealthFindingId/v1":"543255479d6685e3fffa9e9d888517b5990799f68fdadeef6c7ab9765c02cc30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1856-1864 | archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1801-1809 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1552-1557 | archive/ktransformers/models/modeling_deepseek.py:1852-1860 | archive/ktransformers/models/modeling_deepseek_v3.py:1815-1823 | archive/ktransformers/models/modeling_qwen2_moe.py:1551-1556 | kt-kernel/examples/modeling_deepseek_v3.py:1797-1805 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 55 separate duplicated blocks between them, totalling at least 1085 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1856}}}],"partialFingerprints":{"codehealthFindingId/v1":"65930dc6d0fad981937643dac6ea2dba75cf7e95b9adc989e03d56822b6ae1f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_deepseek.py:1884-1890 | archive/ktransformers/models/modeling_deepseek.py:1880-1886 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek.py\u0060 as WHOLE FILES: this scan already matched 79 separate duplicated blocks between them, totalling at least 1763 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1884}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0df66341a542de36a2abd5025d21683012ae50d5aa618fdbb736fc8133a606"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 18): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:108-112 | archive/kt-sft/ktransformers/models/modeling_llama.py:69-73 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:190-194 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:177-181 | archive/kt-sft/ktransformers/operators/layernorm.py:77-81 | archive/kt-sft/ktransformers/operators/layernorm.py:118-122 | archive/kt-sft/ktransformers/operators/layernorm.py:162-166 | archive/ktransformers/models/modeling_deepseek_v3.py:112-116 | archive/ktransformers/models/modeling_llama.py:68-72 | archive/ktransformers/models/modeling_mixtral.py:189-193 | archive/ktransformers/models/modeling_qwen2_moe.py:176-180 | archive/ktransformers/models/modeling_smallthinker.py:157-161 | archive/ktransformers/operators/layernorm.py:80-84 | archive/ktransformers/operators/layernorm.py:121-125 | archive/ktransformers/operators/layernorm.py:165-169 | archive/ktransformers/operators/layernorm.py:242-246 | archive/ktransformers/operators/layernorm.py:285-289 | kt-kernel/examples/modeling_deepseek_v3.py:105-109 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 391 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e891869b58141838614d77f51d7370a646e926daa2a08eb723521e9c73e1c0ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:281-287 | archive/ktransformers/models/modeling_deepseek_v3.py:285-291 | kt-kernel/examples/modeling_deepseek_v3.py:278-284 | kt-kernel/examples/torch_attention.py:264-270 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3f586b7dc3e6c93b0332bb0166a48add907935ef74727559d8248ee167a145"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1608-1614 | archive/ktransformers/models/modeling_deepseek_v3.py:1614-1620 | kt-kernel/examples/modeling_deepseek_v3.py:1605-1611 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb36d0ada60568adea4e4554ff319c155f4bb9dede7e5936edb3f36a219d2907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:1829-1835 | archive/ktransformers/models/modeling_deepseek_v3.py:1843-1849 | kt-kernel/examples/modeling_deepseek_v3.py:1825-1831 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py\u0060 and \u0060archive/ktransformers/models/modeling_deepseek_v3.py\u0060 as WHOLE FILES: this scan already matched 76 separate duplicated blocks between them, totalling at least 1672 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c37e902fa24e8468a168f4dc7455753bab12e93763200bcad81169a67bddb35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 15): archive/kt-sft/ktransformers/models/modeling_llama.py:224-247 | archive/kt-sft/ktransformers/models/modeling_mixtral.py:242-267 | archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:223-246 | archive/kt-sft/ktransformers/operators/attention.py:762-785 | archive/kt-sft/ktransformers/operators/attention.py:1005-1028 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:135-158 | archive/kt-sft/ktransformers/operators/balance_serve_attention.py:221-244 | archive/ktransformers/models/modeling_llama.py:223-246 | archive/ktransformers/models/modeling_mixtral.py:241-266 | archive/ktransformers/models/modeling_qwen2_moe.py:222-245 | archive/ktransformers/models/modeling_smallthinker.py:175-198 | archive/ktransformers/operators/attention.py:761-784 | archive/ktransformers/operators/balance_serve_attention.py:138-161 | archive/ktransformers/operators/balance_serve_attention.py:224-247 | archive/ktransformers/operators/balance_serve_attention.py:478-501 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 527 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"a590efa56befa55c2662a10e397e9ad26f7041099c45fb3646efb52f85fbdf37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1241-1247 | archive/ktransformers/models/modeling_llama.py:1240-1246 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ed26a8356c3cfec5020ed72f4d2d225788dc469f17e25915c6f4c12f8e9351"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1443-1449 | archive/ktransformers/models/modeling_llama.py:1442-1448 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1443}}}],"partialFingerprints":{"codehealthFindingId/v1":"e01263d0d084356670a413a04eb98cbacecf45cccc0334bdab09046ce0b7ef9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_llama.py:1573-1578 | archive/ktransformers/models/modeling_llama.py:1572-1577 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_llama.py\u0060 and \u0060archive/ktransformers/models/modeling_llama.py\u0060 as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 1478 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1573}}}],"partialFingerprints":{"codehealthFindingId/v1":"d934c37b350beb8ceaba398c4c9205be8367d56b1b02f0290b85b385d9fdce38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_mixtral.py:1548-1554 | archive/ktransformers/models/modeling_mixtral.py:1547-1553 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_mixtral.py\u0060 and \u0060archive/ktransformers/models/modeling_mixtral.py\u0060 as WHOLE FILES: this scan already matched 63 separate duplicated blocks between them, totalling at least 1409 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69eb197cc791951950b13304c84c149eeb7216b3c6e736dd4579a0fe64b9a18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:1578-1584 | archive/ktransformers/models/modeling_qwen2_moe.py:1577-1583 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py\u0060 and \u0060archive/ktransformers/models/modeling_qwen2_moe.py\u0060 as WHOLE FILES: this scan already matched 69 separate duplicated blocks between them, totalling at least 1540 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87595fa90a914a214c3eee26ef9311c3ddb8c8feffdacc74058ccaa0553d46e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:45-52 | archive/ktransformers/operators/RoPE.py:46-53 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e977b6a19c590e04dbba6859ddeda0a2e59e5d31fa77d88a8408a6697239d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/operators/RoPE.py:75-79 | archive/kt-sft/ktransformers/operators/RoPE.py:233-237 | archive/ktransformers/operators/RoPE.py:76-80 | archive/ktransformers/operators/RoPE.py:234-238 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdfc2138f74c100793ed79918b0a8dc3da616c3a23e62331cfa1a9b474effa26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): archive/kt-sft/ktransformers/operators/RoPE.py:98-103 | archive/kt-sft/ktransformers/operators/RoPE.py:401-406 | archive/ktransformers/operators/RoPE.py:99-104 | archive/ktransformers/operators/RoPE.py:402-407 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"6508886f5f81bb87c0c1be0232a67a870b24d5986f79c3330127fd2df9ebac6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:141-149 | archive/ktransformers/operators/RoPE.py:142-150 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c99b7f0f37699cd34a691e0088e3f398ba0d9faa87ab0255984d1fde69362be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:340-351 | archive/ktransformers/operators/RoPE.py:341-352 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"458cf87a69c9ac552fb2811bd5c28e069f89d41b2469fa4ccf00c2be7af2a220"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:354-362 | archive/ktransformers/operators/RoPE.py:355-363 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"26353a3671600071986961dc959c4df0f93aade6a9562cab7304c689c887794e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/operators/RoPE.py:429-436 | archive/ktransformers/operators/RoPE.py:430-437 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/RoPE.py\u0060 and \u0060archive/ktransformers/operators/RoPE.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a97575ccdb69f89a8a9434cd49ab9cfb47a972f2ca426d198b0e4b9a8daf7a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:63-68 | archive/ktransformers/operators/attention.py:62-67 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"26b259ff9ef139e840539a31c53991ed69f5180cb9dd0bd978f03a8c292bfc94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/base_operator.py:52-58 | archive/ktransformers/operators/base_operator.py:52-56 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/base_operator.py\u0060 and \u0060archive/ktransformers/operators/base_operator.py\u0060 as WHOLE FILES: 94% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/base_operator.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"14932ce0c834bb1cec3b43957dda6f40c7db415a17d602477de59a26669c4764"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:538-548 | archive/ktransformers/operators/cpuinfer.py:538-548 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15f9b52dc043c1bd0048f8983650548d4d19ff2d6b5751703d19427c9219d3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:573-582 | archive/ktransformers/operators/cpuinfer.py:573-582 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee098f032b9896548764fbdf5351b2f3f436f6b3cd14812b751cfe51d89d12e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:594-604 | archive/ktransformers/operators/cpuinfer.py:594-604 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"877cbbd4d506b8ebbc6393dd06ed01c8bb8c80760cffa799c58d43f22407132a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/operators/cpuinfer.py:615-624 | archive/ktransformers/operators/cpuinfer.py:615-624 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/cpuinfer.py\u0060 and \u0060archive/ktransformers/operators/cpuinfer.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 443 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38c150c2304f4256ca2e3130303f6df6138abefb76dd5b056209fb1b68a41bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:163-167 | archive/ktransformers/operators/experts.py:163-167 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dbb414b22a5605930eb013e9f2dc7801cbb2aa275161ac64c75dc339a1dd1ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:922-926 | archive/ktransformers/operators/experts.py:500-504 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85db285a97f386717ce8458bf3e45cc08de92e3c181189482566282ef2d2c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): archive/kt-sft/ktransformers/operators/experts.py:1344-1348 | archive/kt-sft/ktransformers/operators/experts.py:1930-1934 | archive/ktransformers/operators/experts.py:733-737 | archive/ktransformers/operators/experts.py:1326-1330 | archive/ktransformers/operators/experts.py:1399-1403 | archive/ktransformers/operators/experts.py:1471-1475 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1344}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea97b3cbb1a6dc1c7127f869b1c707cfe067e9433d8cb1e1530838c3b546fa89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py:181-195 | archive/ktransformers/operators/flashinfer_wrapper.py:189-203 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"42e9d1e4d45bc0b34e40dacd9583938f858dff1318aa4dde2100c003bec2eaeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/gate.py:24-29 | archive/ktransformers/operators/gate.py:24-29 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/gate.py\u0060 and \u0060archive/ktransformers/operators/gate.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/gate.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55d73f879f7c6caa1662675fd0779053b8b771f587a6aca91ef66e7f7348d61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/layernorm.py:215-220 | archive/ktransformers/operators/layernorm.py:340-345 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/layernorm.py\u0060 and \u0060archive/ktransformers/operators/layernorm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/layernorm.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"563e254742394eeb3fcfb47bf2a866625b27ce753b31363e4dc52fd1e9333cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:152-156 | archive/ktransformers/operators/linear.py:168-172 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b100206d8fcca6ce2c5c6a66bf2bd347114d61dc68d85fd3228acdde531cc80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:215-222 | archive/ktransformers/operators/linear.py:228-235 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"745e52e4349cf4d07bf0bd68483d24373ced1e81be009165fecaf61af1c1b60d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:362-370 | archive/ktransformers/operators/linear.py:377-385 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"4734f9b5833c9293cc659badc231eb6d2e8c6b284954fd3b7068012a8d2a9ac2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:395-399 | archive/ktransformers/operators/linear.py:410-414 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"123c90add858cd052fdc668207d591926eff4a286d6be0fed8f295cc6f189473"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): archive/kt-sft/ktransformers/operators/linear.py:551-557 | archive/kt-sft/ktransformers/operators/linear.py:700-706 | archive/ktransformers/operators/linear.py:566-572 | archive/ktransformers/operators/linear.py:715-721 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d879113cad14e12d532897a64c66a3ae5a603b81cd3fe408c5e95829baeead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/operators/linear.py:823-829 | archive/ktransformers/operators/linear.py:838-844 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":823}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92757f0158f3ed763ab319a3119cb20a4200461e6c179dca2e393dc4fbd4693"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): archive/kt-sft/ktransformers/operators/linear.py:963-967 | archive/ktransformers/operators/ascend/ascend_linear.py:273-277 | archive/ktransformers/operators/linear.py:967-971 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 570 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff939929ecb3e26feb06d9f9c2cf44954bf541db066beda437d00a8daaf88d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): archive/kt-sft/ktransformers/operators/models.py:207-212 | archive/kt-sft/ktransformers/operators/models.py:569-574 | archive/ktransformers/operators/models.py:204-209 | archive/ktransformers/operators/models.py:566-571 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/models.py\u0060 and \u0060archive/ktransformers/operators/models.py\u0060 as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 1158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9e754ecee1decd4d82b8dd31e1284b57ae0db2c6e7a8555cc2383fca0668f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): archive/kt-sft/ktransformers/operators/triton_attention.py:371-385 | archive/ktransformers/operators/triton_attention.py:371-385 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/triton_attention.py\u0060 and \u0060archive/ktransformers/operators/triton_attention.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68b8b02b24b7b47cdd3f12310e7a17247c7e0785439bdb30915787aa73e1f69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/ollama/completions.py:268-283 | archive/ktransformers/server/api/ollama/completions.py:269-284 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/ollama/completions.py\u0060 and \u0060archive/ktransformers/server/api/ollama/completions.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dec56b7ede8535de4a3542a45cf785a6c8f0cfdd1deddeb78ff67c6e39c22ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py:75-83 | archive/ktransformers/server/api/openai/assistants/assistants.py:75-83 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/api/openai/assistants/assistants.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/assistants/assistants.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b695280f228f7b1524ddc8278dbf61c14b2d4b54020e76c205f7a00d3b889a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/context_manager.py:58-64 | archive/ktransformers/server/backend/context_manager.py:58-64 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/context_manager.py\u0060 and \u0060archive/ktransformers/server/backend/context_manager.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/context_manager.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4f2e06a3f057f3cca6552f2478c97c255dd331bc1989eb395786f4bb16e279a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:268-272 | archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:123-127 | archive/ktransformers/server/backend/interfaces/balance_serve.py:385-389 | archive/ktransformers/server/backend/interfaces/transformers.py:133-137 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c6de10ee18defadce7b272204fdbfdf560c20199ab2d94d148d8b1971b221b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:40-47 | archive/kt-sft/ktransformers/util/textstream.py:5-12 | archive/ktransformers/server/backend/interfaces/transformers.py:50-57 | archive/ktransformers/util/textstream.py:5-12 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/kt-sft/ktransformers/util/textstream.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55079f99f9a5eadc5ea65bcd499b504c59e52e95af96cc8ae5ead2d08c6e815"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:84-94 | archive/kt-sft/ktransformers/util/textstream.py:50-60 | archive/ktransformers/server/backend/interfaces/transformers.py:94-104 | archive/ktransformers/util/textstream.py:50-60 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/kt-sft/ktransformers/util/textstream.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe19f8d4970209c090738d2ea1135e18c6ecc2e9a9bb32999ee5e8d654d625f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py:428-438 | archive/ktransformers/server/backend/interfaces/transformers.py:446-456 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/transformers.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"515b7527d1aaaa5592bf0b4df9bfbd64ca37c6b0e80cb1422590b7448b5d6eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/config.py:136-141 | archive/ktransformers/server/balance_serve/inference/config.py:138-143 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/config.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/config.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"747681803c61b4d551c1d805cba2187f118a01b4ad109dde7b5bea7c7bd5fe1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:164-168 | archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py:164-168 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/cuda_wrapper.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a82c1c7463eef5bbaa7ff957ee98da5cad298a6eae295c6c1aa6f05b1de9df9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:26-34 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:26-34 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf951cbeb1534b05041891dac77dc38e42484c34676cafe037f161b05f25d9ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:245-257 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:245-257 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1aedfa789e7c1c1847779adaaf468f4a6107a3c35cd0b7972183107700bd1a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:303-307 | archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py:303-307 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"40b3f90747a2382b1cd1c45d6a1088c12a3c231916729f2815dabb38f6e34590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:80-89 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:80-89 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3eaa4fe2515e66d753e3625efe7e91f8a1ff7fe494d6a2008d76585de1b9f40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:407-412 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:407-412 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"655534fb8370d7e3b33c8737b8248c0c7c23d8ededea553d8585db4793da3aca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:415-419 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:415-419 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"9276cf67ae7d2c7f3dbaafeb5cf98849bddad05a35a9c9b6ae9cc294c1054f35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:500-512 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:500-512 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"bae8f404a1365033482016b72c5672af00b3830669a23071a0efadd09960076a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:541-553 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:541-553 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e2f0a1dab38b426e06edb1f5ad189e77081ed21e48dddcc9826c4c1252309a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:878-888 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:878-888 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"490bde4cd3097510383c03d5ba8d7d0a3eaf3c8fd6df484545367b694b6fed95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:899-912 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:899-912 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"473a2d4c1077437ba066c26e8206a6ad68c31a97b0b39eb3bba284a0794fc743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1130-1150 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1130-1150 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd2b6b7b6378e959ddde314288fc94434dffaea410bcad9c73ae409e4f77638a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1186-1196 | archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py:1186-1196 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 863 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1186}}}],"partialFingerprints":{"codehealthFindingId/v1":"336252d5fdf5f211108864fa4761aec81de9b9381a87dff83c9646234fa5204f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py:183-201 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py:183-201 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"e523c05a76ed2129246c7641fd199cdda27fe0d3b83f2e29c0b04df0574df871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:241-245 | archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py:241-245 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/pynccl_wrapper.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"6019d6b12cc5bb3a07c3ad6207ecc6d28a3368555decd9ac944ce3a3b8e45d79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:36-56 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:36-56 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a88c81fdf4e3dd6705c570f2a3a073871c4a3b9d8d3aca006bf3afaf0bdc748"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:128-136 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:128-136 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"a188f180c55ee3691258598e27354d9d151b784537d65fe55affdbd2c709209e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:139-144 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:139-144 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e57aa7e3e0b6b2f018f6ea30c4ac28ebac3e9c6c8d0e4d754ad1870bbd478e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:177-182 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:177-182 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f328c75633b5aabd80f0cfdc5490b8fb537d9408044d4947fe7521f505f3a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py:192-219 | archive/ktransformers/server/balance_serve/inference/distributed/utils.py:192-219 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/distributed/utils.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/utils.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd89e2d9c17e708a246a216309b0567c383b52999ef352b1ccf31c8155def671"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:63-72 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:63-72 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"74328735edad6b952b619ce29be984f770e95b0beea3a3cc9e0f53f6ba477014"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:80-92 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:80-92 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b72ce0724c2b2cfba908ce5f3ff7436193ddb9ea35626b5cb186f76500d9655"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:192-202 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:192-202 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d8d9bede12c117e710d920a206cff44045fc40b7dfb5df81dfaf0cc5df2d9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:308-313 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py:308-313 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"909c5b6dc9aebc38614971b12aed28ad4e071aec80d3d5f22deb80e8825e0866"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py:74-80 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py:74-80 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/frequency_penalty.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5596125a609a85ef22e403ae81b852b36883f8de37af24405850e01aa6f8b718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py:73-79 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py:73-79 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/presence_penalty.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"f092d317fca22b228dc2b6d4e531a863bf1a5db9d45c78380426c6f49c80cc08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py:77-83 | archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py:77-83 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/repetition_penalty.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"541cadddcf080d94e2f3ab358f4d64e7732d78118f0c67c51f28ad9f1c07509c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py:131-136 | archive/ktransformers/server/balance_serve/sched_rpc.py:162-167 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py\u0060 and \u0060archive/ktransformers/server/balance_serve/sched_rpc.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"52e3cdb7d1e338c0c9c7729a3d965ae503ec2d5b8ecf4b9f968d9e4ccb4dc2cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/config/config.py:54-59 | archive/ktransformers/server/config/config.py:54-59 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/config/config.py\u0060 and \u0060archive/ktransformers/server/config/config.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/config.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a38042bccb067fb31a3a8f0f121375e1a8f7598c3db33c538754c6526a8eaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/assistants.py:17-23 | archive/ktransformers/server/crud/assistants/assistants.py:17-23 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/assistants.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"787bc66caf9e38cdb77f89cd349677d4bfbd2256bfb8bbdcae7ba6686b925a53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/assistants.py:45-51 | archive/ktransformers/server/crud/assistants/assistants.py:45-51 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/assistants.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e8951ca377c420408485f75433e0aab9a149aebcdc9604b4199e1fbec16de8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/assistants.py:54-58 | archive/ktransformers/server/crud/assistants/assistants.py:54-58 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/assistants.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ec7a636098fc386b8818f3f58edaf053c9010cecbb94b9b7262c848d404ee4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/assistants.py:61-65 | archive/ktransformers/server/crud/assistants/assistants.py:61-65 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/assistants.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f71d0b47629f08abf94a55cc61df4ab7342ba26e2fdb67fb955c7c4331b076"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:28-32 | archive/ktransformers/server/crud/assistants/messages.py:28-32 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc1e0e5134a3c544cc0798ad21bb2205a3c0a56c76603c6430d0d2d741a1a306"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:36-45 | archive/ktransformers/server/crud/assistants/messages.py:36-45 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6495e64203f43a3f9c8e49523e12d6909d099345b7b7d9d2d044b1e657e82dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:48-52 | archive/ktransformers/server/crud/assistants/messages.py:48-52 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6023138783a0dd60733fcb473a8eda75aff7e349c73ec5616a3e211ef77b27c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:73-78 | archive/ktransformers/server/crud/assistants/messages.py:73-78 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a186f4b876adb40ea79671750a456b2e835be348a742d4b59d2d4b0e4135b11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/messages.py:81-86 | archive/ktransformers/server/crud/assistants/messages.py:81-86 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/messages.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e82160db9911cecd42a688c34485feacf2715680ecc620312bc6f1bf73cc516"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/runs.py:41-45 | archive/ktransformers/server/crud/assistants/runs.py:41-45 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/runs.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/runs.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/runs.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5f55797d442deb01fca45babac41f836f59c207eab17ad7e51febaa0bcf227"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/crud/assistants/threads.py:89-93 | archive/ktransformers/server/crud/assistants/threads.py:89-93 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/crud/assistants/threads.py\u0060 and \u0060archive/ktransformers/server/crud/assistants/threads.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c09788caad2dd7b6b1c9ed96e3de82f624f7f458beec36e0ea9d55d17804fbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:22-26 | archive/ktransformers/server/main.py:30-34 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"aebb30bd40b827c1020916045f63ef8dc2c56a16d03cd69cf2d3395052be850e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/main.py:89-100 | archive/ktransformers/server/main.py:97-108 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/main.py\u0060 and \u0060archive/ktransformers/server/main.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d643c6ee4739b70da9e39794b552da6fc849fbc2fff75bdd89e0e6f704550e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:127-131 | archive/ktransformers/server/schemas/assistants/assistants.py:127-131 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ff7b61b8fff775cd116d785cb4a08acda5f56fc6bbcd8c0cf685612e0d45c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:147-154 | archive/ktransformers/server/schemas/assistants/assistants.py:147-154 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"e010dfbfeb4d57e293f6ca89bb1c52948b476a2c38c855167e14bbc750859b08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py:184-189 | archive/ktransformers/server/schemas/assistants/assistants.py:184-189 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/assistants.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a4a3d6e7c55b9cba5e5708aff0b1ceab45d5464ea83f7a5be3341b5b7e6c7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/messages.py:121-127 | archive/ktransformers/server/schemas/assistants/messages.py:121-127 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/messages.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"16503de771a65b066d8a4f3d56a8ff814b16b858397b2e26d251c9af5627f8a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/messages.py:152-157 | archive/ktransformers/server/schemas/assistants/messages.py:152-157 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/messages.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa0cabbaa5996a3a2cdca5c289972ee1b398036d88c8f2fdcf8769cbda2456d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/messages.py:161-166 | archive/ktransformers/server/schemas/assistants/messages.py:161-166 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/messages.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/messages.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/messages.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e03f841fbf6bc488582764e479fc06512a4f88a92d8d02c9a0d0cfaeb96fca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py:137-148 | archive/ktransformers/server/schemas/assistants/streaming.py:137-148 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py\u0060 and \u0060archive/ktransformers/server/schemas/assistants/streaming.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"db3165827e486f2a6de2d5024e9abcd0f8468b05fbab133baf022d780d72c27c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/multi_timer.py:5-17 | archive/ktransformers/server/utils/multi_timer.py:5-17 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/multi_timer.py\u0060 and \u0060archive/ktransformers/server/utils/multi_timer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/multi_timer.py"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ab5cdc174e4e165135347e4dbf748228453c7727106147b329ad572c787102"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:41-50 | archive/ktransformers/server/utils/sql_utils.py:41-50 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c47c8ac9cd52ff262630feb8eb0e0e8193cad41932aef62950f0f2342c73bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/sql_utils.py:105-113 | archive/ktransformers/server/utils/sql_utils.py:105-113 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/sql_utils.py\u0060 and \u0060archive/ktransformers/server/utils/sql_utils.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/sql_utils.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4347daf33758426085a778b0b8372ac0cd7210d6edcb30bfd1cd51cdb8ab7281"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:581-585 | archive/ktransformers/util/custom_gguf.py:588-592 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"c623ec6af6fc769c164571a613275b372e691db2ebfffd278a613d5c037d92d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:591-595 | archive/ktransformers/util/custom_gguf.py:598-602 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"4566e6622791189528323d1d5bc3323b0fd8a6b764bf696f0943abc663c6e850"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:598-602 | archive/ktransformers/util/custom_gguf.py:605-609 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e28f7a5c0d2df045e347e1e9a90857e21c2fc2f8ec1eadb8be6ad81c024a5f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_loader.py:390-395 | archive/ktransformers/util/custom_loader.py:417-422 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_loader.py\u0060 and \u0060archive/ktransformers/util/custom_loader.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 459 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9f544a537e5785bde1c832a392fe9d75e61bb227ee9a064de0f4007f0904a41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/util/modeling_rope_utils.py:408-412 | archive/ktransformers/util/modeling_rope_utils.py:408-412 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/modeling_rope_utils.py\u0060 and \u0060archive/ktransformers/util/modeling_rope_utils.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"d677ced5b076b894c3af5f5033a0265b63e32dd388cbc26be0cbc5ef7e5d91fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/ktransformers/util/utils.py:267-275 | archive/ktransformers/util/utils.py:325-333 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/utils.py\u0060 and \u0060archive/ktransformers/util/utils.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 305 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc219c24a630f9d1429cc7159f05745084626474de95d46cce6c164cb85f8865"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): archive/kt-sft/ktransformers/util/weight_loader.py:325-343 | archive/ktransformers/util/weight_loader.py:325-343 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/weight_loader.py\u0060 and \u0060archive/ktransformers/util/weight_loader.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"620f67acdc43f2d7d7f1743658e347a888f02b1fd63a737211cb9e42abf5415a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:59-68 | archive/merge_tensors/merge_safetensor_gguf.py:59-68 \u2014 before extracting anything, compare \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py\u0060 and \u0060archive/merge_tensors/merge_safetensor_gguf.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 281 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/merge_tensors/merge_safetensor_gguf.py:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c87dc6ef53a36490904092613d4649b1a2a4ebb0656151f4bbfd7e9f16dc53a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/kt-sft/setup.py:194-202 | archive/setup.py:171-179 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91a8e9f53d5bb7c82cfea2e34957b766c1de1c339b6b09a444a1fc1d64e050f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): archive/kt-sft/setup.py:324-332 | archive/kt-sft/setup.py:357-365 | archive/setup.py:305-313 | archive/setup.py:338-346 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c20eb759fe23c9be7d82ad83d7b3cdc0672a205feddadde9c086c6beeb54c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_linear.py:230-236 | archive/ktransformers/operators/linear.py:936-942 \u2014 before extracting anything, compare \u0060archive/ktransformers/operators/ascend/ascend_linear.py\u0060 and \u0060archive/ktransformers/operators/linear.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_linear.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e2dd740f4829a126cf8d899e3e9f5d2245da2e7fb1461674a7113b8f11b0d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/ktransformers/server/utils/serve_profiling.py:35-43 | archive/ktransformers/util/utils.py:94-102 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060key\u0060 to \u0060ProfStatKey\u0060 in one and \u0060StatKey\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/utils/serve_profiling.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"50514e20680857f72ea8e5ddab0fc193bd3f83218b65b2fc53d8e85a42921b62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): kt-kernel/python/cli/commands/bench.py:197-216 | kt-kernel/python/cli/commands/quant.py:511-530 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/bench.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f895a4513851de72c16b56a3ee3c0a8ed145549f9a3f0dc969e56796989527"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/python/sft/artifacts.py:129-133 | kt-kernel/python/sft/weight_manifest.py:107-111 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a83da6ced0f45911acc1421f48bad925b94ba717bc8d2d403a391991454540dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:181-189 | kt-kernel/scripts/convert_cpu_weights_ds4.py:209-217 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"f16c22abb9e9b2bc54c9a9e5e5d5774f3383eaebd762ecc0d4782da70edc9c95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:193-219 | kt-kernel/scripts/convert_cpu_weights_ds4.py:221-247 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"089c1dbf59c592974194391ddde3533913fba2a1ba5b4afab22abef655da7bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:223-245 | kt-kernel/scripts/convert_cpu_weights_ds4.py:251-273 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a4548e98aef5a779f2ff95c20512841fa62f2e08616f9ec15e0bc854d6704e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:322-328 | kt-kernel/scripts/convert_cpu_weights_ds4.py:368-374 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be62cf163b477892b33c4779eea238ad1d5445a19e87908316e00867485b4d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:632-638 | kt-kernel/scripts/convert_cpu_weights_ds4.py:699-705 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"996d9256416a0c9674e7f1a0d90715b1b07f42bf394253717854d6b3656f2729"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:789-799 | kt-kernel/scripts/convert_cpu_weights_ds4.py:856-866 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f41e57175785abd8d09980c53128959b598194ba726caced2201a178612e25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py:352-358 | archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py:775-781 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"070adc80d729cd775f2c71188a786d72ecc799cae10be0aa0880365229f69bd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): archive/kt-sft/ktransformers/models/modeling_deepseek.py:323-327 | archive/kt-sft/ktransformers/operators/RoPE.py:270-274 | archive/ktransformers/models/modeling_deepseek.py:322-326 | archive/ktransformers/operators/RoPE.py:271-275 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd669f169eab3d8b0fd5a1b9a60110567f170e7a39087d25fb183dd472819214"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/operators/attention.py:71-76 | archive/ktransformers/operators/attention.py:70-75 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/attention.py\u0060 and \u0060archive/ktransformers/operators/attention.py\u0060 as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 864 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c3f331949ee07102d7bf1a79bc49576a57c5bfbe11cfe815db1f36178c9dbd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:267-277 | archive/ktransformers/operators/experts.py:281-291 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"57eda038f16efdb793de74ae06ec1f508a8af0db702030fe2ba49697ebde8c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:297-304 | archive/ktransformers/operators/experts.py:311-318 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d66464636f25fb8b5ee35062f198f6943e582d9f7393389f37c5d223b6320e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/operators/experts.py:280-286 | archive/ktransformers/operators/experts.py:294-300 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/experts.py\u0060 and \u0060archive/ktransformers/operators/experts.py\u0060 as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 877 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a20e4a8a07c4ab63adca272b1e85859b30275034e91cbbb520ea95e5069880"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:108-112 | archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py:115-119 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 and \u0060archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"b88606f9fd6d85e5048c1dcbd443e54119a348c0a96fdc6365793160384b3485"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:88-92 | archive/ktransformers/server/backend/interfaces/balance_serve.py:126-130 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:87\u0060 calls \u0060item\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py:124\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"c633e508042af3b1f0b8913b0553b8b8eabc0252726c24f37770391e9cdeb28f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py:138-143 | archive/ktransformers/server/backend/interfaces/balance_serve.py:196-201 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py\u0060 and \u0060archive/ktransformers/server/backend/interfaces/balance_serve.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e16111a2ed6ec0551912c04670405b484f07e642d777be92caef5ea9309c47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:95-101 | archive/ktransformers/server/balance_serve/inference/model_runner.py:142-148 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"118b630ae6e00a4fa0c6b29eb77ffc3b46a9f627200b39869cb5dddddbe4b5e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py:89-93 | archive/ktransformers/server/balance_serve/inference/model_runner.py:136-140 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py\u0060 and \u0060archive/ktransformers/server/balance_serve/inference/model_runner.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"3904110506f1936078a5782c24216a9a906090efcef1a501f351f737631698b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/kt-sft/ktransformers/server/balance_serve/settings.py:125-129 | archive/ktransformers/server/balance_serve/settings.py:127-131 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/balance_serve/settings.py\u0060 and \u0060archive/ktransformers/server/balance_serve/settings.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/settings.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"68162a70c0ad8d8d4cc0a6736db7f18b71f15635670c79f2056c868190178ee1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/server/utils/multi_timer.py:41-46 | archive/ktransformers/server/utils/multi_timer.py:41-46 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/server/utils/multi_timer.py\u0060 and \u0060archive/ktransformers/server/utils/multi_timer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/utils/multi_timer.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"757a1d077de2b769c23f621c687f065125f37d8ebfd4c54208dcfedd8d7d9898"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:484-500 | archive/ktransformers/util/custom_gguf.py:491-507 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/custom_gguf.py:484\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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bda0c245b2da66a12114ea36d296db1870fd709cd927aacdac9930f7854663a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:324-330 | archive/ktransformers/util/custom_gguf.py:331-337 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/kt-sft/ktransformers/util/custom_gguf.py:324\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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"05eee9a767f16c435bc4d509d1e67153e1339205ed9c62c613431caf5a4bde9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): archive/kt-sft/ktransformers/util/custom_gguf.py:569-574 | archive/ktransformers/util/custom_gguf.py:576-581 \u2014 before extracting anything, compare \u0060archive/kt-sft/ktransformers/util/custom_gguf.py\u0060 and \u0060archive/ktransformers/util/custom_gguf.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8344aeb593029b8f0763784431aa151454a55494d087682bdcf46806e539ec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): archive/kt-sft/setup.py:284-290 | archive/setup.py:265-271 \u2014 before extracting anything, compare \u0060archive/kt-sft/setup.py\u0060 and \u0060archive/setup.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 392 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbeb6e3f9ddf542290162d8870d3f5f4421b3a8e46578c75ccad3b7f664bf77a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): archive/ktransformers/operators/ascend/ascend_attention.py:341-345 | archive/ktransformers/operators/ascend/ascend_attention.py:775-779 \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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a668f29377786ace63960713dd870a833fc687fa03260d27c20d59ab6772d74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:801-805 | kt-kernel/python/cli/commands/model.py:959-963 \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":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dca5f3c7f65c0efa9bac43b7353025b92a8d45c54c78e08e2f6c32c883f276e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/python/cli/commands/model.py:822-826 | kt-kernel/python/cli/commands/model.py:908-912 \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":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3dd6b6a7f23eec3ec403289200f0a2c3a69c1b21304fd9647d37a93919cf422"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/scripts/compare_weights.py:233-237 | kt-kernel/scripts/compare_weights.py:305-309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/compare_weights.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a92c1735a7869c8bc9314f4731ec09e524a0595272fa10be79c05f780193a4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/scripts/convert_cpu_weights.py:49-55 | kt-kernel/scripts/convert_cpu_weights_ds4.py:49-55 \u2014 before extracting anything, compare \u0060kt-kernel/scripts/convert_cpu_weights.py\u0060 and \u0060kt-kernel/scripts/convert_cpu_weights_ds4.py\u0060 as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 1024 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d91d1d51ad788637b39366ce6a84b81099e701e26372ade798c19b8b7b14ebd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py:96-100 | kt-kernel/tools/mxfp4_gguf/verify_mxfp4_gguf.py:125-129 \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":"kt-kernel/tools/mxfp4_gguf/convert_mxfp4_gguf.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1447f6b973c141da99a3e80f8435e3db5a80905af961e941821956ad0bcf405"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 60 shared lines): archive/csrc/ktransformers_ext/bench/bench_mlp.py:29-137 | archive/csrc/ktransformers_ext/bench/bench_moe.py:32-147 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:29-137 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:32-147 | kt-kernel/bench/bench_mlp.py:31-152 \u2014 These 5 members are variants of one another: a block of 60 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30f3868bc5ce2d65480cf29e29e9bba8699bc4f29ed5e010964e176004983ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 26 shared lines): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:48-105 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:81-147 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:48-105 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:81-147 | kt-kernel/bench/bench_mlp_torch.py:48-105 \u2014 These 5 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef78c18fea08e6b3bd7dccd48e46bd3e5515f1bb83b8c3f3805d3c5d75a9cc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 45 shared lines): archive/csrc/ktransformers_ext/bench/bench_moe.py:32-147 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:30-104 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:32-147 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:30-104 \u2014 These 4 members are variants of one another: a block of 45 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0020b1731fc2434c0060c64ffc5d94b4f610300e65a78d132105fed29c521b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 37 shared lines): kt-kernel/bench/bench_moe_amx_k.py:145-315 | kt-kernel/bench/bench_moe_kernel.py:151-325 | kt-kernel/bench/bench_moe_kml.py:145-293 \u2014 These 3 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_amx_k.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a772b4130700d319b2979c75b9fa9cedae3b0dc47fc7e623fa59fcbcd8c8d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 14 shared lines): kt-kernel/bench/compare_moe_performance.py:445-617 | kt-kernel/bench/compare_moe_performance.py:621-862 | kt-kernel/bench/compare_moe_performance.py:876-1051 \u2014 These 3 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/compare_moe_performance.py"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8784abff9263f2d97d4bf8ff7df0b5218791f2b28f8ae0e6b7c7b2e1378e84b"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (73 shared lines): archive/csrc/ktransformers_ext/bench/bench_linear.py:29-108 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:29-108 \u2014 These two members are variants of one another: 73 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":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"0547c08e371ace80b782e3f42b73bd62dcfa03de35c434e4aeb6544a3c736ed3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (12 members, 50\u002B identical tokens): kt-kernel/bench/bench_bf16_moe.py:45-59 | kt-kernel/bench/bench_fp8_moe.py:46-60 | kt-kernel/bench/bench_fp8_perchannel_moe.py:45-59 | kt-kernel/bench/bench_k2_moe_amx.py:42-60 | kt-kernel/bench/bench_k2_write_buffer.py:42-60 | kt-kernel/bench/bench_mla.py:66-89 | kt-kernel/bench/bench_moe.py:42-65 | kt-kernel/bench/bench_moe_amx.py:89-112 | kt-kernel/bench/bench_moe_amx_k.py:48-71 | kt-kernel/bench/bench_moe_kernel.py:54-77 | kt-kernel/bench/bench_moe_kml.py:48-71 | kt-kernel/bench/bench_write_buffer.py:51-63 \u2014 These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8cc6ee03c055420565cf4a50e7ff038365841874dc11c14bc540ca7da7df0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): kt-kernel/bench/bench_bf16_moe.py:63-81 | kt-kernel/bench/bench_fp8_moe.py:64-82 | kt-kernel/bench/bench_fp8_perchannel_moe.py:63-81 | kt-kernel/bench/bench_k2_moe_amx.py:64-107 | kt-kernel/bench/bench_k2_write_buffer.py:64-107 | kt-kernel/bench/bench_mla.py:93-142 | kt-kernel/bench/bench_moe.py:69-118 | kt-kernel/bench/bench_moe_amx.py:116-168 | kt-kernel/bench/bench_moe_amx_k.py:75-127 | kt-kernel/bench/bench_moe_kernel.py:81-133 | kt-kernel/bench/bench_moe_kml.py:75-127 \u2014 These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c40f90228bbc3ed627736449234ad7506e08c659b858e8f02ce15335207d15d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:30-45 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:32-47 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:30-45 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:32-47 | kt-kernel/bench/bench_mlp_torch.py:30-45 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0f1bedd1197d6dbe2e307ea6bb4158aa3568acd164f3defb04ebf97cb3bfde"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): kt-kernel/bench/bench_bf16_moe.py:106-260 | kt-kernel/bench/bench_fp8_moe.py:122-282 | kt-kernel/bench/bench_fp8_perchannel_moe.py:116-273 | kt-kernel/bench/bench_k2_moe_amx.py:212-323 | kt-kernel/bench/bench_moe.py:130-337 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd93fd01410a1be8667efb706e9fad90b35a3f60ff98ec308664465105a67a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): kt-kernel/bench/bench_moe_amx.py:186-326 | kt-kernel/bench/bench_moe_kml.py:145-293 | kt-kernel/bench/bench_moe_torch.py:62-70 | kt-kernel/bench/bench_moe_torch.py:74-101 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"c530d3fe5e288ead47cb26662c606f3b24d7deb7d725fdbf7eb0a42705013fe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (130 corresponding lines): archive/csrc/ktransformers_ext/bench/bench_attention.py:42-171 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py:42-171 \u2014 These two members are one piece of code written twice and then edited apart: 130 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":"archive/csrc/ktransformers_ext/bench/bench_attention.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"facb4a9d752181b7e34f406c2df484553510eae64524021978b956967fdcaab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 52\u002B corresponding lines): archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:27-78 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:27-78 | kt-kernel/bench/bench_linear_torch.py:27-78 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 52 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":"archive/csrc/ktransformers_ext/bench/bench_linear_torch.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4a2156b20edb399ff50673bba7450923ed67123f017e51d68deb916f2d271d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (65 corresponding lines): kt-kernel/bench/bench_moe_amx.py:330-396 | kt-kernel/bench/bench_moe_torch.py:325-389 \u2014 These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"624e2a052f6fa84ed4a28b61b51b5566c17cc7b4282651502789b85f0edb4acb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): kt-kernel/bench/bench_moe_torch.py:105-135 | kt-kernel/bench/bench_moe_torch.py:139-172 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_torch.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2aeaf68007a68c4a77df55bb9ce3164a348fc605b202fd44d025b103d679052"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): kt-kernel/bench/bench_write_buffer.py:108-149 | kt-kernel/bench/bench_write_buffer.py:153-192 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_write_buffer.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"003b0f4c455d7a6cd4b4980b13d6b7b7d5e4783f3e719e7c321c55153ad0fdd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): kt-kernel/bench/bench_k2_write_buffer.py:146-191 | kt-kernel/bench/bench_write_buffer.py:196-223 | kt-kernel/bench/bench_write_buffer.py:227-255 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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":"kt-kernel/bench/bench_k2_write_buffer.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"e229daaa00cfea8013187be8c3bf459cc5c26fad83a8d18628a159330b6e08a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): archive/kt-sft/ktransformers/lora_test_module.py:56-70 | archive/kt-sft/ktransformers/lora_test_module.py:82-95 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/lora_test_module.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59591f747ab0c130f06d2f762f2ff140f464041847699575403885c791a5bc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 26\u002B corresponding lines): kt-kernel/bench/bench_k2_write_buffer.py:195-222 | kt-kernel/bench/bench_write_buffer.py:259-289 | kt-kernel/bench/bench_write_buffer.py:293-323 | kt-kernel/bench/bench_write_buffer.py:380-405 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 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":"kt-kernel/bench/bench_k2_write_buffer.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc9119a83721b1b6f85b060381c48ff661621a8f2800f1a9bf2a2ae8de069b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): kt-kernel/bench/bench_fp8_moe.py:92-118 | kt-kernel/bench/bench_fp8_perchannel_moe.py:91-112 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_fp8_moe.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"259ed7ae914d884ee4eaea4c812a52779382325b99c5171a2852ffd1ee822f79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): kt-kernel/bench/bench_moe_amx.py:58-65 | kt-kernel/bench/bench_moe_torch.py:39-42 \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":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4ea670e9cb74e6bc297a9c09ac4a2a345864d46a496daf140630f24db7e478"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (87\u2013150 lines \u00D7 2): kt-kernel/bench/compare_moe_performance.py:640-789 | kt-kernel/bench/compare_moe_performance.py:895-981 \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 \u0060kt-kernel/bench/compare_moe_performance.py:640\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":"kt-kernel/bench/compare_moe_performance.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4611689ba833f443b8cb330c9fb6ee2b4c2df6614fe8545456af2974d8b10cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57\u201371 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_attention.py:101-171 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py:101-171 | kt-kernel/bench/bench_attention.py:96-152 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py:101\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":"archive/csrc/ktransformers_ext/bench/bench_attention.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"192f66161e7887b902f276a07b99c58dfa3715049e33a8eb1104f90ca8041840"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201356 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_attention_torch.py:30-85 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention_torch.py:30-85 | kt-kernel/bench/bench_attention_torch.py:30-74 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_attention_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention_torch.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_attention_torch.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"f585e802bc0d2febeeec9f02ea77685d60b21fe2df4daf5e84acd36d059c6fa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (71\u201372 lines \u00D7 3): kt-kernel/bench/bench_bf16_moe.py:155-225 | kt-kernel/bench/bench_fp8_moe.py:175-246 | kt-kernel/bench/bench_fp8_perchannel_moe.py:166-237 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"276a474d4cdf5edea04a63bcf414fd422ba1e00e0dfc593acb8c4bf1282e9362"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201338 lines \u00D7 2): kt-kernel/bench/bench_moe_kernel.py:243-272 | kt-kernel/bench/bench_moe_kml.py:204-241 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_kernel.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 220 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_kernel.py:243\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":"kt-kernel/bench/bench_moe_kernel.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd06725b6d956ca577c16a5dfc62bcacdb3fd5a475196ac2db9abcf423737227"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201337 lines \u00D7 8): kt-kernel/bench/bench_k2_moe_amx.py:69-102 | kt-kernel/bench/bench_k2_write_buffer.py:69-102 | kt-kernel/bench/bench_mla.py:102-137 | kt-kernel/bench/bench_moe.py:78-113 | kt-kernel/bench/bench_moe_amx.py:126-162 | kt-kernel/bench/bench_moe_amx_k.py:85-121 | kt-kernel/bench/bench_moe_kernel.py:91-127 | kt-kernel/bench/bench_moe_kml.py:85-121 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_moe_amx.py\u0060 and \u0060kt-kernel/bench/bench_k2_write_buffer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5aea296802ea1cb77b5fb1743a388a118ccd8125062bea882c0eeccda86c59f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_linear.py:29-65 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:29-65 | kt-kernel/bench/bench_linear.py:31-67 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2d5c3368262b042d9f009c7e736aacc75095af6aec4afd4c8046110ebafded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201336 lines \u00D7 5): kt-kernel/bench/bench_bf16_moe.py:176-194 | kt-kernel/bench/bench_fp8_moe.py:196-214 | kt-kernel/bench/bench_fp8_perchannel_moe.py:187-205 | kt-kernel/bench/bench_moe.py:265-283 | kt-kernel/bench/bench_moe_amx_k.py:228-263 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_amx_k.py:228\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":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"e80e975f20befe2f3015d2291104ff953df86872e43d4c424242a9a309511e05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_attention.py:42-77 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py:42-77 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py:42\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":"archive/csrc/ktransformers_ext/bench/bench_attention.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60c984ecd8417cb668915b6bf68c177ab1510b3ea50372d20430194b3d127af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): kt-kernel/bench/bench_write_buffer.py:114-149 | kt-kernel/bench/bench_write_buffer.py:157-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_write_buffer.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"960d75866d9622e45922c32a6e7240bce9d38405fd4e538aca26474ffcf9672a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_moe.py:101-144 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:101-144 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c42359327c3ed690e4aab3217bf5a031687d0114ca848eaab0f95dc3efe436"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201334 lines \u00D7 3): kt-kernel/bench/bench_bf16_moe.py:227-260 | kt-kernel/bench/bench_fp8_moe.py:248-256 | kt-kernel/bench/bench_fp8_perchannel_moe.py:239-247 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_fp8_moe.py:248\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"81676daf2575d91082e6254e0ead667bfcbf477dd06388a92a6b191a5e538e40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:70-103 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:70-103 | kt-kernel/bench/bench_mlp_torch.py:70-103 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"491f89b3337e602390f9d6f1c01c1d2050da2a162d8981012a73a5ad482c0f08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): kt-kernel/bench/bench_moe_amx_k.py:151-183 | kt-kernel/bench/bench_moe_kernel.py:153-185 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_amx_k.py\u0060 and \u0060kt-kernel/bench/bench_moe_kernel.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_amx_k.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"62eb896835df5986b94fb89d3f24b22a9c837a68d0003869699b55096182be0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201332 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_attention.py:68-99 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py:68-99 | kt-kernel/bench/bench_attention.py:66-92 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_attention.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_attention.py:68\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_attention.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b65e733b83e983c0cf53847fcfb74c90a1c7e205e1f8f12a80962d3e28d8ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201331 lines \u00D7 5): kt-kernel/bench/bench_k2_moe_amx.py:293-323 | kt-kernel/bench/bench_moe_amx.py:290-298 | kt-kernel/bench/bench_moe_amx_k.py:280-288 | kt-kernel/bench/bench_moe_kernel.py:290-298 | kt-kernel/bench/bench_moe_kml.py:258-266 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_moe_amx.py\u0060 and \u0060kt-kernel/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_amx.py:290\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, \u0060kt-kernel/bench/bench_moe_kernel.py:299\u0060 calls \u0060basename\u0060 and \u0060kt-kernel/bench/bench_moe_amx.py:299\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":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"349c3c3cd69727c7d5a3b6b0db32f09c471143fb4b2def86d0cacff0b9c8ee6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201331 lines \u00D7 3): kt-kernel/bench/bench_moe.py:274-303 | kt-kernel/bench/bench_moe_amx_k.py:252-282 | kt-kernel/bench/bench_moe_kml.py:230-260 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe.py\u0060 and \u0060kt-kernel/bench/bench_moe_amx_k.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 224 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe.py:274\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":"kt-kernel/bench/bench_moe.py"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"db5b2cbb22c76cea0d3dd8dd421c6db94b840f4c3330d6d12cf1f67406064a54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 3): archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:29-60 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:29-60 | kt-kernel/bench/bench_linear_torch.py:29-60 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear_torch.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3e742ea2b42a6ac7dcf5cde113f948d96f2853ce92a5c0c47113f9b27294f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201326 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_linear.py:80-105 | archive/csrc/ktransformers_ext/bench/bench_mlp.py:109-134 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:80-105 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:109-134 | kt-kernel/bench/bench_linear.py:84-101 | kt-kernel/bench/bench_mlp.py:128-145 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3977d20a86c41299bbb6ae259bb6a9432b47b3b1938209c9afb0b957caf79e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (59 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:30-88 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:30-88 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:30\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":"archive/csrc/ktransformers_ext/bench/bench_moe_amx.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9249cdb2f6cee24f74b8af305419575af35c6b65c0bf039dc40645d30f01df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): archive/csrc/ktransformers_ext/bench/bench_mlp.py:71-95 | archive/csrc/ktransformers_ext/bench/bench_moe.py:73-97 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:71-95 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:73-97 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd7c2135b68232801bfedd2ec6290621b2c4ec429dd19b9a753050719d47dd6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201331 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_moe.py:94-100 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:40-46 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:97-127 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:94-100 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:40-46 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:97-127 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"2252e4e5118e3172bb207f188cdb4899a7726d6e115f98ecc26a474394bf0a5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201324 lines \u00D7 4): kt-kernel/bench/bench_moe_amx.py:186-209 | kt-kernel/bench/bench_moe_kml.py:145-168 | kt-kernel/bench/bench_moe_torch.py:64-65 | kt-kernel/bench/bench_moe_torch.py:76-77 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_amx.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1bc155f80388714772395d67a57d795c2c2dee0decb161807c03dd867ac582"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_mlp.py:31-53 | archive/csrc/ktransformers_ext/bench/bench_moe.py:33-55 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:31-53 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:33-55 | kt-kernel/bench/bench_mlp.py:33-55 | kt-kernel/bench/bench_moe.py:135-157 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"beb17be88bb227f54b126ba1a81be91f47b2b2543e556e6ced3eb7d0dc8bea99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201322 lines \u00D7 4): kt-kernel/bench/bench_k2_moe_amx.py:271-289 | kt-kernel/bench/bench_moe.py:275-294 | kt-kernel/bench/bench_moe_amx_k.py:253-274 | kt-kernel/bench/bench_moe_kml.py:231-252 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_moe_amx.py\u0060 and \u0060kt-kernel/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_k2_moe_amx.py:271\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 before the matched lines, \u0060kt-kernel/bench/bench_k2_moe_amx.py:269\u0060 calls \u0060data_ptr\u0060 and \u0060kt-kernel/bench/bench_moe.py:274\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":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"183bba43c81624ea1d45a8cbe08618035947468ace0e8142517b8d4a02db2434"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:50-71 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:50-71 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:50\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe_torch.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e1d6343cd68748844e54bedb83805cae03c190d8658b2622e4bfa3a6a43e2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): kt-kernel/bench/bench_k2_write_buffer.py:278-298 | kt-kernel/bench/bench_write_buffer.py:494-514 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_write_buffer.py\u0060 and \u0060kt-kernel/bench/bench_write_buffer.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_k2_write_buffer.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1238cf44f7ee6e13fc7ce73fe142b560317e468472677f3121a359df3c77684"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): kt-kernel/bench/bench_moe_amx_k.py:230-248 | kt-kernel/bench/bench_moe_kml.py:209-226 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_amx_k.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_amx_k.py:230\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, \u0060kt-kernel/bench/bench_moe_kml.py:227\u0060 calls \u0060data_ptr\u0060 and \u0060kt-kernel/bench/bench_moe_amx_k.py:249\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":"kt-kernel/bench/bench_moe_amx_k.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c47f2837b9c67b9928d35feb7807b9dcf4e2c1881c71d05cd3d1b725b89eff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): kt-kernel/bench/bench_write_buffer.py:268-289 | kt-kernel/bench/bench_write_buffer.py:302-323 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_write_buffer.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f80da37b64c8f79bd93f6ee047272541e61e387cb290744bfc328fda3ea6a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_mlp.py:70-87 | archive/csrc/ktransformers_ext/bench/bench_moe.py:72-89 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:70-87 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:72-89 | kt-kernel/bench/bench_mlp.py:72-89 | kt-kernel/bench/bench_moe.py:174-191 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff45e5f04d0cafcca4c8e943f71039d0f8047b3aac3ff03cee81b3278e4c2a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 5): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:50-67 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:83-100 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:50-67 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:83-100 | kt-kernel/bench/bench_mlp_torch.py:50-67 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"26ac4d55b95d10823af1697b630c1f31c4f85bbfca6ad6ebecad93055914a2fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): kt-kernel/bench/bench_moe_amx.py:246-262 | kt-kernel/bench/bench_moe_amx.py:266-280 \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":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"a40a50b5649f03bc83401b100512481219063143cd15c9243121fc063766e4f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): kt-kernel/bench/bench_moe_amx.py:333-349 | kt-kernel/bench/bench_moe_torch.py:325-341 \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":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"e961049461f544786a22752edb6c9d0dd05f31743bf62d5ffb81f71a07f271eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 8): archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:28-43 | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:49-64 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:82-97 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:28-43 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:49-64 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:82-97 | kt-kernel/bench/bench_linear_torch.py:28-43 | kt-kernel/bench/bench_mlp_torch.py:49-64 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear_torch.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"db608a052572005083c8e0c02da6e820b1de9615dee230506880f7bce4fa143d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 8): kt-kernel/bench/bench_k2_moe_amx.py:46-60 | kt-kernel/bench/bench_k2_write_buffer.py:46-60 | kt-kernel/bench/bench_mla.py:74-89 | kt-kernel/bench/bench_moe.py:50-65 | kt-kernel/bench/bench_moe_amx.py:97-112 | kt-kernel/bench/bench_moe_amx_k.py:56-71 | kt-kernel/bench/bench_moe_kernel.py:62-77 | kt-kernel/bench/bench_moe_kml.py:56-71 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_moe_amx.py\u0060 and \u0060kt-kernel/bench/bench_k2_write_buffer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67e56a95ecce632b23bdb38f1bcb5949b1d3d7bf20011b62495b9779be88165"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): kt-kernel/bench/bench_moe.py:273-288 | kt-kernel/bench/bench_moe_amx_k.py:251-268 | kt-kernel/bench/bench_moe_kernel.py:260-277 | kt-kernel/bench/bench_moe_kml.py:229-246 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe.py\u0060 and \u0060kt-kernel/bench/bench_moe_amx_k.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 224 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe.py:273\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":"kt-kernel/bench/bench_moe.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ac3030edac94da7875c3ea80f08208dbc9fedeceaa2441456bbbe610d1398e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): kt-kernel/bench/bench_moe_torch.py:271-286 | kt-kernel/bench/bench_moe_torch.py:288-302 \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":"kt-kernel/bench/bench_moe_torch.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"f843545f308a9d1dd0d5794c7eb68444b4a097ff3bb0fa4c5301d300c0e4744a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 11): kt-kernel/bench/bench_bf16_moe.py:64-76 | kt-kernel/bench/bench_fp8_moe.py:65-77 | kt-kernel/bench/bench_fp8_perchannel_moe.py:64-76 | kt-kernel/bench/bench_k2_moe_amx.py:64-76 | kt-kernel/bench/bench_k2_write_buffer.py:64-76 | kt-kernel/bench/bench_mla.py:96-109 | kt-kernel/bench/bench_moe.py:72-85 | kt-kernel/bench/bench_moe_amx.py:119-133 | kt-kernel/bench/bench_moe_amx_k.py:78-92 | kt-kernel/bench/bench_moe_kernel.py:84-98 | kt-kernel/bench/bench_moe_kml.py:78-92 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3d37a43123b49b7e7a748c4a801151e0c57adb8f39836a6d55a9a0f33ecf38b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 4): kt-kernel/bench/bench_moe.py:290-304 | kt-kernel/bench/bench_moe_amx_k.py:270-283 | kt-kernel/bench/bench_moe_kernel.py:280-293 | kt-kernel/bench/bench_moe_kml.py:248-261 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe.py\u0060 and \u0060kt-kernel/bench/bench_moe_amx_k.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 224 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe.py:290\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":"kt-kernel/bench/bench_moe.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ccf4a92221ecefa285c306409dd570eaa78cd4361d508131f566a0d45675ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): kt-kernel/bench/compare_moe_performance.py:538-552 | kt-kernel/bench/compare_moe_performance.py:557-571 \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":"kt-kernel/bench/compare_moe_performance.py"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d162e8b736acd426706d8b733470377ae2fe972350612a54907e30f33221892"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 9): archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:27-40 | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:48-61 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:81-94 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:27-40 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:48-61 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:81-94 | kt-kernel/bench/bench_linear_torch.py:27-40 | kt-kernel/bench/bench_mlp_torch.py:48-61 | kt-kernel/bench/bench_moe_torch.py:241-254 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear_torch.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"da6b8a00efba09f27ee55ccb91cb3d6aa2bce79310fc6d11f13e2670f5190e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:30-45 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:32-47 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:30-45 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:32-47 | kt-kernel/bench/bench_mlp_torch.py:30-45 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"22534be5914d673b57aa46c4c4c8112833d216b16ebcd4b44bab123ed73db3ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): archive/csrc/ktransformers_ext/bench/bench_moe.py:122-135 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:77-90 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:122-135 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:77-90 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py:122\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"94beb861e1dd525893a533c6aff021cc7dad34007e15a1e20c58e09a4b8ebbb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): kt-kernel/bench/compare_moe_performance.py:451-464 | kt-kernel/bench/compare_moe_performance.py:630-643 | kt-kernel/bench/compare_moe_performance.py:885-898 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/compare_moe_performance.py:451\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":"kt-kernel/bench/compare_moe_performance.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed67b2fc7200ed56f94e05007a2957b5c50f65f34307eb15478c87e4cbe795c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): kt-kernel/bench/bench_k2_moe_amx.py:248-261 | kt-kernel/bench/bench_k2_moe_amx.py:263-275 \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":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d717e0bf14043ad09d4cd3cdb5cd9ade8df60a714eca429c7189ade8405ca6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 4): kt-kernel/bench/bench_bf16_moe.py:141-152 | kt-kernel/bench/bench_fp8_moe.py:161-172 | kt-kernel/bench/bench_fp8_perchannel_moe.py:152-163 | kt-kernel/bench/bench_moe.py:228-240 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ef371250865b2329a1ccf09ef44600ccbb8c61f653d26cd636eb5186c9d7c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): kt-kernel/bench/compare_moe_performance.py:1284-1296 | kt-kernel/bench/compare_moe_performance.py:1311-1323 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/compare_moe_performance.py"},"region":{"startLine":1284}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c02bbb006a50c13e3718f6b417df4c7927e33cdd86a1da124c5bd52f3c356e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 10): kt-kernel/bench/bench_bf16_moe.py:161-172 | kt-kernel/bench/bench_bf16_moe.py:178-189 | kt-kernel/bench/bench_fp8_moe.py:181-192 | kt-kernel/bench/bench_fp8_moe.py:198-209 | kt-kernel/bench/bench_fp8_perchannel_moe.py:172-183 | kt-kernel/bench/bench_fp8_perchannel_moe.py:189-200 | kt-kernel/bench/bench_moe.py:250-261 | kt-kernel/bench/bench_moe.py:267-278 | kt-kernel/bench/bench_moe_amx_k.py:224-235 | kt-kernel/bench/bench_moe_amx_k.py:245-256 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1cb94cb61bfde42ce0b9bfdee45bd5512822580a5472b2b316688611fa76654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 7): kt-kernel/bench/bench_bf16_moe.py:184-199 | kt-kernel/bench/bench_fp8_moe.py:204-220 | kt-kernel/bench/bench_fp8_perchannel_moe.py:195-211 | kt-kernel/bench/bench_moe.py:273-284 | kt-kernel/bench/bench_moe_amx_k.py:251-264 | kt-kernel/bench/bench_moe_kernel.py:260-273 | kt-kernel/bench/bench_moe_kml.py:229-242 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_bf16_moe.py:184\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":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c6455467341948c984f8fd162ec247b5296b7ee27ca59f37dab623fc36183be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): kt-kernel/bench/bench_mla.py:305-316 | kt-kernel/bench/bench_moe.py:297-309 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_mla.py\u0060 and \u0060kt-kernel/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_mla.py:305\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":"kt-kernel/bench/bench_mla.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"008d58045248d8dd81ea4f764e112a566a79213652fce8cec8dd23983f822d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 8): archive/csrc/ktransformers_ext/bench/bench_linear.py:96-106 | archive/csrc/ktransformers_ext/bench/bench_mlp.py:125-135 | archive/csrc/ktransformers_ext/bench/bench_moe.py:135-145 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:96-106 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:125-135 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:135-145 | kt-kernel/bench/bench_linear.py:95-104 | kt-kernel/bench/bench_mlp.py:139-148 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py:133\u0060 calls \u0060data_ptr\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py:95\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":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bf4b680db1d8e9e2cd78d1cc0cdc91bfe6d87402cd910bb7e0f4b994e05e9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): archive/csrc/ktransformers_ext/bench/bench_moe.py:88-98 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:34-44 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:88-98 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:34-44 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d8200d4dd6bfc41894e704e731e5feb02b8548fac5b2e3886f559a5bac66ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): kt-kernel/bench/bench_bf16_moe.py:119-126 | kt-kernel/bench/bench_fp8_moe.py:137-146 | kt-kernel/bench/bench_fp8_perchannel_moe.py:129-136 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_fp8_moe.py:137\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4109ba548df5dec732661b5b624b9e71feb1cb990d3aff9af545f5da4fd18b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): kt-kernel/bench/bench_moe_kernel.py:204-213 | kt-kernel/bench/bench_moe_kml.py:182-191 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_kernel.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 220 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_kernel.py:204\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060kt-kernel/bench/bench_moe_kernel.py:214\u0060 calls \u0060to\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py:192\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":"kt-kernel/bench/bench_moe_kernel.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"26a13ee56a6b1eb6ffb661da0df4fe0479dc604f76124043feb7b4f4ee3cc4d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): kt-kernel/bench/bench_moe_kernel.py:231-240 | kt-kernel/bench/bench_moe_kml.py:200-209 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_kernel.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 220 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_kernel.py:231\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":"kt-kernel/bench/bench_moe_kernel.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"610392e1c3a08536955c5d4a0ec0ed3dbdfee4319cad3ed833fddffcf9937bf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): archive/csrc/ktransformers_ext/bench/bench_mlp.py:127-135 | archive/csrc/ktransformers_ext/bench/bench_moe.py:137-145 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:93-101 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:127-135 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:137-145 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:93-101 | kt-kernel/bench/bench_mlp.py:139-148 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e21a6bdee371205a38ca3fd0bc8b99d58125b1bfee23ff4843657501167b74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_linear.py:101-106 | archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:71-76 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:101-106 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:71-76 | kt-kernel/bench/bench_linear.py:97-105 | kt-kernel/bench/bench_linear_torch.py:71-76 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_linear.py:97\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"88331cc7fd55dfb9bdc2fc1d7d3bd8f9c8c6c5fa4777c079084cda5349463be4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_mlp.py:130-135 | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:98-103 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:130-135 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:98-103 | kt-kernel/bench/bench_mlp.py:141-149 | kt-kernel/bench/bench_mlp_torch.py:98-103 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_mlp.py:141\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":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"448348579e0b8dbcd5e61bedbff200aea555a6eb51976221714bfddfd11b4f66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): kt-kernel/bench/bench_moe_kernel_tiling.py:181-189 | kt-kernel/bench/bench_moe_kernel_tiling.py:196-204 \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 \u0060kt-kernel/bench/bench_moe_kernel_tiling.py:181\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":"kt-kernel/bench/bench_moe_kernel_tiling.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bd335ccf109753bb642202cc840b6fe066b4cb17c8aac1c704d787ec7d25ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): kt-kernel/bench/bench_moe_torch.py:127-135 | kt-kernel/bench/bench_moe_torch.py:164-172 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_torch.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8843baf4c9a7c67e3bba31ea7b71e7d0689b788d7e8727d3e34ece3b1327481"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 8): archive/csrc/ktransformers_ext/bench/bench_moe.py:114-121 | archive/csrc/ktransformers_ext/bench/bench_moe.py:129-136 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:68-74 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:84-90 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:114-121 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:129-136 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:68-74 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:84-90 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py:114\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, \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:64\u0060 calls \u0060tensor\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py:110\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13dcaddd335bf5f6fb9584815465e97f19709a0af931d3b624859c6f3c0752a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): kt-kernel/bench/bench_bf16_moe.py:146-153 | kt-kernel/bench/bench_fp8_moe.py:166-173 | kt-kernel/bench/bench_fp8_perchannel_moe.py:157-164 | kt-kernel/bench/bench_k2_moe_amx.py:235-242 | kt-kernel/bench/bench_moe.py:234-241 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"1301de23025eb568961e0922aafa083212a990959e91ba50245f00966d3fe1fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): kt-kernel/bench/bench_moe_kernel.py:234-241 | kt-kernel/bench/bench_moe_kernel.py:254-261 | kt-kernel/bench/bench_moe_kml.py:203-210 | kt-kernel/bench/bench_moe_kml.py:223-230 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_moe_kernel.py\u0060 and \u0060kt-kernel/bench/bench_moe_kml.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 220 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_moe_kernel.py:234\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":"kt-kernel/bench/bench_moe_kernel.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"2243595b3ff06d62faaa1cbeb8d366f5bc3232d06d567bbd07e5c22066052831"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:59-66 | archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:67-69 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:59-66 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py:67-69 | kt-kernel/bench/bench_linear_torch.py:59-66 | kt-kernel/bench/bench_linear_torch.py:67-69 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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, \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:66\u0060 calls \u0060isinstance\u0060, \u0060quantize_per_tensor\u0060, \u0060to\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_linear_torch.py:69\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear_torch.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"168f80e33314024bf20d3ba0e08462e7f1cf2d5dbad13d04c68dbdff7e2c0231"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): kt-kernel/bench/bench_bf16_moe.py:52-59 | kt-kernel/bench/bench_fp8_moe.py:53-60 | kt-kernel/bench/bench_fp8_perchannel_moe.py:52-59 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"81016020e0a50e71eaedc3fcc6e87d87da00b7a8232f7869cb77bfdf8a5a08df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): archive/csrc/ktransformers_ext/bench/bench_moe.py:140-146 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:96-102 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:140-146 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:140-146 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:96-102 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:140-146 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d244ff3a7430be71918b70adf1e51d52cbd110354e37597a19139ab06e43946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20137 lines \u00D7 5): archive/csrc/ktransformers_ext/bench/bench_mlp.py:106-112 | archive/csrc/ktransformers_ext/bench/bench_moe.py:110-116 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:106-112 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:110-116 | kt-kernel/bench/bench_mlp.py:125-129 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py:106\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, \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py:107\u0060 calls \u0060stack\u0060, \u0060randperm\u0060, \u0060to\u0060 and \u0060kt-kernel/bench/bench_mlp.py:123\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":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"2246caf738f4508418419dd3e2936b690113d44740355b7ebabac7e91b933f2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): kt-kernel/bench/bench_bf16_moe.py:50-56 | kt-kernel/bench/bench_fp8_moe.py:51-57 | kt-kernel/bench/bench_fp8_perchannel_moe.py:50-56 | kt-kernel/bench/bench_write_buffer.py:55-61 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70d67230e7dacfc33e4d3aa73cee76791e00cc9c6a87e9274092b6fdb75b2d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): kt-kernel/bench/bench_k2_moe_amx.py:222-228 | kt-kernel/bench/bench_write_buffer.py:206-211 | kt-kernel/bench/bench_write_buffer.py:238-243 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_k2_moe_amx.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"2359d6a4ef9ac0c0c4d968aca517999d6bdcc7ab8350721fa84d2392c6c6e241"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/bench/bench_fp8_moe.py:151-157 | kt-kernel/bench/bench_fp8_perchannel_moe.py:142-148 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_perchannel_moe.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 244 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_fp8_moe.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"3770ebda3f5667085439d0fdd52ef96c14a84d9ef7bcf712659891514a744a7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/bench/bench_k2_write_buffer.py:158-164 | kt-kernel/bench/bench_write_buffer.py:199-205 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_k2_write_buffer.py\u0060 and \u0060kt-kernel/bench/bench_write_buffer.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_k2_write_buffer.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"2748849b5c98870574c37db7d39632b2c11a7fe50bc0534d002de68c692f7cd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/bench/bench_moe_amx.py:385-391 | kt-kernel/bench/bench_moe_torch.py:373-379 \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":"kt-kernel/bench/bench_moe_amx.py"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"329aac1c115fb48aafc0775a676a11ab81397755c94f307fc962a49166553ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:98-103 | archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:140-145 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:98-103 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:140-145 | kt-kernel/bench/bench_mlp_torch.py:98-103 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"997d3522c2a5677de3a29127c51eecc1b8e8bb669b62b6966ec14a2726dd5141"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_moe_torch.py:130-143 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py:130-143 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_torch.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_moe_torch.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"105fe578fc73f43e994414b6da8432e2c03fffea97d3c42ed62f42dfc0dbefa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 12): kt-kernel/bench/bench_bf16_moe.py:46-50 | kt-kernel/bench/bench_fp8_moe.py:47-51 | kt-kernel/bench/bench_fp8_perchannel_moe.py:46-50 | kt-kernel/bench/bench_k2_moe_amx.py:42-46 | kt-kernel/bench/bench_k2_write_buffer.py:42-46 | kt-kernel/bench/bench_mla.py:70-74 | kt-kernel/bench/bench_moe.py:46-50 | kt-kernel/bench/bench_moe_amx.py:93-97 | kt-kernel/bench/bench_moe_amx_k.py:52-56 | kt-kernel/bench/bench_moe_kernel.py:58-62 | kt-kernel/bench/bench_moe_kml.py:52-56 | kt-kernel/bench/bench_write_buffer.py:51-55 \u2014 before extracting anything, compare \u0060kt-kernel/bench/bench_bf16_moe.py\u0060 and \u0060kt-kernel/bench/bench_fp8_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_bf16_moe.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c70b5c846ab259ed0ba6b1de80c408a52bbbfecbfbcd2d79659b163e9630f37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): archive/csrc/ktransformers_ext/bench/bench_mlp.py:92-96 | archive/csrc/ktransformers_ext/bench/bench_mlp_torch.py:64-68 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:92-96 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp_torch.py:64-68 | kt-kernel/bench/bench_mlp_torch.py:64-68 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"da821cdae9c65423af26a4eacca6b68c6e0ebeb6af4474f6db96fadabd1b5142"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 7): archive/csrc/ktransformers_ext/bench/bench_mlp.py:101-105 | archive/csrc/ktransformers_ext/bench/bench_moe.py:109-109 | archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:62-62 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_mlp.py:101-105 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe.py:109-109 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_moe_amx.py:62-62 | kt-kernel/bench/bench_mlp.py:120-124 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_moe.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060archive/csrc/ktransformers_ext/bench/bench_moe_amx.py:64\u0060 calls \u0060tensor\u0060 and \u0060archive/csrc/ktransformers_ext/bench/bench_mlp.py:109\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_mlp.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce8cf9c5974ca6f8ece099d906a294a6667c8d2f625d9e7e77c2be9c1ff00046"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): kt-kernel/bench/bench_mla.py:243-246 | kt-kernel/bench/bench_moe_amx_k.py:211-215 | kt-kernel/bench/bench_moe_kernel.py:219-225 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060kt-kernel/bench/bench_mla.py:243\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":"kt-kernel/bench/bench_mla.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"b886f4cfef3fa97894497851c116e5e83f82a2e59648e67f6621e47e7f47ca81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): kt-kernel/bench/bench_moe_torch.py:176-182 | kt-kernel/bench/bench_moe_torch.py:206-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/bench/bench_moe_torch.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebbdfdf239cc8060d8f0fe17c21392461ee50ef6731a9b956298bafb9bb615d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): archive/csrc/ktransformers_ext/bench/bench_linear.py:68-76 | archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py:68-76 \u2014 before extracting anything, compare \u0060archive/csrc/ktransformers_ext/bench/bench_linear.py\u0060 and \u0060archive/kt-sft/csrc/ktransformers_ext/bench/bench_linear.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/ktransformers_ext/bench/bench_linear.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6fb04fa94dd7abd3ec2c02fef5ef762e54b811c867fd4f10c4052b3c31ae56"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AssistantObject (LCOM4 5): AssistantObject\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"11276140ad2337f475421a27a9359b02f4118c17ca9979c9d6af4464ccea3afd"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AssistantObject (LCOM4 5): AssistantObject\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"08bca6785e2c0c3fcbd8b6427907b116f5374a1f0d333241b31979407b513d72"}},{"ruleId":"D13","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":"130b10c7a0b86c09445d4b743980f0b8402499ebb8b82fe029fb137cc361f7dc"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D13","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":"2ebac30cec90f639c9ebd67873fa520e45a4a6c744033823370ed7251e92ec2c"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D13","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":"a3247de003e8d9ff7336a0d9731320a44e16a7164c83a96f7f3df793e34bbc0b"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D13","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":"d2e16f73635a4f9e79fee7b954ee10fa9591bf2d8eea4c7afc3ab5edaafa1578"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/wrapper.py: kt-kernel/python/sft/wrapper.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 184 in wrapper.wrap_moe_layers_with_kt_wrapper at line 301. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/wrapper.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4987db46267d5769a5880bf529ca0a36418d605dc70404680bf5e7d2c037fc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/config.py: kt-kernel/python/sft/config.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in KTConfig.__post_init__ at line 404. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/config.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/config.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66274587cf333f0e58fc05a7810fea90bff24d34ae2e1dc547da5df01a5cd7b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/setup.py: kt-kernel/setup.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in CMakeBuild._build_single_variant_impl at line 488. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/setup.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a61bda4941a8df0b022cb13da544b2ebc0eb2cc78efa0811a31ed172e78a49"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/utils/amx.py: kt-kernel/python/utils/amx.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in NativeMoEWrapper.load_weights at line 778. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/utils/amx.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/amx.py"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"7127ab7adc8678f4f986e0f9d02769e3f3940805668eb382091eacd80c2eb49b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/amx.py: kt-kernel/python/sft/amx.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in AMXSFTMoEWrapper.__init__ at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/amx.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe6df2dfbf2c04d665530830e0d7cfbc8035069a19896bbfc61e2de14f4fbb8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/autograd.py: kt-kernel/python/sft/autograd.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in KTMoEFunction.backward at line 284. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/autograd.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"001513ce33d4e07a09328ffed3543e6f508ee869506fdf9b7ad908071b1fb62c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/layer.py: kt-kernel/python/sft/layer.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in KTMoELayerWrapper._forward_routed at line 430. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/layer.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"a870048cf707ac680a3a6d250e327a4b290234e7bc819a12499f41ca556474ef"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/weights.py: kt-kernel/python/sft/weights.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in weights.load_experts_from_checkpoint_files at line 753. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/weights.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b98f5b629b2c28b5c1d0bbfb30fc898edd2bc056d9df277d0dfbfd9292720d8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/arch.py: kt-kernel/python/sft/arch.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in arch.move_non_experts_to_gpu at line 272. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/arch.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea16bec50a5a97edf4386fb03a840404540bc9bbb57a62c0131ec34425982f2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: kt-kernel/python/sft/artifacts.py: kt-kernel/python/sft/artifacts.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in artifacts._validate_adapter_manifest at line 1973. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 15:51:34 \u002B08:00\u0027 --until=\u00272026-11-13 15:51:34 \u002B08:00\u0027 --full-history --no-merges -- kt-kernel/python/sft/artifacts.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1973}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e015edf0559b7206294c3f45e375358e11df681e7bba86a37ef81dae202f0f3"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: kt-kernel/python/sft/artifacts.py. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bbb5d5e76fd468a8e9504e273cdf9dc347918333229ca8376f55fc6e6e4b1e1d"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (2 single-owned of 336 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 336 of the 467 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: kt-kernel/scripts/convert_cpu_weights_ds4.py."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: add keys in gguf that should be used in the final tensor \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":"kt-kernel/scripts/check.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"531fd13710ddcdb5256d038f77b46ef496be55ecd522b1d713d0e2ea5fa5b4d4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: add keys in gguf that should be used in the final tensor \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":"archive/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"020b0c3f13df447e92eb9846c6fc2e0a8e74ddcbb0e6115d9a5787fc5aaade15"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo: add keys in gguf that should be used in the final tensor \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":"archive/kt-sft/merge_tensors/merge_safetensor_gguf.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ce7564f2d622a869f832f6abcc1b7cd020e7ea313d63b33f2fcd6f35695cd7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: 256 should be a variable \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":"kt-kernel/scripts/check.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ae0fef8e3a580571e64a819a95bfd93aadf490c37f8aada925a5e19f358459"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Implement actual inference benchmarking \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":"kt-kernel/python/cli/commands/bench.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"efdd823d9ef92a4cf69edde86cda0b6e0275c37670b4c8ec869011d9da8c1bed"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Implement quantization \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":"kt-kernel/python/cli/commands/run.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c0d95fd5ef9fd108f99f5100194cdf8e141515f9cc681e30a136d54c2e4e94"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"kt-kernel/examples/modeling_deepseek_v3.py"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ad6879b45a3f14445df270fd68b502176f49286af49c7b123a43acde1df0c7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80f4d6293b4ce10ae4daefdf617d97ba4654b072a68f8abbc78ffb19189b4c2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1087cceb3706e4d7eb280244ead19e639f7ce8a3eea6fed8d51bf8f60e166fc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fef8f386882e85efc832da338aab10097928b3d53f039f094bf6738dc81ae81"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc1ba42e6c2c887ca66b1b066c1a5c2031c191f2991115b7111900fc1eb22a4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfbfa1142d3f6b94d0e7a65351428f4721a56fbca750390476ce3b0f77e3f6ff"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c765898f6925165a2a4988d5cbf9891d744c6c75a47be4d8ff8d4dd37610723"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"12781189f060e13102949357c6c182222fd2378818ab841a6c65ec7522c991a0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Should be removed once Flash Attention for RoCm is bumped to 2.1. \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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccc4fab543c95bc6ebe6de963e41efcf65ac687d190c0b341ff5f76db1602b42"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"kt-kernel/examples/modeling_deepseek_v3.py"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d3bf09aa2a44de3d25dbca36541c2158d24d8e5f77825430347f0490612e79"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"3587cdb04908ec794947eaeb0ba3f4fbb10ed10264667a26043f221fbafb9328"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"6696f6e725acae2cbd86aa4fb9193f4e1d98152fb0ab8dc41c3aa276336ce14a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"12eab04acdb1b827dc89a6aec0021e9ee98cf58faea0bf71b0656ae9e542cdc6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d62620331d33d2f95f09fc637be8cbcbde350dd4ca8becd12531aadd3da44a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":956}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f4e6253e846329e34da24ccd415163831c3676f461ddec7273fda029cd65d89"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1fe17d360ec59f35c9650e1ed512a260b0dfb2089f1c1913d9d87b3cd2a861c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in DeepseekV3FlashAttention2 __init__. \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":"kt-kernel/examples/modeling_deepseek_v3.py"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbfecbb0167a5d453b2672e9519a3582d9855e9253980f66f96b0be14171502"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in DeepseekV3FlashAttention2 __init__. \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":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cb1c6e921c4d1abe95257d523a4bb9b062fc9e8832d505ce90869b3f6574ed0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in DeepseekV3FlashAttention2 __init__. \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":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"eef949d2900bf18d55ead987df02e5c536db35e62ece5776ec6a7bec489d7473"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment repeated across 13 files: The identical TodoComment appears in 13 files (13 occurrences) \u2014 almost certainly one boilerplate line from a single migration or decision, not 13 independent debts. Fix the systemic cause once rather than file-by-file. Text: \u0022# TODO: As of torch==2.2.0, the \u0060attention_mask\u0060 passed to the model in \u0060generate\u0060 is 2D and of dynamic length even when the static\u0022. Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/examples/modeling_deepseek_v3.py"},"region":{"startLine":1529}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba521376c4354aa42ec1522c62dd0f4281397b04b4890b1b883e1041887c6053"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(zbx): multi cuda graph \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":"kt-kernel/examples/test-debug.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce826e4aa85ac9637e003c8cfe899d545c3b1ca01a19a71c4e9f6a5462e2f38e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add Marlin support for MUSA. \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":"archive/setup.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"917d5dc2857329840c37702b44c955d9dfed7452921a2af83293e34e50f05a5f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add Marlin support for MUSA. \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":"archive/kt-sft/setup.py"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9dd59d29a60fce5c518926e7541004875101b6997bd4925c47b709b6d089b2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"574f7f42197c39a0eda881cfc66618c819202aebc1f43a6f28dcb3187cdd49d9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8374312b0fc25f6a06e2470b7bd4f8e93b6321f2b3093e08712509d6afa937"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c363a23d863ddca6cbde6e57b7bbd8b438cb9f791b61092fc4bdc9e7dd2cf31"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb1f451c0a359f9b8d22c5fcda221016bfbc7b578015734125e0a30a2277493"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"602abfdba8d0d586d337b9202e467a7d376a766c45d073e79e97f26bbb34e7c1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e10ca524e86fa55a08ee46d26d40373b5f3b1461977639ae50e63338ec32c7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1af93bb645ad7e53b28a61cc241993d2e429af63cee5288900b2969f6fc27c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this and from_numpy in other functions will cause a warning saying that numpy is not writable, \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9c2eafeecea67363138397324a9c436f23a3c20bd171199bbd832de8e8979b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO use uint8 and cast later? \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":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"45179b9a541be836536c6918dbe32eb5634fae871b369f4845b1b6cc4aebf4bc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO use uint8 and cast later? \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":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"133aafb25528c57398528dd70cac236c3e6ff9c97046d033457a5389ec8af1d0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: experts may fused in quant block, split it \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":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"46b1f012d48072f2a69a95a1bab03f534ed4a0a9df89d0335c8b00e6643a8a86"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: experts may fused in quant block, split it \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":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeb9f344e3c2eee85d7dbc828416c9133db82b759cdf0ffbba1b118b98dc5590"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): use the new \u0060original_max_position_embeddings\u0060 from rope_scaling \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":"archive/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce44752726a3d00814d1b8f1b28fe348314fe245c249c9401a5c6ec39f92e67"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): use the new \u0060original_max_position_embeddings\u0060 from rope_scaling \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":"archive/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d39c71e5ed8d624825558f9225178728ec94691568babdcca76c4f36ab50932"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): use the new \u0060original_max_position_embeddings\u0060 from rope_scaling \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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a6a6e5cb8a4e146d3b5c2e71ebf40372ec7cf75cfa8f4006f07561732fc365"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): use the new \u0060original_max_position_embeddings\u0060 from rope_scaling \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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"f16c09049a08712ae1268c01e3e42483e813017aea5660105cb4b416d3b740b1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): update logic for the inclusion of \u0060original_max_position_embeddings\u0060 \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":"archive/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"4baa58266eccbdf20b4080d9a135f21a440353698dfee5defbf21cd7a8dc14e1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): update logic for the inclusion of \u0060original_max_position_embeddings\u0060 \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":"archive/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3b853e73be26ea955ab59aad48083e297c10b1662ed3d88712bea4946ece9e5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): update logic for the inclusion of \u0060original_max_position_embeddings\u0060 \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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"131600911f05d6d07ed6f272490695467b38896a6ef3a2d8b5705865d053dece"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): update logic for the inclusion of \u0060original_max_position_embeddings\u0060 \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":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"32fd4837ff864d50c55fb3ea0f0c4b36b5c299d1d7fa3a2816abc4a6662964e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Merge all loader. \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":"archive/ktransformers/util/utils.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bb337f489c4c915aaf4db663a7c0ddc39a50eed8d1a9e30865a2f03c9e3454f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Merge all loader. \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":"archive/ktransformers/util/utils.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b32fb51272d5456baaf19f3cca5e38584c95b442ad2e186036c7d9dc3a7e72"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Merge all loader. \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"b34412265f1b94b6e282ecc2b6b1d746566c43ee47397c9c63ddd97b619c98fe"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Merge all loader. \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f1f3edd4de39083917529903ee388b6f0f411416ffb5740d9d2c4215719a1e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # Todo need fix \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":"archive/ktransformers/util/utils.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac6ef5216ea6b33b171b615bcc62eb11640a56415dd3bffef809747bdbbf9f82"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use CUDA Graph for chunk prefill, may get small improvement \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":"archive/ktransformers/util/utils.py"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"017966e30dfa33852cb43dbf9e003c7d7d93ccf0b75029502562c217d488a362"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use CUDA Graph for chunk prefill, may get small improvement \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"08832f1a2539d67371f96bc081df8a357ac832a4914ab48ea1a84182c8cee1af"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use CUDA Graph for chunk prefill, may get small improvement \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"627819bdede85add6813740538eddf347cc969c8d480b70c283462893b379d9c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ee58a5c11c52a0bb162768b9b7583d738cd0a48227e3fa4f26e28e552c4b16"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"80087dd275cbe299f7cde9030aed0fb32970e313909e7bb0ee46b7be79d83b1c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b28aca32c51bb1f7aa085a17d78c9fc238fb7df56595ec3b699437e2821f554"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/kt-sft/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28f6d2d5dade017f474d0cb00fd26a7e91dd3b8332ae205d784f75c92839011"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/kt-sft/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b646fb616f6b96bff1f267a8c0b4a0dd495c457473b77be1093e68b2c9b08a6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add this \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":"archive/kt-sft/ktransformers/server/schemas/assistants/runs.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ea8d36a3eb5a382e558674c376c431c1c4ba94765a98ae1ddc9de22447f222"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo \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":"archive/ktransformers/server/models/assistants/run_steps.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38efb94bfc36880f0685d233254b6fc2dc01605293578766d3f2e3d7b95f89d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # todo \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":"archive/kt-sft/ktransformers/server/models/assistants/run_steps.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89787ab6c9ba5e3076386d4d3b873a042f3596d59e67413792401df6be35d92"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO delete related messages and runs and other stuff or just gc \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":"archive/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfb1cae2a69702b7a982d5451be546266ccd522995b7b6a0a1dbe20d7140771c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO delete related messages and runs and other stuff or just gc \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":"archive/kt-sft/ktransformers/server/crud/assistants/threads.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7d0cdcb8cf64970c979ef2a06207afafac74acacc0248771b656795f710581"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add to yaml \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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"db097fb664e7bfbfc9f9da579aa6eb208d714f497046d8562f5e23d74e533e52"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add to yaml \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"32053e27535a3d8086927990d6d806ddc3f85361c9cc4bddac0848c8e9bf0ff1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use config \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":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"d586c39b004ba1788ac521dba504b3a3fdd58c85a0dc611fc4c204cebe6ada07"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use config \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"c41fa8849d982de641d6503f95c886c760d85b41365b0250b97751163131bbb3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: 1024 is a magic number(max_batch_tokens) \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":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc5765033982bb8f39ff01b698a17feba910a8049718d926a148812a42199dd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: 1024 is a magic number(max_batch_tokens) \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67269d3f0fd01f0dae8cff74e9a2fdb90f043d9799e69bd689a24f259c31435"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: calc this \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":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"69231164130b773210647484ff79cb60cbe8314ecdb04196d6321f3bba6bf333"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: calc this \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":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0d6298f254b5fed84696bae36aaa5117db31e588d933d7f9e4b78818858abd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: calc this \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"4859bf771ae274c10e67b204dfe3451ff57273c7dd8076e367a7b50920d64928"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support MTP \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":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"630ed46853042cce8dbe90847b538d61c6ade26afdaac131967b9b36cd75f2c1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use different kernel when don\u0027t need top_k or top_p \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":"archive/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a8e1df8f4d245df2f84b8ccada536d1e5fe9d5a79b751f0be85eb44eaa94c9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use different kernel when don\u0027t need top_k or top_p \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":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"536f8bfbc493bd65a8f7bbb69a66cf1e63a483f7ad230338ebe295b1a4229a07"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: \u4F20\u5165rank\u907F\u514D\u6253\u5370\u91CD\u590D \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":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"a65d80ad0a36bba5fb88f5aa057d80a0b89e38a85dfc6dc4140ba36b4a368f45"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill the rest correctly \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":"archive/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7bc3dc0f2cf688cc341e4e7018e73c70daa7fe7f98f1e68679d5052419b1ba"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill the rest correctly \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":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3fd109713aaba03e4269302c522e8f042dbfcb42690390bc75e4c1ae8cb0f9f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill this correctly, although it does not effect Tabby \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":"archive/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"65516e95034578d7848f732e0e7d26b24ad93d8a02d7f2a97c4b04e20f794873"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill this correctly, although it does not effect Tabby \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":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47595e3e5479ac8214f6ba05af344196ea10a24c55ac454b68cb21ca3c7561e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill this correctly \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":"archive/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e93271eb01c22f0e22416e1cd515e3d9c2dac621c1d07d0e2d51817c515079"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fill this correctly \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":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"21dc232dbdcf55b0c1d4d170d714b8c7f61ef56582bfdfe28bdb10980db2d9ff"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add more info in config to return, although it does not effect Tabby \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":"archive/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c58ed4185102b31e27a0d2892dacfa92f835e23a8c12d2d9b3b8529097c8295"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Add more info in config to return, although it does not effect Tabby \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":"archive/kt-sft/ktransformers/server/api/ollama/completions.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5569035a4be2cc06a79abe5153ae408101f1b215a3c49ddd8387b609262370"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #         # TODO support perlayer prefill \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":"archive/ktransformers/operators/RoPE.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb7d3482459124c3ad778e226e2629d5e4d0b08b7f361751692717896d5a1a8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #         # TODO support perlayer prefill \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":"archive/kt-sft/ktransformers/operators/RoPE.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb7d68ceef55bf58b404f5c24bc10314c9224f29a79ad3d32af67d4168e932a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/attention.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"883ee627fe3e9208a71cd3304eccf97cc71f0d3edaa9dd964c15d64748afdba4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/attention.py"},"region":{"startLine":889}}}],"partialFingerprints":{"codehealthFindingId/v1":"90eb83b29bead60b6486c7a0641248aecdd156193ed0be31d44f60d0bea10564"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"720ed3f56f6d2fe95fea2bfb2326ee756e8e2653a58be72dddcf65bb79ebb97e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"25fedbb2b39cf8069bfcc95eabdd8ff61a4277106c9dc6c500db3d3438c9630d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa54ed99195b3df709bba085e14937d2a7f7564b2d9734dc80666eadeb17257c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8fecc71a5ffb5e7075b634285367148ec555840574dd7bc7afa96ffa08c2dc0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"6915c8b9070fbe3fe86d70d2a7cb41afe163fae81e23ee0f667d0a48a4006e3c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b023cc8b2d1498b3c6147afab3ef538562cf7e078bf740681c718c807881dc5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"047543b58d47b5f6ceae74e08b7251949d6538c43580fffba2c3f4c5b54f9745"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08a516f2764cb33dd250f87bee3886204a6a43315dc8ea09cdb46a4ed629075"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c76209b665aae863d8ed1178be054542b83dda52ad2fd6e942138214c35144d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbc2b40eff2dfff8b1c0fb46202c289781b29f7410f6dabd1494fee783428bd9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"c31cf100478ec964d3c91ab6ec5e369ce17d696f5d3bb0dbc51a9ca0d9d16b6a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fddb14c548252615a3b65fc5ac6a914808f2271baa64f0929a8a8f02a340596"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d6da54d007df804752aab9c5f8aa7612a983b20a8e7502f38f78f1a4c06702"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"2274e0ca2530119c1c124872df1e9ad29064bbdc694972906f8eff7842365a4c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO, generate chunck_size automatically. \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":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa467612453c143270ffc16d61b117b774b54488a03fd007bd28b6f052a7977c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/ktransformers/operators/attention.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"177180b51aa8a08caf9bae16b698fa124bc9812a40ecc6817b187a4f9778e02f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/ktransformers/operators/attention.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"b11b1d612573a1a0ef165bde8f032ed25282460c0a9e6c0c55ad4d14de3042a8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"078ec08f443cfab2c481e5bb42c2cb49abc7b5417d131fb9c11592a61d2f8dd9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d679e6499921758286a8f7ce11cf074b32ce444110cce30510f909a455d0ba"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"e46bae1086517ec657e456984961f74da1a3a4e30cd4a999033fc61f99947a1f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96b5aef20d3cfdd05eb859a08a8afa874fe1364616013fffd752661d2ce3583"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"55179e453c42374758726e777be38cb505eca5fe44b378cb792dff4f6c43cb54"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: #num_kv_splits # follow vLLM, fix it TODO \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":"archive/kt-sft/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f82661ededf246631623cf8b9e5527f3dbcc047746a1e6435281a440ea750af"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # this device mean which device the output should on. TODO: support cpu. \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"9778031eb6ab3f5971d9b851ed12bf6181e049518cf658b7be2cf3f9a2acec70"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # this device mean which device the output should on. TODO: support cpu. \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":"archive/ktransformers/operators/linear.py"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e1d9e4edb407ab849f512cac54bda1bae011c02b2b60553ed80bca1d4bb4f2d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # this device mean which device the output should on. TODO: support cpu. \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"600f8fa298195b551bab5e34d33baf5acacd1a53baa62028903862e5fa506e61"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # this device mean which device the output should on. TODO: support cpu. \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad11e6719de9c16997346981d14ff5ab92abcd613497dafe592ad37be87a49e6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # this device mean which device the output should on. TODO: support cpu. \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"eabfc2005f4bbed1ce707cf855b4104e32492cfac86fe07cc4fb5cf63d6a7647"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: get from model.dtype \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"924433110923a9d5a665f7b0c3ad7e9397b3fe0ccb60bfd9498e2417b241b47f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: get from model.dtype \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d479ee2ad7b6a27c9c3cc2b51231e1574c91bcc8e02c0bb0e1ff8126c5b1993"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: get from model.dtype \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"0896bf2917a18b9bcb5bc3d5a49efdeb038623edca1ef82f1757091f3b8bda6e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support Bias \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"95275a53e05b095725c0b4cbe719e0e6cc438b726a74195443bcc630c422c50a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support Bias \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ee794f13f9004302ab607762a85fd2c5b9e0857b62c95c60d6e1c86db29ddb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support Bias \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a8c2d5ac15e3c1fa546a3464691df365709fe691df24866ff6424c6b0b6f0e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0c7e33f936613c9d4048f2cf993179a2493e2084af8095290013870788234e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3613cb70b454e338fc5792ae5f148b313982336a3847c1647505634660d4b9f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"0987490f673ce00c6effd15b4caed0efe71df1c7bb1de83d11b96894500582a1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1451}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b20cd901aae37b3a7640386751163d7c6c2f48321a669f3534baadb60a80b9f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"365588aa52c5ed6a1f077e2881eff8ebdf52722d477d4ba634075194c26260a8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support w as input \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1910}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f1e0c0d5e139eb355bd171c850d1a146a9799af62a0c9557e2ab3ff462f1b5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"46fce96370ef5119416f0b0c72984137658b2074484b1474153bf585e62a3e38"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d85f0aaecf89db43f4cacec9820f98fc302c41a6878df215a7d24f7c8d601a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b133209840e5dfbf18d3eed5d2d4161dc9e976e57be9afc49d00a3b43007f6b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7ecc996bc371a2620bbd97ea8c9f7d9366bacf16b9ab89a1e05cb72dced9ca"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"47bf871146862bc51437bd46f01b0ae26b5299f63ff71e595302c8b1939827f2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfff9c7c8e5cd2324e50e2bece8c3301dfa4842ada3278c2a9171efb2654b5b1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8ccf521e31e13cff18d32d5de424608062722658f2b3b2d1783aef3b42c755"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"880c8a84fd1375155ea78c8167682ffc608087c50506f4215a1933fff65b6c6e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a8e24f14b720d5a0c894637708a89b1e1abf64e32c4cbb47da393cbf17a616"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1040}}}],"partialFingerprints":{"codehealthFindingId/v1":"999103dbca7f6ae8d5d0c76bc0fbd1516c20b815700786978f8bebefe3e73894"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"702a8c12da94601bd13827010e45d5776376c22f9c18e1be1c662d925eae87a9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a6450bbc69e8e99bc3cfb368de3a64fb1b9c4ee17feac6e34ad39b5b16eb7d5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45c8a90ed7463f41c5c184a92140b0c924f62fe38f4b7c0b69e20c123415c42"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e6ffb42b94b1e8e5fd960244295448e0358e67f9ee602aaca6a83a23a6bfe1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"816fefa79ce3f39772901465a0f3c0f0602fc20c2afc5fcdcb86e81ca1c46996"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b4b7f6077d141c08415d5fb54c326b93b6773da6a2a6c003db73d291a6c97c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b43365e0826be699131a70588946c61f544c396beec13996ced6b8c3248ed1e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1543}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e21ba9afd11dca696a683aca483f815f7c37c3178d5405763b2d82aa3c35d18"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"084fd0cc16937e633a1c194441b4e5f761d59ccc881bfd66472825127126bd58"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"57aabe32a50561bdfbc1a750f97383123cc8f6deb5e891e9237f212e96488eb8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1658}}}],"partialFingerprints":{"codehealthFindingId/v1":"d725f3d287a1a52e5381a47400769558b6bc957895f187afd7c2b32cf0309747"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b94670dc738c3529fee028c4335e58091845a702542070958bcfff1c81e936"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1681}}}],"partialFingerprints":{"codehealthFindingId/v1":"f252e9e6b09214acd4e84e1921748016bcbe23a66322d22d05e6fcf3671bc9e9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e95d665c5fcb8e074d64f612bad12f3f2ad26b06806d0cfd510318008b63810"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"837d3628b9494c30dcbb3613fffbb993cf0944aff5900c13309a86d0f5a2785f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1799}}}],"partialFingerprints":{"codehealthFindingId/v1":"5889336a6faa589f8fdeeb0f69303074283a5c1ed70ea3c993c3e099b271eefa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1815}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e55b395875bc5220d48ad3ff1917cdd6bdc6d681dcf590779e492e3e519d31"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1833}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a9f7a53e284bd80a212f5a6e6ad46b75f2305c4346235567cd10114499d70c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1898}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6662655106aece167772503bd38ed997ce92412da5eb78af4815c2a4d66624"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1905}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b237a2fdb7b919c3964918a1d0bf1cbbc5fd6908f997fbe3f26894ce9b9983c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1921}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce870d6f3a7aa882403aab65f713c7b2958382fc0516eef33214f11befb76416"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1939}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a9de7bb8d959b2ee4c590e589cfb0bad447d8db227797e7d668d2a91461584"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":2024}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb5e4db1542164b485142437d4c41eb525b9596b606565427bf4db42da1d4f90"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":2031}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5fdf666b80bc821fca1c584fb5c87ea38c3b559a605250e0e49ba911dd9991"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":2047}}}],"partialFingerprints":{"codehealthFindingId/v1":"66297e50d3c0d3f5f49121f2b928eab74964187573c84a0704fff572821a16cc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":2065}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6644bf894ac0fd18e81c9d08b8a5700c712eb78b2897529322b0e85b3b7d76b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"958f13ac7b58a301c96dc0871ac738b76983e3bfeb18daa931fe10597abec11b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"c33d2b92fe203324bb2c252e91ac02acdc79223b21a4239c8790d8c141a34752"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1509}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f5330576aa791ab6a07e5cd7b9b2aab392d4b104c612f88f4428cbde7ef29e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"678f0788b8041646eeac39d377209bae5ce817b3838f8d2db7c820d9c3124f74"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1532}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a89a8a9ee2591f8bc2e8f51b7ef5f0a897163f933e3cfccc32224c00ac6d61d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"e384bd459e83541f9a5c636d67854e9f268befd00bf33a1f7087390d4114c944"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af3ed364c9053c6794910d7f7213bf6fb1c8ea7fc0769b193245b7cee92154f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1616}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebcaee009568ca5abd09a687356d132107dd8dce8eb13a07bcbee83621e4b9f9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1632}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a1426df8c92444127e309c5d5353abc7c0da1ad5df8d3b3a39e4099b663c07"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1650}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a7f35ff92d0764553312c54a2769ec4cb5836717c559884023873e93d1a733"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1738}}}],"partialFingerprints":{"codehealthFindingId/v1":"bae2493ee6fbd455d077654c0b3bf2a4b1d3f7913dcf7d2a3a8954bf3d0e6a91"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1752}}}],"partialFingerprints":{"codehealthFindingId/v1":"494043c4ee301faa0a7a2d89e5f200772e035692974aa606d4cdf41e8c07374a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1bc6c9029aebdd37859daf50de114bda82da49315161e6259b658525a9a2a4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1814}}}],"partialFingerprints":{"codehealthFindingId/v1":"964bd39387a833360cf97dddc8181ce7e39004e4363504f068f57ca7cd882564"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1831}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a0fd29bbf3fd04a66f497ff7f487f66a66bd48e4d15f7bdac7773f95fa3a12"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd34b2460bdca3e6aee0dfe627560df009e4e39de294b692354f965aa74679d5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1994}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2b417d30dc05211cbda862b1e6607dd45333018d3cf1ebb1e8386e732c79aa2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2001}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e4794519570e95b193c4f8a8816400b3b50de2a277462b1a781bb52e2b0a62"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2017}}}],"partialFingerprints":{"codehealthFindingId/v1":"be788f209cdc001153a5ab0caa474a8d1a8c7f30379da438b2281e0ed4a0bdd5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2035}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d21700cb8dce98a7b5523b7c002b238eb856b6548f3481a665998a2e3dd541c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2116}}}],"partialFingerprints":{"codehealthFindingId/v1":"57266ade0ea65f4168b95efd64fcbbf9d3a577f8d7f15c7552ac82d339366748"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6d7845bc874c5d7dab784b232807e3f1f0e8906354029a41bd187300573334e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2139}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f8a1b3f48e63c75208e74b8f5041087afcfda907432cc8231aa5472b5adadd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2157}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d4ae28599a55d6421938097a8857d73a283f8dec5f82d563a1282f2e7860b0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2238}}}],"partialFingerprints":{"codehealthFindingId/v1":"7545f86e125f6d53bab61c5820fd3783e8a45c0310053b41ed6d820949b6e27e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2245}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6daba484f0575414bd2623996a4387f2597d94d05910aa83c9f7d26e69472c5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2260}}}],"partialFingerprints":{"codehealthFindingId/v1":"1014c74832bdf20f32fc0619b6947a0f4641718323183c9ff338df229c972e16"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO may bugs here \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2278}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a364e7adee1c2cef6a3b8668a13831434891c77d048666a8164a32342340dfa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f8832d3cb9e4db7f1467582e2787905ece1c1d4b87dd822de23d1190116b5c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ae7ddf67368bc3a13f0b5ea128c61dacc2f87f3a1e6e3b80fdf2a0f0e1675f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1638}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f6f2f1fe953bb4768b98567b7c7787270c70acfe08604750108046e9e46a1e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1772}}}],"partialFingerprints":{"codehealthFindingId/v1":"f36b3c2dc499a3fb371ef3943e985c18c456471640f2ee655b402479e55ac74c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1878}}}],"partialFingerprints":{"codehealthFindingId/v1":"086a667784000faba1da43af72ad0e2be1de20544bf70d65180e026008e80668"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":2004}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec351c3168f07e9f227d6c14f9b59a1afc3f4ae4fb70e142d1665365e5716f71"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d9d5a7a25081e985f32179e2fe6365d59238dca9d483374e2d5d1a130b20ee"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"f75f831aafad662ee3b305b7e109eb240976231e0f1ee642c1ea74ff99adb55d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2096}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b975c086de4cbdafcf5b9535ac3663f25b7c0200f8ead17ff8d39a580d8da1a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch cause jit bug \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":2217}}}],"partialFingerprints":{"codehealthFindingId/v1":"028f563466aa8d2fa7f36bce191878de265265e05bd67462008d251852f2e794"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support self.moe_primary_router_apply_softmax False case \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":"archive/ktransformers/operators/experts.py"},"region":{"startLine":1757}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ca0b9fac08daa1ba36f71c7f061c0d01a30a0a16093eb240dde218ba0bf77b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: custom mask \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":"archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4579d32c1f127e8836bfe5ac1924dff543d0791aa9b0f47e2f82b327cbda6c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: custom mask \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":"archive/kt-sft/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb66d93cd0961950b180c0135f60de6fd040a7808f7af912bb7353970afeab1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # for lm_head pre-load, TODO: use new way to do lm_head pre-load when layer wise prefill. \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":"archive/ktransformers/operators/linear.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"22fbafcffa8bfb6a2f0cc4f5af6b743a2ad32d201c029a3ce1ac4a3b28bb0610"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # for lm_head pre-load, TODO: use new way to do lm_head pre-load when layer wise prefill. \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f86f1e2849af2c7c1a794fb58e08350405c682b33b0acb417abebdd39c4c43"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support CUDA Graph when using cpu, but CPUInfer is recommended. \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":"archive/ktransformers/operators/linear.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c95a3909c5eb12b267518af16c72aa8ba5d4a772d89656c59ea8e390a3cf74b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support CUDA Graph when using cpu, but CPUInfer is recommended. \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0d3ce87e06753902d64186827f7f74af9c4d891b4a60e2bbfbf3efe8f606b6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: ### TODO fit weight_inv format \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":"archive/ktransformers/operators/linear.py"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8fb36a23e4f29ae9d47d02d7be89f23f0e8e2b4300059d063250f55530cb58f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: ### TODO fit weight_inv format \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"372d5e65f9af092e5dc2a1d15d7c3f5c32398a0ef10e3ea21a0611016d86efde"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: merge two marlin class \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":"archive/ktransformers/operators/linear.py"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"102c04d61dee3596229bdfad450cef71786bada1b83a5eb4b03ffc86fb00e269"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: merge two marlin class \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"607ec73f29eba5199bd689028e7d065156f33be27f322f48d78f026315ed4477"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support restore to original device, not only cuda \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":"archive/ktransformers/operators/models.py"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae748bc46c47ea2486ab9d8bc767fa3fbf3f890753935e35564099d2a244340"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support restore to original device, not only cuda \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":"archive/ktransformers/operators/models.py"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eca6ee21306dbd9c98e55fe9247cbf7642fa68c15483d688e98b6efe03462aa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support restore to original device, not only cuda \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ed6634e690a5f042f20e097b6f463260f1045e8c900c6a9162cb1f06b83b4f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support restore to original device, not only cuda \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d5664e056173dc35f2ac77995bceab217ddb8c4f0a081361e4edb564bce0bdc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support restore to original device, not only cuda \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1730}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d088559d942a05a509c711035f02df64c2a7896c66b677e4e7385d88ccb395"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO move to embed_tokens\u0027s device, not hard code to cpu \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":"archive/ktransformers/operators/models.py"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"6daea58bdba266b944923834c3de77cda7d7e6f33430faea0f6d4f1449650f4b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO move to embed_tokens\u0027s device, not hard code to cpu \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c4708afbc49f09c942c41a9624625a724b6dd424bf2aa4fc75f67cde66c379c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # @@@@@@@ TODO open this notes, tmp close to fit deepseekv3 \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":"archive/ktransformers/operators/models.py"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"684055f2c45ce7552e7db197a8fd92f06bcf58c02943f3e9b8c78b4eeb0c8024"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # @@@@@@@ TODO open this notes, tmp close to fit deepseekv3 \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab52f9197f9214ebb961ccc0dfbef079b4f15d91eaebb2f8f123a1a9697c579"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support DFS to auto use {to, set_inference_mode} according to the module type \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":"archive/ktransformers/operators/models.py"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f9403c65be78ed8cc7d4510609466d1c3c06a8208174823791df091d808adc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Support DFS to auto use {to, set_inference_mode} according to the module type \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":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":842}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fec9036e1b049a13ceb69b8b08d5060d72a064e233fe42f2a731be2326ec4d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # [TODO] work around shmem limit on MI3xx \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":"archive/ktransformers/operators/triton_attention.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a1b15b9325a539eb35e5b8b18295a3e6ee6f1209659bfa9dc6e6e8ec616b5f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # [TODO] work around shmem limit on MI3xx \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":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d325086d5d75865fe39aceff81b71ca4d615b5999b83df9ab60eca75b0f602"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/ktransformers/operators/triton_attention.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"80621c7fae5659b852516f5f0eff64170f533c05e0acdbc7bd5abde8390a6741"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/ktransformers/operators/triton_attention.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"1522d6407e0d5215747e1896ae4a994c0fe18dcbb687ff97f1a5e9152b48b7bb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/ktransformers/operators/triton_attention.py"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf7ff27bb5a99171bf4132550bc2d018f7a45394c9062549ec64bbece150814"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"550db05c62093fed161fabb58570218a270fdb71fda92f4a5a8bfcfaef226262"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"da642a13af599b33a29810a79d34514d3e12bb4edcbc9a8397ad2eb013a81b13"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support hip \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":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fcf3acdeb720a6b50c7a4a4054cef92a4375c7e881828b87b00cc086ce87c8"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME this is wrong in random choose pages for sched, currently just use kv without history \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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c83382a19ba1452e6e78fcbba852b81fe9bbe9fb37d5e7df2088ea4718bf518"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove cache_position since it do not support multi-batch \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":"archive/ktransformers/operators/ascend/ascend_attention.py"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fbefdddbcbdc731849aefb5ad47f6020b9681d1bdd034f16cf6a29e8662c359"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: for deepseek, cache_shape is different whether using Absorbed MLA, check it automatically \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":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"1957e75624ab6115046b8dfd8eae4dadc008b2ca074119b57afe9c30b42cfc20"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: for deepseek, cache_shape is different whether using Absorbed MLA, check it automatically \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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd4079de1c33f07621baf15e1fdff3a40378dffd5f5c5fbfa6ede71b0e2547b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support real page table \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":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6cea60c489bfa2532c382b945fd5141f6477132b817e53207230c8217269e1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support real page table \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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"e610f1a16bad9fda3dc69a6a370ec981832f85abc32843320056adcb0bf3920f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate this function in favor of \u0060cache_position\u0060 \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":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"186500e7d62ef9c5c2d30045f0038eac2b00fad04f1e9193a72f8ae2a21445b8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate this function in favor of \u0060cache_position\u0060 \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":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63d44b74598c62a3053473bdd0e4f98ea49516dff2b89be601aa6964de1676e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate this function in favor of \u0060cache_position\u0060 \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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef47a597b74dd5d41c8971392a34e63a002b94b2baaf914acd00c851b6e4802"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate this function in favor of \u0060cache_position\u0060 \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":"archive/kt-sft/ktransformers/models/custom_cache.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1c24d5c4e80b9dd12cf9719512de8b1646b8c1872287f1b8c8d4e413f6b2d3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO add padding support \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":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e624a8fe23ffb90706df0668a1807919a61de7b56d3e6011e1dea844f7a90a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in DeepseekV2FlashAttention2 __init__. \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":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a1977b1224670e5b2b154a749899974b42d8c4eba581b4b9ff628b0ca43ca7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in DeepseekV2FlashAttention2 __init__. \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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"6877f4b4062af5c3f5dd4be051640dcdf4b058c9c015977408bf030ca03560e5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: remove this \u0060else\u0060 after \u0060generate\u0060 prioritizes \u0060Cache\u0060 objects \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":"archive/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1794}}}],"partialFingerprints":{"codehealthFindingId/v1":"c795097488c9467a2566d36537279f5ea80eda4fea2cd01012b7ecb8d76f828b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: remove this \u0060else\u0060 after \u0060generate\u0060 prioritizes \u0060Cache\u0060 objects \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":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"23cfa6f0632e64d2efba0ce28486f421ef7596c4fb4b34b7a9fec6bc00a92f2b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: remove this \u0060else\u0060 after \u0060generate\u0060 prioritizes \u0060Cache\u0060 objects \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":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1798}}}],"partialFingerprints":{"codehealthFindingId/v1":"b89cd363723cea1fd9bd3401b7437640143e7230dfe4f087b28646f8c68d4e7e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: remove this \u0060else\u0060 after \u0060generate\u0060 prioritizes \u0060Cache\u0060 objects \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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca4c617f0785cbff5780c90e280132b752178aba71ad2fc15564b8a9ab3469f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): remove the \u0060if\u0060 below, only used for BC \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ed0ebd60078792ed95ec189b80ed49d309419fa5104a96902239255ab2b6735"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): remove the \u0060if\u0060 below, only used for BC \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5b88019f4d23808903ade0973b286d44d938f6d828731e82b892ccc9625e0b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: may break with compilation \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd5b85a1c00939dc50e128f6ccc6e51c796d6a8cd5a005a2210bec24b727574"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO joao: may break with compilation \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2f479d5f32f7fb88ba46830d297a3c212e608e921567801bf9e55b79d682d5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): remove in v4.45 (RoPE is computed in the model, not in the decoder layers) \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ceb88c90af1c0595e1e2b1687c61cba97196bba042c22db33ee99345e4919b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (joao): remove in v4.45 (RoPE is computed in the model, not in the decoder layers) \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0193d89c9bed83897c1ed38f171515dd86b2d6b1ac57c6ed76659c3007ccc4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/ktransformers/models/modeling_llama.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"d36a59c7c77383f8255546a796b21dfd5c3cfc9f32380cff6d2be732200a9b10"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ed68655325ed8f915144ae1c0f3aaf7afa4a012112d666ef6487bbae4f801f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f920d45cc9214e185c381dc5ee5b86256d1c4e979830ad4dee2ff11bd0679a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff072ae05e34441bd189e0d9f2cfacec84629cecb058945089b9a41c5e55b87"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f91ba6745c749f49be90bcbb2091ee624deba2077dbc962a1f9f319a5514f8f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve this warning with e.g. \u0060model.config.attn_implementation = \u0022manual\u0022\u0060 once this is implemented. \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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"c956e9623e7c2ee00076bac39b56d2ff81b4dfe5829064c1a479328b52e9125b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa9d5993ca1360baa1b571a25e1d0e2f5d2908d8f82b38c02e9342a9135f9fd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76d163dfb4e36be108c8d166f9d53ac917e756deb5840ee679123848fcbc526"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd2cc4b8332a8374980be30c35f9d15d102819053702fd9f2943ca645f9aff9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4e852e3e8b0d56a274b3833d7d67a63efdd799d15de38723c376768102ba8e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8ac1fb1b13a131bf9ff254b5af817d9f29bf070dcb60b4bfc9519f4b5519b2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceedeeb3ed1d8bb427bb0fd76805a529c5fe72547d1b5ce343e27b36bc6f8fdd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7c592a1f97430ed103484c4aace6ef1043b80baa1bb986556fca125e514b44"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"7788213fc2fd20f68cc72491025d3ee9f44b9e4082c567ad2045d61a287fbc96"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"b585188a0a955cc1b0b1812c31b9ce92a956672a4750676182cd2b79c038c371"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"810368e92395e96556ff2df828b38f3110d654f144324597adae43b165bb35bd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"012285a77810a3918b9649bfb8683eca8fcddc0df10a2af1d3063109d7bd07a0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO @longjie no longer copied from Mistral after static cache \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":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"313d3cab511d003cf42d3cb11770b58b4db2199ac6dead4640a78eb4f0f90328"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in LlamaFlashAttention2 __init__. \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":"archive/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f5b9e0fb29d34adcc21ee832671e3870d1e3d3df22a9366e74ba849170f4b3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the \u0060query_length != 1\u0060 check once Flash Attention for RoCm is bumped to 2.1. For details, please see the comment in LlamaFlashAttention2 __init__. \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":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"904d8914f101d1529fb712ef33522f58b9a1ccb893eab4191b8d3051e8316b0e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: merge gguf load and other loads. \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":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"0674d500210d24d51cb4ffef76d894eb478b0bffbcd5874611ba59db1b62a45b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: This is not the best choice, because we should change the value of gguf_loader in BaseInjectModule, but up to now, it can still work \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":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"cacde4f671187de221a8e3284b20a51345e9682e664bb80e2332a49bacd607e4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # max_steps=30, # TODO: FOR TEST, will override any value given in num_train_epochs \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":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad902754d295c75aebbd1e89eaf5c7ff346cd609e2cf7ff68af89062f255e12"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove dora method up to now. \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1533295db2e916780525a75f1cfc25efde4b9b8a52e0f8a3c97effe190df5d3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: no dtype conversion here, unlike in Linear, is that correct? \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_layer.py"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2f95c99d7f0cffc05dd5e37155aa2ffd3762d75a9dd4a4e1bd75e3c5ad54db"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: not consider the low_cpu_mem_usage up to now \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2dd8937730020fbb77c7899ef70e72da7586a284d8b94c86f6dcb969bc0da1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: not consider multi-adapter up to now \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"412a4c49beb12262b4df91a915fd789e935070c2d96bdb7b158c5f0428c798a7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3751487e70d42ef00cca1b34f7633746f7c7f1635f5184d750b3dea8df399ea"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate in favor of enable_adapters \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7c0a9f981235c7787804c1b9085ff1a8687e442dde39a58eaf7375bbd1f474"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: deprecate in favor of enable_adapters \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":"archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e68f5f06edccb53ef80561208e920ba4e4e9ec9141b55999e25f7a7648b44c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: consider replacing this patching of methods with a more robust mechanism: setting a flag and \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":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":831}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfe1cb97c7107d844c5c7d82caf54530c65bd46c3d584c38975479792ae6017"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: starting with transformers 4.38, all architectures should support caching. \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":"archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0f1b13d68cba6f9a3d34ff16b9559bada059c1232a0df49560e46706dcf48d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: model.model to deal with the PeftModelForCaualLM temp \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":"archive/kt-sft/ktransformers/sft/flops_utils/custom_profile.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf8bed615af4a0e3cd7ac8e66ac3c01ce5efd3abe3d22caa4413926a9450e7b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # if key \u002B \u0022.ffn_gate_exps.weight\u0022 in self.gguf_loader.tensor_info: # TODO: maybe problem in merge (this is origin one) \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"3107eae8cd03f2973f31ec9220018eb439908efe698b183704132bc6f490ee78"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # elif key \u002B \u0022.ffn_down.0.weight\u0022 in self.gguf_loader.tensor_info: # TODO: maybe problem in merge (this is origin one) \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7b1275e1a10e607aa81585ecc3a6133bcddf0843fd20a3d838cfc5edb938f4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this branch is unreachable, but the shape of input_tensor([1,hidden_size]) and input_tensor_cpu([hidden_size]) is not compatible \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":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dce7aaf07067abc0f0822e7e96637f97aa60c37f671951943cc6a155aa87cd6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: A violence way to solve the weight=None, for Lora inference Test, need modify it later \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":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"c431151166d218bd828c19f9e268fc6c5f78fed803e00b19837ed5d296155745"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME: 0.005 \u662F\u4E0D\u662F\u592A\u5927\u4E86\uFF1F \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":"archive/kt-sft/csrc/ktransformers_ext/examples/test_sft_moe.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0726a1f69a2decdcc4412302aa95080898ea58c7de8d4b32f5fa993a7a8475"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: optimize every shape GEMM \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":"archive/kt-sft/csrc/custom_marlin/test_cuda_graph.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3228e1703a6b4cf589a23272bb29f5432627b6c02e5cdd91555a321aa22e2a23"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: optimize every shape GEMM \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":"archive/csrc/custom_marlin/test_cuda_graph.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"938ace0065544028c12b95d3b6540d68ab6d3439b31534ca9de0c4ba6e5ea95d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: don\u0027t padding bias \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":"archive/kt-sft/csrc/custom_marlin/test_cuda_graph.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bbd5ca827226e5ec68aa092b1cf0a234c9146dfae918ffa1ca2caeb7492fb4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: don\u0027t padding bias \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":"archive/csrc/custom_marlin/test_cuda_graph.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfcba48a5e8439d53964506b7ca8cdbcc3c40452240cb397571d0d7edd044ae"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060kt-kernel/pyproject.toml\u0060 makes this repository a deployable product (line 58)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/pyproject.toml"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"582710b72f1335fbdeed23b07f3de6e92adfa17e27a01890f6bde92ac678caa7"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060withoutKT_PEFT\u0060 spells \u0060PEFT\u0060 where 17 names in the project spell it \u0060peft\u0060: 17 of 18 names in project ktransformers spell the token \u0060peft\u0060 (17 of 18; unit: names in project ktransformers containing \u0060peft\u0060). Peers: LoraModel.__init__(peft_config) (archive/kt-sft/ktransformers/sft/peft_utils/lora_model.py:115); mapping.get_peft_model (archive/kt-sft/ktransformers/sft/peft_utils/mapping.py:11); mapping.get_peft_model(peft_config) (archive/kt-sft/ktransformers/sft/peft_utils/mapping.py:11); mapping.inject_adapter_in_model(peft_config) (archive/kt-sft/ktransformers/sft/peft_utils/mapping.py:55); archive.kt-sft.ktransformers.sft.peft_utils.peft_model (archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py:1). Rename to \u0060withoutKT_peft\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/withoutKT_PEFT.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e494f31ee4f54d03f78a620523b35d55a4ca7dfc48af5d5cbde94389ebea4148"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060SmallthinkerDenseMlpBlock\u0060 spells \u0060Mlp\u0060 where 22 names in the project spell it \u0060MLP\u0060: 22 of 24 names in project ktransformers spell the token \u0060MLP\u0060 (22 of 24; unit: names in project ktransformers containing \u0060MLP\u0060). Peers: archive.kt-sft.ktransformers.models.modeling_deepseek.DeepseekV2MLP (archive/kt-sft/ktransformers/models/modeling_deepseek.py:368); archive.kt-sft.ktransformers.models.modeling_deepseek_v3.DeepseekV3MLP (archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:378); archive.kt-sft.ktransformers.models.modeling_llama.LlamaMLP (archive/kt-sft/ktransformers/models/modeling_llama.py:250); archive.kt-sft.ktransformers.models.modeling_mixtral.MixtralBlockSparseTop2MLP (archive/kt-sft/ktransformers/models/modeling_mixtral.py:804); archive.kt-sft.ktransformers.models.modeling_qwen2_moe.Qwen2MoeMLP (archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:250). Rename to \u0060SmallthinkerDenseMLPBlock\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67bb67e8b0c8b883cdab26eaa4eacee1ffe06b3fa3780748a0c73e327d2567d"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060KSmallthinkerDenseMlpBlock\u0060 spells \u0060Mlp\u0060 where 22 names in the project spell it \u0060MLP\u0060: 22 of 24 names in project ktransformers spell the token \u0060MLP\u0060 (22 of 24; unit: names in project ktransformers containing \u0060MLP\u0060). Peers: archive.kt-sft.ktransformers.models.modeling_deepseek.DeepseekV2MLP (archive/kt-sft/ktransformers/models/modeling_deepseek.py:368); archive.kt-sft.ktransformers.models.modeling_deepseek_v3.DeepseekV3MLP (archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py:378); archive.kt-sft.ktransformers.models.modeling_llama.LlamaMLP (archive/kt-sft/ktransformers/models/modeling_llama.py:250); archive.kt-sft.ktransformers.models.modeling_mixtral.MixtralBlockSparseTop2MLP (archive/kt-sft/ktransformers/models/modeling_mixtral.py:804); archive.kt-sft.ktransformers.models.modeling_qwen2_moe.Qwen2MoeMLP (archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py:250). Rename to \u0060KSmallthinkerDenseMLPBlock\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/mlp.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b98e5df15e2a10f22e020f38382d8104403b0e5cf8063f7700a5d51c9152a3e"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060kt-kernel\u0060 (46418 LoC, 209 module-visible types across 13 directories) overshoots its size bounds. 4 of 12 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/pyproject.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a46ad8a4e5cd4437c0c0582992283e93a723da5c82fb82fa5cd574ee3bee24e"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060archive/kt-sft\u0060 (42717 LoC, 463 module-visible types across 39 directories) overshoots its size bounds. 4 of 12 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/pyproject.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2439ee4b60b54dc9c856d52e9d60ce6296045c400555d7e296cbe5bf34df6a0e"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060archive\u0060 (30141 LoC, 306 module-visible types across 14 directories) overshoots its size bounds. 4 of 12 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/pyproject.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d8eb21ffd44862d2b9d2776e81f0563050bd9dbb322ea829adbc7f3c57b5fa"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060archive/ktransformers/server\u0060 (9944 LoC, 202 module-visible types across 23 directories) overshoots its size bounds. 4 of 12 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/requirements.txt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"21019e8d6a54336dba7b8047dfedd80a2910bbdb32e9983024d2be4f182568ca"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d629c86ab76a064ee122def722b3dbfb471230416ac7af0f67ca1ee8da94b413"},"properties":{"commitSha":"4421d48108119b2362372c7f02ca98109b76caca"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cd394fa2e70331513aa148bdcca65feae83a15ca77e1c775055953dddbc0f3d5"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fa4c62039bc17be936741bf6e36067330e3c44892763f505250541cdf9b488bd"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eef47b052fb65d7c176724992c96e2265f6519f16e288ab7b02681ad566c426b"},"properties":{"commitSha":"18c42e67df28bb6c7f5dc847595637327919e5ea"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bfca22a24f1e95454fc52c0c4fdd698de471263d58910aa8f74822891b6ff7ab"},"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":"9cdbfaf3cdb62bde56b6ed6ad66dd9da8e8151817ef2a2724dc2bab6fa9ce864"},"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":"57e015dddb58d60f96eb1c2be93be7d89f633a9870b96815d95f74d7e44b7e55"},"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":"7207139c69936301f60486f4af856c64eb8d7cf44dfe284580730f2893d523bc"},"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":"97d61715da9806e8da6a2a3a705b6b90910d162c988690f92957bdaee4e7dbad"},"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":"db58a5578713dd045533c631e54e78c3ab59568dea4d9406e9ff92f3db3b2118"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"607e31176fd8c05ec416643dd5377c74c4e36b1f1531d12b5fde3bc175890198"},"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":"956a985573c0a03d4587604dd95754aa1a8cee22743e1cfd5feb41c5332fee7f"},"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":"28f53a850d8de25a488421cc6e9ad1e836879aaddf82f4c740bac76f248cab2c"},"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":"a2d7c31be1fa4f74c77a07fb2dea48e0856965a9757a9384020b108946928567"},"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":"3105e8bfaf82c88b88abc89b448825a152c062013d6cc72245114e6e73e707d8"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"9a0180c6c575d03f93dfc0db5097e7a50f820561fe31fb095ff65adcac9a6305"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"5b0b886c9e68960858dac51ba0cf434bc5498ab4c50d6f76fc2d3cd4499b3a81"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d57b8ea8c2ab70a8d52cd28cc95b00fc0def9162d68a2409ebbde849f767a9ce"},"taxa":[{"id":"CWE-214","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"66476ace45f2d5b50e0d3cd188c43464cf8161ae9066682a7bfb88671d365ce1"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d0bae3aa7826e0111aa7710c2cc1ba01cf983d5e74d8add2f9866a50641c878d"},"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":"4f7f3225e19dc3f1cbefb0387d13bb243fe529932f0d55b296fe2f9bbd4a0f1a"},"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":"ae6117996371c0e138ceb8806064ce6be191a1a11ef0bff9b891a4b8c4e2002a"},"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":"68daee1974fc7b05125b05ff964e9bbf564aa8028aad3f072775dfbbb323d17f"},"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":"ac7f4d1a53663664713f1fe8d47a9ffdcbc7ae484775b4db2ce622a3945cd9a9"},"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":"3d7ac53ff06ed7621bb50f64f5b0556c86e791a6ebe5f55fb7d651f32429c011"},"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":"3eff63f906680397137f34ae4f63617ac39901910bb4d51d883354091c480b1d"},"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":"cfd3c535b4d4f0743f0f66296d112b2033c58fefcc15fe7aced1e2cf76980f71"},"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":"e0e3b34d1f7c891e2d2c2992c3ae7affa8134dee6651700ca28be70e5362b4d3"},"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":"8ae87678f58f221e0ea1f645943230071d68c359429334e243a3b61997b5f2a9"},"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":"47cf648593bdb1c0058972b6ada21dba1759e2c62a48666693c628cbc36c9161"},"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":"a4c78dd8713eb5b29ddc51f2445000b666fc927aecf8acb4c9d1bb67a16c058b"},"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":"64266570adc9bde350d11dfd2f7300677559190d4df8617ced29a929b0fc3475"},"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":"3b8bbfd5e18a9408d06aa13a1b86dd0206e34f9779717ca6232e35a5a294b40c"},"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":"f65dc44d0893fd72fb6d762f3115885afd124bf8939a525c0ff2af41b0eda266"},"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":"03c973c8d7cc8219d54a2f61171faa0e333a039d5f45b3f0f65f7ef111eac209"},"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":"6fa6e311bdf73772e9ff83692b193bbc85f1ec81ae2fa5e67678407752cdddb8"},"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":"661edf18f54642f50273a843572a79d965f39c9c84224f095eeb4ea42dd5a044"},"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":"5cd8ec63581a8ee49d7832b5c5d6d3847e5a2c553e223e75267ed8471be45906"},"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":"f6b7fdfb375b5d2e7adce6a72aa944f2b1cdb8384c17c82a51178c6a7212e337"},"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":"47854c92bdb9dc259e19da94145aeb98b32261d66f93e452d24d2ad2b5c7d3e4"},"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":"23eb9929da80a2817489484a76690b7ce64c3e7bf48559ba6029b29849c48519"},"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":"3f4c6aee464dfbc5153e270f42f9f71bc25da146fb083d463568e8b7e10be15b"},"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":"312bf95359eaf877ada89a5cb2bc5217684be3d4453997d8e4966aa34f3cd23e"},"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":"58565ea8be46a04a09c6ef916da4332303d0e7f6de836e5959c0a9eded5d468d"},"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":"7bdb1b4cec35405a76d095699b5be0641ef3c31a8062fc1fbd2b1a51b0046dec"},"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":"68ceb25bce89b82072a48a7402f6cf475d973514d71661e044b9eab095d7df0d"},"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":"a914b1bef531b3b064ddc7598a1ba0103d79c55ee4816b8a89e0f625909ddfc8"},"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":"dfd8598b856c7a3470039ad2aec1692f39b123d6dffb86bb8d736b559c6ec0a0"},"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":"8527d709f9bd3004e5a8fe8124571cf946d3dbcdbd5bb59218fd9e06d85a9176"},"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":"6a27120eb0afd638adfe5cff4522211aa98d0d96a434ef53bf6b0a2df54cdeb4"},"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":"04f694abbf8079d5c0fb71af051d0d3825329c3d440daae44ded6604e70a03a6"},"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":"d8cb55cadd781bd41b3d6df8d83b177bffcbe2399d52a0dd2bda8b0f328ac066"},"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":"9d57f9fcfcadd75ee29538ec32bbff599d23b6b391e04f402ec35743cd751d5b"},"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":"85071510687f2383e4992af7566182129be2357a1b2448f14b0aff9809237ec0"},"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":"78f39f10ecbc1a734ec9a3f9d729b8947058e4387852d7d46debfa467b0f0cd9"},"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":"99fe161d1f1e1071c5d4d4c02121e47a423a6eea83716b93195905a82630b46e"},"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":"6caecbd55d9c4a9bf3c1ce9165f8f31450285a967fbac9086499772ef503e4f8"},"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":"39f46f9d0b7e0fe88bf9b2ace3f12ef408b65ad5ecd3abf1fcd3788f525c3a03"},"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":"ce8f03c01448260108cfeff925bdfb7f6bab4455c97e2887e17c94ebc8e88ea1"},"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":"9d6703963408802892beffb9148c1b76399592e0303e6d12baad043d1b323869"},"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":"bb6694446e1f5f77a261eac0b73a5c98092eb771bd43037ef16afd69b70ec3f7"},"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":"6256ffb3d3ab3b2da89512013a83b9e8032d6ad76141f37ddd26c84de453eda6"},"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":"5e9f47ace3e55d410ce73971df02b4f0f82ab1f24705a74dd81bc1f49a7b977d"},"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":"6f0c21313d6f899472a47c297ebd67f5a548d4eef509e8c5b23dcf0033d56339"},"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":"3e068504eb5ce41e518b67a9cb9c28af14a619bf912f6cd78c7721024fa4e61f"},"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":"87774c1a0e3c1bde044e4c5ed79f27ee2eec0b278297b8badcd26f61d9170d9f"},"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":"2b9116a3023cff3ca3166168de425b8ca250551fad686a73caeb1725508ef4d6"},"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":"ecb712d49325d93acdcfa3318e7c07fd379e292c0873bd843b2b84621cf8a070"},"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":"a0aa26be619f6c60820b3d250911e1544f2e21d6f78a5e155b8bdc510ce73062"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2cc03e92e07fdb4e8bd0dc4365fc8de03ce40c40a6089cd35b9a76e095f597cb"},"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":"44897b6505e2a7628c6310f5240a7f36107cea832ed21154ea8fc3c650bd326d"},"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":"13a7c93fca0c4aee408f5b5fa68a90a924ddbcaf7f4ccf9bf223cdd6c9f4b614"},"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":"c8fadbbfb3909a16e4b1ddba87b1dadb26f8b4a087f8c5b2682334c43a8ea192"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11c031b16ad61f62b1ede212e8de58a3905eb842fe55ac3278aaed2a779a4a0c"},"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":"f703b89fcff52c0c840c0f0429a962bc459f70421540972b75e12cb0d95da71e"},"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":"44e9ca2c05ec0099ad41c0b6580e7e13828a83fe00cd146273f1852d74a0a460"},"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":"e3d21973e039beaf3f4bd8bf95dec7a1262f4e560dd475e43fc01c887fa168b7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5b0c295dc6fc087a11d0f2b4c3656bc458d06426f05d08e8c6ed1fc9d12e0ab2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"134d88abb307e75af1d7e32be4cd921c934610f918cff3da530d9265e8b93e74"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dcd94d86e28bff0bddda0cf2ea3b63857e48865a135b9419da727871c5a07418"},"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":"2f7243fb1c344c52c14a616592a2863edaf43a876be8968e715724e427cfa9cb"},"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":"930a8055f38664e6f5243702adaf25a4ab3a079ed5a78ada9ac3eefb71a456b4"},"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":"df6a0366efd4f30d407faf934b42c20276fec7db91717187fef101e170f084b4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"13b61f166343c1a54318116f5de992a856567d5dfd932883347dc87db63da7f8"},"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":"69bed454b6ad25633b822486f247447259097e4c952cabcdf6c311e4ac86a421"},"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":"1ac978cda7902e24c9ce348e74b21dcf1ae145ed01940f9b566959a0f2e297a3"},"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":"5a14472048c103675ed5f8e429d23069177c3ea941f691206a8671ac999d3097"},"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":"69a8d6f706c7db1f4f5ed2049d6afce3982134fc0cff8ad76f4f1eb8c888e582"},"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":"32da87d454a0b97327767ea5cf5688adbd503fd92dd8624d7a6f4f880ebb666f"},"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":"b63aeac6202cfd3bd0053a57bba84ac329595ce7b99fa9fbf739c3a193ec3c27"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11fe080ec1fc5a02dfab8aaea5bb0ec8cba5c05aa89c3bdf54d18ce44550bf45"},"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":"aea2cc9481fd8ceaf143bbc26233bbbc9c2eabf36d3d439b47a050c80d2bb9a9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"971acaea37366bcd9cd4d1dbdc2bb760597ec1be933aa250e8b527b000023e9c"},"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":"0a0d4b92695b97126c16047edb8017dbdd6d3a780784c63aab1c9686ee69c8a6"},"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":"e9166173eccfd88892f1616890ec86ff58622ef9349bf2cb3f29e9a72d138d1d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4d6d6c3b4edf116ea39185f07fbb3c8d42ef6666855aab96bee60e2cc6414eb4"},"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":"3910b4867a72196e1b4f2312ee45ea55d6426457267112091d653b47b2931c54"},"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":"ac23be350b70cfad4d8e7f477a3700f1a695c41586defdd910a632a9432ed930"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f3c06ad4f7b0fbadbedca5f038a9ae6e0880d918b516aceecc52828f306308a2"},"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":"e4568401c764f08bac597ffaa5ef71e2d7be46cfa1644d136c426316f391c579"},"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":"013be301b865527e0c9f321d2ab21bcdf8a82ea3f44d22540e8f1944d8d4f2ff"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"78cd02673ff9e38de0632ac4d289fa482b1a4da5cf30dcd175a6de2e560a12d5"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6ed95416402e9962dd8805788b1305f2addbd4c278d8f65ac8d3380c0d51b0e2"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c5d3371c1655c7d17900eb3cf4461928f32f504addde7fc9498c59737b3a45ad"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e0a75f1aed5de373e535afa392912790d2245292a6c7276171175250d409b503"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ccc36c566a901115864d4b1cca6abfb7e763474bd607dd74235825679b6d6a75"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c701d3b7e112db4e9fb45bd33df9dc54d40e075917835cd860b68953f451327d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"6290db550e1a8257b195cd14a6bc3774703c4e987d464d6f3fdac2b47ffdb331"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"29eea7249094271141e58633ee7763b3d9c9da3e70a159dc9979934721ffa4f5"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"53e5cecc774dacfc90dde24157c74ae6370f0bf6d306ed846b3e909b29569f2d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"0f619b49515ac5f1750e5cf53e0f7cf0c8e378571c9c3c9f1278116a593b3762"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"58ac17b996c2d1253c544b19922de1b5a7c195d360b89a566627df2aa6e7d62f"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"91c35bc1d525d935aaf459e53a2fcddb6d0e7b9310b5ade9cc7582d974a1b60b"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"f66a28ad05e85206b37efd1833b843b1ac0d334671db5c71f240f123c6e3ff82"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ded0730c99d5940ea7458aedfeb1427d7ba9edfda52578ebb1b9214587ed58f9"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ccbb8c9213485b6f66c6468f5a95d1d7374c7a3f012ee2e1a08817bbf7521cbb"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ef2ca9886cdd6a06659c9f471c70ddf4c9c4dbabd4aaf7440354fd4247631144"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"4a6146a8e4727cea8c9f792f61b5b1bff5da145d0038b9eea262e4b3b295d2dc"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"8ef84c9636337bb2076825050c48e9d0cfc5f0f5c41f3631176152edf4fcccd7"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"25bd8287d178aca16ba00902b9fca848dcb12b8d0c3deb8c8fe0aeddb574ebc9"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"f300965bf480f8b119f3b228e559ff506bc67ed388550734ed4b8a436474a9fd"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"e2421f0b9aa88daafe834e1bed2956f2e55d79bfade9900d573972a7a696f1cf"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"4a4190897ce5554502ecb248d0b588e6ea8625c13769ac1e480b33f013162189"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"666bbc2c9444ef5f8bcad1a95f459b21f7fa3def0c6436a28bc0d8b3b4209f0d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"97f5e6f6b9135b0ad32cef15b40817bc579df0defd5e57ab8edd8537db4ffbf2"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"95da80c69d50f931b24d6056fc033db6aa890abc7145403b3b77d1e1b2af3a2d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"3f6291450569d8fe978ef2958e355ffb3fb219920ef133aae9350b5b0fc85ba4"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"4cb9471cde8ee61e399a23656e1fe61ee9e3ddfaeac554767d64320d868e64d7"},"taxa":[{"id":"CWE-200","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9df0a54f4c29dd55f63db7b0bccee37776a8569ced1f71217d3b3fd1434673e8"},"taxa":[{"id":"CWE-200","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c3151f5d94895cbaf8b6110fad056c0a2d4662b126749baa374145e17710a700"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c302821c281e52acef494a5efdae40423548f3ed6562cc31f1971dfcc7692c66"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"0ce5eedb254956b947943a1a3a94174b61b865363f4c4d4bdd8b3952bc6d85cd"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"60fd8557ba22f6b581d3f8a18bf44c5f594b7b7a75ed434bd482b5e5e17622ec"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"df9457b9f678832470698bfb5d24865c585475cf8b4933a4ae46726ec9be32ca"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"2ebe91c85ffcef2c10042baf90235074982b8fc6f20cc3dd6f1e0891ff14beb1"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"29c333fc0e2383a5c6b8b5129850ad26c6d4cb2f5022e4708e828cd74d1f01a2"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"9912febf79d78f448083e3553ed2cb5b6c7beebfe36292933a848e8fa6dc358f"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"a96d352774d7316f16617cc5dcaeb3931d4649ef94c31da0d96302d957336b08"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"7b444678ededf188e0c4f06b762742930df1a629af1b893b14faa5e08e1877d1"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"7bd4c82af1605a954d746d533c346679a05a9098ba9c7d0c652d51a6e97180d4"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"0ee60e3bd0b6300c8e5cf4cd691e2c187ba498d9f276d0b5bf03a74b430423cc"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"de5bd7a57ac5920ada64b8b0510d68ee72d2bd4546316c99508cb1d5d4e9a9b0"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"45184f55a553058d7a705e281c3f1974eea060ae87624fa4ac854a3501dc8ff6"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"2f6607ff29bbb85d260e998b5db28f5807030b150d23d5ab7786a6edfb4eb498"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"c2d58621feec72a845282c9a0595dcee04db7be24eac30222b118c7042b5e7b4"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"fd1e7a93f1a8bbf85527d91c824f72427b3ddf735af3d1eb91dee5fc01453aa5"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ae0d38086493f2b49efa812609883ca016603ef09ce4e1fd54b2129949bb392b"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"4044201682d5c9db46756422e9f1ae98ff59babeffc5f972db9730d812e2173e"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"f5386af629352edd36d83c93046e388b9ccdf99b8d6069da112b463afa54b2a8"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"8cc60c821287cd666fe18f0dc8c1c76eef5b4d0b8464a969d48d291ecb6ac283"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"1ad8c1908ac57f316cdcb177a8c948fe49514e740bcef6120d6d0e158d29dc1d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"3c4294f357ba9461357740689448201e427f691bcfa36e2c44d9593cf02da930"},"taxa":[{"id":"CWE-200","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"822e8b9ccd3c0bb5612a6fe7e7cc0c0ee1965d72170886d1e549d1acdfc67e93"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1e0f95606b6e0bfee06a57b5be782d025cf514ad6302a34b8d7f8e83f7e3ec1e"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b2f20689e28ad19c0498e74e7b6125d29536801ac7bc1472c47909c040c1b65f"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c64e43e40e6fc836e20e8295fd44899e76e75684bd0abafcd5ecbb26317d1713"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c5dffce027acf5c1ad4a156a12d5529809cd6820cf894b7c18bd5fe364d67f5f"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f977aaf1ee558d87b0d9000c33b915ca305d19c2a8c030180bb9062356a65d7d"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bbee99a2994e37967e551384480e140d1181b219f5ad115842045323b20d4b86"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5f41c3996906773cabb4660865147b81d3ee93b39e2ba929f253a65eaeafd37c"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f35a3c44024fdc61c75951869754881c8d58451f6f06f7252fed5c831aa59711"},"taxa":[{"id":"CWE-942","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eeba8a27969403dfe094b6a874d8dcb16bf8026f2d130d1060822b1141c9ffb3"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8d87efed62f58f5a722d361bb8516f853b10e7a16681854175d5684a01cbcf05"},"taxa":[{"id":"CWE-942","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"42e558aabae6bd8f705ba72cfbf2d1f304ffda2d9a60f180e000b98072ddd284"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"48319c9abc86201ec55b1cec2d536899443712d8bc42f37d22cbef9499714edc"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"25495eea47c6c8d4e68cf1c5501448009688379c3827387b4fd5f7c5b9d80c4e"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fbf026118c98a2375e903084517ea4c7d9bb30728b9da506ea67e744d05ee093"},"properties":{"dependency":{"package":"nltk","version":"3.9.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-2078","PYSEC-2026-2085","PYSEC-2026-2235","PYSEC-2026-2236","PYSEC-2026-2237","PYSEC-2026-3581","PYSEC-2026-3582","PYSEC-2026-3583","PYSEC-2026-3584","PYSEC-2026-3657","PYSEC-2026-3722","PYSEC-2026-3723","PYSEC-2026-3724","PYSEC-2026-3728","PYSEC-2026-3729","PYSEC-2026-3730","PYSEC-2026-3731","PYSEC-2026-3732","PYSEC-2026-3733","PYSEC-2026-3734","PYSEC-2026-3735","PYSEC-2026-3736","PYSEC-2026-3737","PYSEC-2026-3738","PYSEC-2026-3739","PYSEC-2026-3740","PYSEC-2026-3741","PYSEC-2026-3748","PYSEC-2026-3749","PYSEC-2026-3750","PYSEC-2026-3751","PYSEC-2026-3752","PYSEC-2026-3868","PYSEC-2026-3869","PYSEC-2026-3870","PYSEC-2026-3871","PYSEC-2026-3954","PYSEC-2026-3955","PYSEC-2026-4318","PYSEC-2026-597","PYSEC-2026-96","PYSEC-2026-97","PYSEC-2026-98","PYSEC-2026-99"],"severity":"critical","fixedVersion":"3.9.3","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"16bf22c3b87d7635c29d09006755240f42067b5d6c0f2b0d6ce3018be96df18c"},"properties":{"dependency":{"package":"aiohttp","version":"3.11.18","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-1097","PYSEC-2026-1099","PYSEC-2026-1100","PYSEC-2026-1101","PYSEC-2026-1104","PYSEC-2026-1105","PYSEC-2026-1106","PYSEC-2026-1107","PYSEC-2026-1109","PYSEC-2026-2094","PYSEC-2026-2095","PYSEC-2026-2096","PYSEC-2026-2097","PYSEC-2026-2098","PYSEC-2026-2099","PYSEC-2026-2100","PYSEC-2026-2101","PYSEC-2026-2102","PYSEC-2026-2103","PYSEC-2026-2104","PYSEC-2026-2105","PYSEC-2026-2106","PYSEC-2026-2107","PYSEC-2026-2108","PYSEC-2026-2109","PYSEC-2026-2110","PYSEC-2026-2111","PYSEC-2026-2112","PYSEC-2026-2113","PYSEC-2026-237","PYSEC-2026-3545","PYSEC-2026-3546","PYSEC-2026-3547","PYSEC-2026-4365","PYSEC-2026-4366","PYSEC-2026-4367","PYSEC-2026-4368","PYSEC-2026-4369","PYSEC-2026-4370","PYSEC-2026-4371"],"severity":"high","fixedVersion":"3.14.4","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"47ce8cce0e22a1179d49d85b866c352c3948dea9ae8a0c328d2f33d8b2cdd0c5"},"properties":{"dependency":{"package":"pyarrow","version":"20.0.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-113"],"severity":"high","fixedVersion":"23.0.1","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4eacc973a65f2faf96674920e45e756c1639f0905a7ce9d5bb8a6c754e803216"},"properties":{"dependency":{"package":"transformers","version":"4.51.3","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","PYSEC-2025-211","PYSEC-2025-212","PYSEC-2025-213","PYSEC-2025-214","PYSEC-2025-215","PYSEC-2025-216","PYSEC-2025-217","PYSEC-2025-218","PYSEC-2026-2290","PYSEC-2026-4174"],"severity":"high","relation":"direct","declaredRange":"4.51.3","reachability":{"kind":"production","file":"archive/ktransformers/server/args.py","line":4}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e65dbc149d2e8aa61cd28db374379bff71e1d0a2fe8e2500e9f2e60b92b8e1cd"},"properties":{"dependency":{"package":"torch","version":"2.9.1","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-3000","BIT-pytorch-2025-3001","BIT-pytorch-2026-24747","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-194","PYSEC-2025-195","PYSEC-2026-139","PYSEC-2026-1856","PYSEC-2026-2286"],"severity":"high","fixedVersion":"2.10.0","relation":"direct","declaredRange":"2.9.1","reachability":{"kind":"production","file":"kt-kernel/bench/bench_attention.py","line":17}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2e017704f4a08576b5e36e161398645b85d54ee75dbd9af8c26de94d760fd6c3"},"properties":{"dependency":{"package":"datasets","version":"3.6.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-3716"],"severity":"medium","fixedVersion":"5.0.1","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1e26f305f2bf0e0416f330b3cccc9f36ce6eacd512936fe7cd3025b72b004e08"},"properties":{"dependency":{"package":"accelerate","version":"0.31.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-3804"],"severity":"medium","relation":"direct","declaredRange":"0.31.0","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d789b60243b0e4cda29ccf347b2fe39166657b310708281ac63029651ee3792c"},"properties":{"dependency":{"package":"torch","version":"2.3.0","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2026-139"],"severity":"medium","relation":"direct","declaredRange":"2.3.0","reachability":{"kind":"production","file":"archive/ktransformers/server/backend/base.py","line":6}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"73e43ec3b4a82a165c6030852ee46ed9a9e4c93fffbc4b01914cdcd24a96f714"},"properties":{"dependency":{"package":"torch","version":"2.3.0","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2026-139"],"severity":"medium","reachability":{"kind":"unknown"}}}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"49a4fcf860379a9386f83dd6ca6759ac49ce63651dd601428252b4ad71ad902c"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3105d97ddef1d108f0ef97524f4f4ad3afded2368465df85443743f9f4dc1b58"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d7401239752dd90898d31ca1bf537aed2a8a95aa1aa874c51384a90ce572e93c"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"792a13d06aba142a39238fb5162c3b9011f63c209284a1d9f48614690b75c5ce"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"34f1ef28c5d7f0bad0bd0feb69916ac1a114101ee92de0b42306d6e4f65e01cb"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"00de9915c31b0095a81ee43cb90ef0007b6c9eec5f02b02a4d2d1d33468eceba"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e6d5c24f4be667ab7768ce5912e341ab646df5f0106374c65aa24f7eb6e138a0"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0a24a450e497ee2ea5337f3f2099da4bcc4b0db8e03a7006f6e8b5810ceecb73"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5be137e4205d5adcb41a683012075a1b0d51f671991419f0f15d032504414997"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e562f6621b74c2b1a0975b5ce2a951595f4b5b137a9ad1ecc971d39add9830f7"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f9deb0b3e9568df1171bacf908174d514cb7e71041f1c1975b38340d1bde8fc0"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2ec435f25a0aa57ed94d367a6e67f88bcab34c9650c10297c0173363aba6703"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"485b5342ccd09a32be28189a425bba469d5cc01a89c53dc0820eaad991500512"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"0805a0589db50404ed401db860d60addf71869b846b7007f5f2681001cc9db39"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"9a46c7b076c2dc3badc595bb63868685200b35fcedc1b2124390dfa69b4358f4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"07dfc8efe56413631c403ed505b83f37c7c026f180f6e648c73686b4ab57839a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"4cae3c1f358d1ad9826c9f7e3a1cc9ba2fe4486b9146e3f33c7da3d4bbd744da"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"c9171f51022ac8271a35e9bdd10bcb5d3f333e80f44d987a93e3ad5dace660c2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"a21817a49f96a7c067e3ccab1b63b91268ce61460dc8cf5378117f25e744f70b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"2be876b3ba959725f18c0a4a9ad0ad48363cce6746cb1dee544e057dc1e684f7"}},{"ruleId":"D31","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":"ff1b95ae89f1b92aa8bca46ff2c0beaefc9a7d5dc1df40f60a3e5e49aa6599fd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"39ea3fc806b6f88a95a3c69b97e96d8f88162cf32b4de7249292e557fdf945d7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"1e316a7cf70e0cdf49605428ac0c3d8e9816f8a32eca00be919e8ca6442116b8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"66cfd8fcf3247a47aa792057db06541a13e611836e7204dbfae922e32bcdb9fb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"0beb5134fef48ca7eb61535c6692d270660231fcb1ee053d53c519de28c96edd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"9fcc08fc1ac665637d537d470b142eed56f867cb76d350cb490befa6e120b018"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"5115176d39ab090c17b3ba3d2c620583c4ab0726e4fc5eea1be73abeab843aca"}},{"ruleId":"D31","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":"73c72f09eebd7dc8ed69d56067bbc5f4a1ace906aac53fcd27c36d02f7b6aba0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"bfddb4066b9a619e018569cbc695db804634e053742071e25d8be1f91ca05108"}},{"ruleId":"D31","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":"94b6e1a5c45a34a8f954aaba5c144814904b2257fa2db32f9aea1fd1ea598c52"}},{"ruleId":"D31","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":"1f3b9a97c168aab3eef5b36c3c3ecf1a425e8b735acf3f67621f38c4dfe6977b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"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":"b8901c840d9539f106b9765bcdcae83a63157c58dc367b2140befd5d8bc08fc6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"9ac8e114f2e4dc793b61f311a1180601c28e05c5ad89caf7fc32c466e91ecda8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"e0740f034f3fd5f564871d945e4ff5bdd5e4bdfb8902133566407e0da2a88ecb"}},{"ruleId":"D31","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":"51f87702565b69e2a5f592351e1649d73a1d0ea0cda58792a7cc70d35eb61e9b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"3087367c9f1ca3ac3b0992bd077d6222feeef09db3f3f3a7b67223b91fe88305"}},{"ruleId":"D31","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":"bdbfe7806aad8cb2aae7c9ca49d89fa83bfc99cb18bc0564ef67380177e78364"}},{"ruleId":"D31","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":"0f7defcc56a9823a905573cb431715de20015df8871515b7754439a832dbb68b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"272a8a25ac29c1972e1997dce09cbe05f88ec8c24de95a9ac7c5950ff55ace64"}},{"ruleId":"D31","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":"fe30bd4b4f9839017fbf5d3cfba7239196e2e19bbffca3393e06b6e148be1555"}},{"ruleId":"D31","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":"cd0649e9d9df0ef0e4b4aa6f4ba1fc09d6c8ba1f232b8efe3255422d5d1fb179"}},{"ruleId":"D31","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":"e03013ac99b085e597ea326b48fd24e9b6cd974fd5659a8433fc572f79b5f766"}},{"ruleId":"D31","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":"394b600164a7259391fffa8a4d336eeb6fdd309045ce8e8f9b1eccdb7e448810"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"8c1c53a1d5c7236bcda1710a2d5b21d635117761936cea4c2872059ca6687c87"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"7783a4fe92276e350d5aafd40ad67f909922d5c4a4ab62334e032eb3b313e551"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"35f17586cf7b3ba2106fbdf3637d8a32e1c688623e5f8989a2e837381634f98d"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2e8b9a629ab2093006fe89bdc6bff532fcd9d4e055107868cf3666c4158df23"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f138db3c2812cb9ca6518ac61d48243f8f0e4071830227166f135a4b54b05e73"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2a18b95be434143423dae2e8bc3da3f28f2b0a32556c7fc3c1888dfad9bf5ac0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5bab8bc2441f3eade0ee9f446d699eab16d16076758c45548362a77030f85355"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f3e6442422daa3be1876f2b7734efcff1685cf0ba5aa62c89ec119a423fb1dcd"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"adf6fa1ac17f17b4a80a9d3dc51ae240452bb16aed797179d9129b3d88008572"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8af92e9c6d7ba6743bf9506ac5a1cbbcf6145e9960af48d450cdfe7fb046c496"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2a646120cbcddd89377f2bbf0a1a78a47aedb06067eefcd1ac1da4639c39cb06"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e8e6ac86adc23f064e00ce869e557b63be5e231913f650f358d732ce4d403b1c"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"379b47eca72c84fb1b9b2b7e981ea8d6c68d65101f4e8184ed97323955c84959"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c424db88ede4f17d55760a743946dba54211a0cb1f2f0fae23a33f0b56d0711"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"409479af9d08a9d794b933e1e92e9c1bf8a1b1ba2d74569867ebdb297c310f4a"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"2063e71b6d98b1a708ad90578c2729b576ff7669ff3434d51f99fcde06593801"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f570181cdd2e7a5d86385598470702fa4e4a01a9bf4f38c9e8430cfaf4adf5"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c769c8aa5178451299cff4a7b338c6c2100fe0f93419ef7d42ec168bc40f93"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"708ee1c68f7531f724ebe2c2e99fa16acb65daa0b49743ef9a4939efd6d308b0"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dd0d454a2819252f13cca78b4d864c3161e7402de7befaf56a8f858a1dce01"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd61b4e31d58dda0a826d1e2fa2847745c92557e9d9926d36c50f8472c28b17"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"96f3cd706dfe684c0112546ce4a26d24b5df12c02e7f4ad215ae3ab986697fe2"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"648035db1738a843cb7be647c533510df79d55073fd45618c29fa3c7a858c95b"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcad566232ba9609dd0ca336017574d6892fe4fb3e43661821ed1d41d99bac73"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45a25e948f8699693e82048b4543518a60c58457f672f9a32981030f581e3bd"}},{"ruleId":"AC1","level":"error","message":{"text":"\u003Cimg\u003E without a text alternative: An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt \u2014 alt=\u0022\u0022 if it\u0027s purely decorative."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"48dbf6582b1a262ffcd63c72cb9e793e4350dfcd0ece2bb51810b63ed970a706"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad32098bc5b2cdec16d6930431ae5cad2fc50fad7463c9eda2045d0fa267ef8a"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Cdiv\u003E: This \u003Cdiv\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7bcee6ce7f53cf57747e8b9167d29e5dc47259d7b6895b231dc38ddf58ee725"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"261d20f4a6113f44e3428bf5ee940079c75ee903e2d081fb8e25f8f811145199"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b48a34471bfa439153634393ffec047ec67be33e62d5f360f133b7f7febf8367"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c1d587038008f497ddf199e37efde71a85c860afb8efe763c1824374486f76"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3a0a6f18f6846b729eb1fe095824d01bbbc912f9bb19a9fd52c670e0795d99"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Cdiv\u003E: This \u003Cdiv\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e20f923418fcfff02c071358711c3dfcb015581f8d35c1badf266cefb86530"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a67756e2abf5ce5e3737215515826d7b7ca55a01d207314f424a36ba8b07206"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Cdiv\u003E: This \u003Cdiv\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ae656a060847adcd51dd7d63cf49e72dfb63f69fe9d8ad22ed7a519e0297e0"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f5c7f9fa2493ee96c634aa61a73229e499d6b247a9efb89c73817bc4405cce0"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ccf4f44944735d6af049f3955740aa550fa1a9b362040ca08e17d64789bafd9"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"70bc2cd665656123fedf486d51007802a2e020601f80e08443f4fac2daead815"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Ci\u003E: This \u003Ci\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30998900cc387a3fed472495e715dc06ddd9a54c8ad30425dba2f8d68a7b8e3"}},{"ruleId":"AC2","level":"error","message":{"text":"Custom control with no accessible name on \u003Cdiv\u003E: This \u003Cdiv\u003E carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to \u003Cbutton type=\u0022button\u0022\u003E \u2014 the right fix for its keyboard operability \u2014 does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"447c4ae835e557198500646e628c939a788235fb0653cbba48bdfc614e146c3d"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f5c4a6b6659019149b15ed92557c24d467387e09e7fd7365c2069f2e816be1f"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"7634703645591559df0f531f697d30f7699507b06c60f5c0ab45ce45f0617bb9"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"66431d4ca17f5cc87ad3e765d831ece2c45221a60efad97e6a0454ca77a93bf1"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"c451dfe6199c1c6e73863828bc359f250cd3b47763034227b80fb88e57a8d258"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"d597a4c48f8ed55e73ead38b2bb7f3599d045824366c0873a23f832b233e6449"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeacf31b60e90cad1b00058c42d453caa5a915a380d0d108e294fa04627c6d2f"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2952e4de5a6be9836ba8ec9316b15c2f9690a2b56222ae2ec7f3a288bd9d488"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c76778bfc97e7025d5f781d16dbe0d406486e7839a9e2377c28ac2229bc1446"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4f34748156cfaf4d6ee8a58ea2e7472608bd2fd8ec4e5d0be9d29851b00998"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/views/home.vue"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa89378a9ec317b80f08936c50ba9fc2c7ddc8b09398773e75526323939d038e"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"790805e5596c47ba9b0e35244cff4d8b414588db0b6ad5df903088ba5afacf30"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21f80ed13a24866ae34502624694b3850913e9ed806b1c7867b8dd602ef3aac"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element with no role and no tabindex: even where another element\u0027s key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a169a875e3ef70fa7aad9f07078d5573aea6359d884855603fc6d8b9ebb64c"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed94dd614bae3a94e548eff780acadb5f8278990b5a4ade0b85003368071f9d"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"47eaa0858fef20ad9fbcfc1e545c9ad2150132bc3772d7765e5b5c8ad5cf013f"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6c0a52fb1967684aee3e1674fe76ae1f85b291bea272b9db490c54fd87858d4"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cli\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"9338fbeac08d95c87faa19c29e04afbe07533d82276fa3a5611e9439e43dfe1e"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Ci\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac418da889ea4da40e24cb527ae30097f72186ca81970c0b2bfaa8d064ce5ab3"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"7747eb6893dbac62d1035bc92d8297e81e58214534a8733c9d971b6c5f1c6847"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cdiv\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabindex=\u00220\u0022 \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/views/home.vue"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"a278d7d4ce57f0a9ee9306d891ed13659ee2c46e27f3cd352dd81ab40de68d34"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (1.6:1): \u0060.stop-btn\u0060 sets color: #ffffff on background-color: #cacdd1 \u2014 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7034cd93cdf640a0ab9e29db4817afb92bfd229cffb6d0936bec42e8fe39052"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (1.6:1): \u0060.stop-btn\u0060 sets color: #ffffff on background-color: #cacdd1 \u2014 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/components/chat/index.vue"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"68853ff6918785e4a2acd0f266f4dffee342335b5a77e5a1903723e90ef722ba"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.icon_lists .icon\u0060 moves (\u0060transition: font-size 0.25s linear, width 0.25s linear\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/assets/iconfont/demo.css"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"09de2cc589a0f73d10cd668735888dc9f06415939639c712c850bb3b2d9b1764"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.icon_lists .icon\u0060 moves (\u0060transition: font-size 0.25s linear, width 0.25s linear\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/assets/iconfont/demo.css"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c49661c7c85a3b86f2dfd8cf16215d7b57b75c7cc26687d656991773d145a14"}},{"ruleId":"C2","level":"note","message":{"text":"Thin authorization enforcement: Authorization rules exist but no route guard, auth middleware or handler that refuses a caller was found."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1240e406e864a89e38d5e3fa370dee11971db94808c3db2fda9b41bf2e5b8efb"}},{"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":"M3","level":"note","message":{"text":"No src/ separation: Most of the production code is in directories of its own, but 2 application file(s) sit at the repository root beside the build and tooling files (\u0060ktransformers.py\u0060, \u0060version.py\u0060)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add bandit, \u0060semgrep --config=p/python\u0060, or CodeQL\u0027s python pack as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/book-ci.yml"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060archive/kt-sft/ktransformers/website/package.json\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/package.json"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"f901776c8845bbc4c326b77c960dbef25672db84d4c2b2f6aedc485d1ef95995"}},{"ruleId":"P6","level":"note","message":{"text":"Changelog looks stale/thin: The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct \u0060x.y.z\u0060 versions it names (a link\u0027s target is not counted) or its version-shaped section headings (\u0060## [1.2.0]\u0060, \u0060## V14.x.x\u0060, \u0060## Updates in 8.0.x\u0060), whichever is the larger \u2014 so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read \u2014 release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository \u2014 are not counted here, and this row is about what is re-findable in the tree rather than about how often you release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9a74c249fe67853238d9c15085f7f97d31f51bb82455046aa10c2cef82f67b8"}},{"ruleId":"X1","level":"warning","message":{"text":"Task from \u0060asyncio.create_task\u0060 is not kept: The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python\u0027s documentation for \u0060asyncio.create_task\u0060: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled \u2014 it surfaces, if at all, as \u0022Task exception was never retrieved\u0022 in a log. Keep the task: \u0060await\u0060 it, gather it, start it in an \u0060asyncio.TaskGroup\u0060 (\u0060async with asyncio.TaskGroup() as tg: tg.create_task(\u2026)\u0060), or, for genuine fire-and-forget, add it to a set and \u0060task.add_done_callback(tasks.discard)\u0060 with a callback that also reads its exception."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c9edb1de175531180fa1799b0931231b3eb45c47103799e91d79a3a25bb5e6"}},{"ruleId":"X1","level":"warning","message":{"text":"Task from \u0060asyncio.create_task\u0060 is not kept: The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python\u0027s documentation for \u0060asyncio.create_task\u0060: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled \u2014 it surfaces, if at all, as \u0022Task exception was never retrieved\u0022 in a log. Keep the task: \u0060await\u0060 it, gather it, start it in an \u0060asyncio.TaskGroup\u0060 (\u0060async with asyncio.TaskGroup() as tg: tg.create_task(\u2026)\u0060), or, for genuine fire-and-forget, add it to a set and \u0060task.add_done_callback(tasks.discard)\u0060 with a callback that also reads its exception."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6eb6ea5691eecafc5f1fc1f7594f90671406a5db02608c25a6460f6b5496b52"}},{"ruleId":"X1","level":"warning","message":{"text":"Task from \u0060asyncio.create_task\u0060 is not kept: The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python\u0027s documentation for \u0060asyncio.create_task\u0060: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled \u2014 it surfaces, if at all, as \u0022Task exception was never retrieved\u0022 in a log. Keep the task: \u0060await\u0060 it, gather it, start it in an \u0060asyncio.TaskGroup\u0060 (\u0060async with asyncio.TaskGroup() as tg: tg.create_task(\u2026)\u0060), or, for genuine fire-and-forget, add it to a set and \u0060task.add_done_callback(tasks.discard)\u0060 with a callback that also reads its exception."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"846c966ec7a4db749fe819753023ee5e231167eb93d955fdd0ae25131f564b0b"}},{"ruleId":"X1","level":"warning","message":{"text":"Task from \u0060asyncio.create_task\u0060 is not kept: The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python\u0027s documentation for \u0060asyncio.create_task\u0060: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled \u2014 it surfaces, if at all, as \u0022Task exception was never retrieved\u0022 in a log. Keep the task: \u0060await\u0060 it, gather it, start it in an \u0060asyncio.TaskGroup\u0060 (\u0060async with asyncio.TaskGroup() as tg: tg.create_task(\u2026)\u0060), or, for genuine fire-and-forget, add it to a set and \u0060task.add_done_callback(tasks.discard)\u0060 with a callback that also reads its exception."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd0fb31ead981c93fb63fce8aae17953966dc1e101bbf0258673a77fa7497fd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060localStorage.getItem(\u0027lang\u0027) || language.split(\u0027-\u0027)[0] || \u0027en\u0027\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/website/src/locals/index.js, archive/ktransformers/website/src/locals/index.js. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/locals/index.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2f6bf9405de9a379bb4e4cf715878ebefde48db59164e2d455d7cf8aa730c3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060navigator.clipboard \u0026\u0026 window.isSecureContext\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/website/src/utils/copy.ts, archive/ktransformers/website/src/utils/copy.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/utils/copy.ts"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"87400b2089fc1f978174650d7beae34a786e9fa0724d385917d7471fb5a55f65"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022[\u0022 in msg and \u0022/\u0022 in msg and \u0022]\u0022 in msg\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/model.py, kt-kernel/python/cli/utils/model_verifier.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2446}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57dd545ac3a413d9cf8cdb8766c70d18500777488648500ce3a0a12f9fe5049"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022attn_k\u0022 in name and self.gguf_file_meta[\u0027general.architecture\u0027] in [\u0022llama\u0022]\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/custom_loader.py, archive/ktransformers/util/custom_loader.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ff944f6fd3f5fb4c07373bb4af1e2796ac27e060a5f3b98ecdd04d886982627"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022attn_q\u0022 in name and self.gguf_file_meta[\u0027general.architecture\u0027] in [\u0022llama\u0022]\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/custom_loader.py, archive/ktransformers/util/custom_loader.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f6380f16fbcc81c6df294ee230fcfea0372aa1992268f1486e5d6128b3d529"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022class\u0022 not in match_meta and \u0022name\u0022 not in match_meta\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/optimize/optimize.py, archive/ktransformers/optimize/optimize.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"28fb253be1fb361633e824eeef30b4850b251168c812e56d69ddf431c120c327"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022kv_b_proj\u0022 in key and not self.gguf_loader.has_tensor(key \u002B \u0022.weight\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/linear.py, archive/ktransformers/operators/linear.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec972c3808866816b88a4a17072dc5f945f0f42491210bfd862cdc3a1d296db7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022kv_b_proj\u0022 in translated_key and not gguf_loader.has_tensor(translated_key)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf4a055bb734b46b28d1dea784f38a009d5c6afb2cb69777c057db0a63417fd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022mlp.experts\u0022 in key and \u0022gate_up\u0022 in key\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"b857cad1a021691a0cda1fdb4f6b954d2a18ff2d725ffbe307c0ad7510fa8028"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022model.layers.\u0022 in key and \u0022.mlp.experts.\u0022 in key\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc5ef656ea863e115835c790a3c31e852f365626c7306e58624b4bfa9ba92f1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(self.last_request_id is not None) and self.last_request_id == thread_id\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/server/backend/interfaces/transformers.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e58024c844af2a4dbf61dee31fba1cb10f70573387ff8483ef11b4a3c0a760"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060CUDA_HOME is not None or ROCM_HOME is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/setup.py, archive/setup.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"c833fea89c6d8fd306933d8268eafd3b08b27517a1343e171f9d8a4a4dcb8748"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060_flash_supports_window_size and getattr(self.config, \u0022sliding_window\u0022, None) is not None and kv_seq_len \u003E self.config.sliding_window and sel\u2026\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a702b9755bf9e41660650a7e1e3f973ae4c5ebf0e75d307122e3344a5b18f2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060a_s.is_contiguous() and b_s.is_contiguous()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py, archive/ktransformers/ktransformers_ext/triton/fp8gemm.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/ktransformers_ext/triton/fp8gemm.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fab63741a9719406856f79de9af0842bd366d8283c3834a1d3f7040146b086d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060all_gather_group is not None and tensor.numel() % all_gather_size == 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a8daa58c556ecbeaa569752de44aa9613b4ee96f86df3c39c506cf437e1f19"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060anchor.dim() == 3 and anchor.size(0) == self.config.kv_head_num and anchor.size(1) == self.config.anchor_num and anchor.size(2) == self.conf\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"3de74023029c0ff3eecccbba3db5da50f444db2a0916f7d3d0611a6d6591a19f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060anchor_type != \u0022FIXED\u0022 and anchor_type != \u0022DYNAMIC\u0022\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/dynamic_attention.py, archive/ktransformers/operators/dynamic_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"24624a21808168652027d18a73c13e8e09c611a1b61ed6784df5d608f14ba235"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.model_dir is not None or args.model_path is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/args.py, archive/ktransformers/server/args.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2171de0678207fc6e3a26c2d1cc2f671d74b1992c37b2235b87ba042c291f2f6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and 0 in attention_mask\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1455}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5caa390b3a78d44785d26e86dddc0470a222ff8c89602ea593bf8ce0d26dd6a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and 0.0 in attention_mask\u0060 appears character-identically in 13 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f6bbabca96fe612006349269d9b02a1e441f08b89c67dde35130dd2995f1ba"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and attention_mask.dim() == 4\u0060 appears character-identically in 13 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"4532885ed87fcf45c50e42f84834d5f6c9b8670f2441bd952e2f3f3e7c2f03e9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and attention_mask.shape[1] \u003E input_ids.shape[1]\u0060 appears character-identically in 6 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_deepseek.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba9fa1d171ab70cc4718c32b120d0e05f48b65eb7076bf7cb93405d0f4f2021"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and position_ids is None\u0060 appears character-identically in 10 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1824}}}],"partialFingerprints":{"codehealthFindingId/v1":"85cd15d66fca768b91fc7e457a68eebe7b66ca3387cc9b2df86d5b0edda9720a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attn_lse.dim() == 3 and attn_lse.size(0) == batch_size and attn_lse.size(1) == q_len and attn_lse.size(2) == self.config.q_head_num and attn\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c22d4690f9690d97393b7c509d0d3d7e89830df7af92ef35c138b30e9a0273"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060backend or torch.distributed.get_backend(get_world_group().device_group)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":1044}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93f55e2a3e01698f1e60b9a81f37d1cc6508a7cb5580e0de351b2c2f38692a1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060batch_compressed_kv is None or batch_k_pe is None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/balance_serve_attention.py, archive/ktransformers/operators/balance_serve_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/balance_serve_attention.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf9b431fcc56552afe3fefe66dae6c2e68f082fcfe4020590aa5ef0a2026a88"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060beta_fast is not None and not isinstance(beta_fast, float)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6b93c341b444a1918e8920546f2bd1bdd7210fd3952b19939e6c3aa589dedd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060beta_slow is not None and not isinstance(beta_slow, float)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0acd5e7c0b90ec8d484ad1d366a4888ebb17272b0839e5406c4630652a3e12"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060block_table.dim() == 1 and block_table.dtype == torch.int and block_table.is_contiguous() and block_table.device == torch.device(\u0022cpu\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9138d62abc302c402fe93b61d1e4b317c0c149d6e6ad449c9992ca69cd6a9c01"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060block_table.dim() == 2 and block_table.size(0) == batch_size and block_table.dtype == torch.int and block_table.is_contiguous() and block_ta\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b67587c1943f0275d6544c8e4eca9cc9cfc84c55afba3867b61fc751ee6df4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060block_table.dim() == 2 and block_table.size(0) == cache_seqlens.size(0) and block_table.dtype == torch.int and block_table.is_contiguous() a\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"061131ee3831e661a8fd0f444b8b5d1d1d769163511d53416a359f6eb1dd32bf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cache_position is not None and q_len \u003E 1\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"94248f94cf9111ca57cd4628ab2604b30479d90c1c093882432b33b093f5a21b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cache_seqlens.dim() == 1 and cache_seqlens.dtype == torch.int and cache_seqlens.is_contiguous() and cache_seqlens.device == torch.device(\u0022cp\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24903c8de8009f8bf9ace592bf47cc3145f05b7b4c71057636ffb952116172d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cache_seqlens.dim() == 1 and cache_seqlens.size(0) == batch_size and cache_seqlens.dtype == torch.int and cache_seqlens.is_contiguous() and \u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc657377ea0edc97d22e09835a4aae5b13aca5cd7e6abb10dfca74655d57939"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cache_total_len \u003E 0 and cache_total_len \u003C= self.config.block_len * block_table.size(0)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e783be6c6de89f4c7038ee6edf47c77beb10dcd3cf018d0785dbb9df04480d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060chunk_size \u003C= 1024 or chunk_size % 1024 == 0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/kt-sft/ktransformers/server/balance_serve/inference/model_runner.py, archive/ktransformers/operators/experts.py, archive/ktransformers/server/balance_serve/inference/model_runner.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fe5041cfdc5823fc57a135b55430b3d8c2bc85ac7d1bea9d94d373d755d5127"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config is not None and len(rope_kwargs) \u003E 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"57514ff9614012a72fa6cfe4ca70f9b81ab5606e9bd97e7a3a5263fc45e64dbe"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.architectures[0] == \u0022DeepseekV2ForCausalLM\u0022 or config.architectures[0] == \u0022DeepseekV3ForCausalLM\u0022\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/local_chat.py, archive/kt-sft/ktransformers/models/custom_cache.py, archive/ktransformers/local_chat.py, archive/ktransformers/models/custom_cache.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/local_chat.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"3715589840b468b617efc6b6a320eb87587a98f05afa59c63b86450f6edc8763"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.architectures[0] == \u0022Qwen2MoeForCausalLM\u0022 or config.architectures[0] == \u0022Qwen3MoeForCausalLM\u0022\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py, archive/ktransformers/server/backend/interfaces/balance_serve.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"648ddfd40c07e69c9fd497337d8fcd0c6f5530513a59bb67dc0c9d0a0d83d2ba"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.architectures[0] == \u0022Qwen3MoeForCausalLM\u0022 and config.hidden_size == 4096\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0ebf0748d972830fd0c166d2a5bb9c6b93cbf23d46cfdf46badc72837d0c3e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.get(\u0022quantization_config\u0022) or text_cfg.get(\u0022quantization_config\u0022)\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ea6db28843137ce40d285329a173113a183faefaf6d089addfe641c8e07b8e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.n_routed_experts is not None and layer_idx \u003E= config.first_k_dense_replace and layer_idx % config.moe_layer_freq == 0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a9844c6e614da2cf09787ec6694c1e6a1563881c5c7426f512534e05dd7b9b6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.num_experts \u003E 0 and (layer_idx \u002B 1) % config.decoder_sparse_step == 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"306c9657be083b791b1e44edd3e01fa09ec7550d035d28791fd06338b215395c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.rope_scaling.get(\u0022beta_fast\u0022) or 32\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71418663c70fa846ec838e4ff979cbaa0834d92f39f4ce39787daa28c85a332"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.rope_scaling.get(\u0022beta_slow\u0022) or 1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"52dc2e76b24b601b0d9a8b752682003f8da5349f689c0c6771fb3cfe4f5430ae"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060create.max_completion_tokens is not None and create.max_completion_tokens\u003C0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py, archive/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/legacy/completions.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"d39668fd525c5bf4470b9749e52982053cdd7c0583439319347071133a3a809c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060create.max_tokens is not None and create.max_tokens\u003C0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py, archive/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/legacy/completions.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"dff6961ed123fd20f2f1be625d3d813a70641352df4a9060b823b23071f73f59"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060create.temperature\u003C0 or create.temperature\u003E2\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/kt-sft/ktransformers/server/api/openai/legacy/completions.py, archive/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/legacy/completions.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"290b4901d3e25d0964e0ca60ae6663cc510d78f3abc6941cf5236a598bdb502a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cuda_version or t(\u0022version_cuda_not_found\u0022)\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/doctor.py, kt-kernel/python/cli/commands/version.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/doctor.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf41cb34c184c94163b04c9431934cd67035f1e1b5ef7c805235fc4b6bbba92c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cur_device not in self.stream_device_map and cur_device.lower() != \u0022cpu\u0022\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2e1fee2d4426047d4c7778193b87a736acd7ed49e5d2f58b81dcb89663c7ea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060device_manager.gpu_vendor == GPUVendor.AMD and Lk \u003E= 576\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/triton_attention.py, archive/ktransformers/operators/triton_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"2668177a73f193aac2842a786e4ee08c9d1d4a728258975d35e6ef8134934b76"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060dist.is_initialized() and dist.get_world_size() \u003E 1\u0060 appears character-identically in 3 files \u2014 kt-kernel/python/sft/autograd.py, kt-kernel/python/sft/layer.py, kt-kernel/python/sft/lora.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8632de28f48a424acde8f7547f048f579f07e00db09e16acf3af3c366620aeb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060enhanced_messages[0].role == Role.system or enhanced_messages[0].role == Role.user\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/endpoints/chat.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"6033c7d84879f8a50e9cc4c12a023e9c6359ff792067cee9fcdfb88dff61c442"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060entry.is_symlink() or not entry.is_file()\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/artifacts.py, kt-kernel/python/sft/ephemeral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":1940}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa14dc7f54976760eb8994634bbc801c16315e410bb27d977d49fd2266d4c5a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060f.is_file() and f.name in clean_filenames\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/model.py, kt-kernel/python/cli/utils/model_verifier.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2428}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9b77e17f070bd0f4f333e418892af0fbad5583b93124fba8a910275fe2a009"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060factor is None or not isinstance(factor, float) or factor \u003C 1.0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ef2e70a358c7e295b8e2106f06fafe0308b4183b643ffc6e87c47b18647c1f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060gate_logits is None or not isinstance(gate_logits, tuple)\u0060 appears character-identically in 5 files \u2014 archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4f0a1f917bfa4ec1acd0e3e0086db4a2a4a2f6c9f4f1c367d9c043e9d3cfb0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060gen_prefill and prefill_query_length != 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py, archive/ktransformers/server/balance_serve/inference/forward_batch.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9241ea59e6fa9ef76be34e8602a620b6623468979c177ae1c03c2e02151ef2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.epsilon_cutoff is not None and 0.0 \u003C generation_config.epsilon_cutoff \u003C 1.0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c14bf5e08975b29faf849be58ddfff17e4e08f93121dfc25e765a2f41604e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.eta_cutoff is not None and 0.0 \u003C generation_config.eta_cutoff \u003C 1.0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d4e5643778213cdf412f6e360737d1dd0fe0211bcb71f850bc726971d057dc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.temperature is not None and generation_config.temperature != 1.0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01444876d913d65c37feeea2a34b0840c0c4ac37cf5772f95b17928521d09a1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.top_k is not None and generation_config.top_k != 0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"8216ef193ae8d8fc3fdea358261a050209fa11b71dcce1e46825735a26eb58b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.top_p is not None and generation_config.top_p \u003C 1.0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ed54ee19299347804772175ca03d2601deb57740fce34437ca4010ca9a3e22"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060generation_config.typical_p is not None and generation_config.typical_p \u003C 1.0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d0a39e13a6fa5f6e7c08e365d5959a4c8cf7274117672a26513fc1fe605801"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060getattr(self.config, \u0022sliding_window\u0022, None) is not None and kv_seq_len \u003E self.config.sliding_window and cache_has_contents\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"f33d42f68b4eb481faf94c50f5c3aa982fdd793d43e058805c2b9b5d6ceb3dfa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060gguf_loader.has_tensor(translated_key) or \u0022kv_b_proj\u0022 in translated_key\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"58bf9189946d552b259f8018feb934c738ad1220732734ac7b5c0a4ea5ca4571"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060group_size \u003C size_k and group_size != -1\u0060 appears character-identically in 4 files \u2014 archive/csrc/custom_marlin/utils/marlin_utils.py, archive/kt-sft/csrc/custom_marlin/utils/marlin_utils.py, archive/kt-sft/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py, archive/ktransformers/ktransformers_ext/operators/custom_marlin/quantize/utils/marlin_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/csrc/custom_marlin/utils/marlin_utils.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"c42e3581ba1700ce0dc0f78d876404a4e3b3dfe4b434ca3c66e48266eb9bdd7d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(config, \u0022ep_size\u0022) and config.ep_size \u003E 1\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feda67d10b18a1bc21a230f57e5635830f32de709ff68f510ec53a5e0ca0caf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(lora_A, \u0022weight\u0022) and lora_A.weight.requires_grad\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/layer.py, kt-kernel/python/sft/lora.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"afaa490fa1862354b98a4034f40f3650e00fd3beb2b560ec9b7d1d072b7860b5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(self, \u0022parallel\u0022) and self.parallel\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/setup.py, archive/setup.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff4516e4ebfd2010834edc63d4e3c823d13935cff9fb7f941269535372ffeeb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(self, \u0027q_absorb\u0027) and hasattr(self, \u0027out_absorb\u0027)\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/operators/attention.py, archive/kt-sft/ktransformers/operators/balance_serve_attention.py, archive/ktransformers/operators/attention.py, archive/ktransformers/operators/balance_serve_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac29d1ad7aa4af7e1a014fcf65f0f07a8ff82e2506d77f16cfc1869e7fb7692"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(self.experts.generate_experts, \u0022submit_for_one_decode\u0022) and torch.cuda.is_available() and torch.cuda.is_current_stream_capturing()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"25fabdbd30c2ce69c3c1e7d35b64e96c1b82a0129d54dc1ccbd727f41156667b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(torch.version, \u0027cuda\u0027) and torch.version.cuda is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/vendors.py, archive/ktransformers/util/vendors.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd35a24fe874e088fef962fd2e620c5a6eab6695d0a9ea836357cc0435a6b0a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(torch.version, \u0027hip\u0027) and torch.version.hip is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/vendors.py, archive/ktransformers/util/vendors.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d4053c87d526eeabc59fa89c68133dc74096af2f2f50b660b3a31f91a0104c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060high_freq_factor is None or not isinstance(high_freq_factor, float)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe97301d8232314d3c00f01489da068952a0022b6f60507d1f29c21850db907"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hpu_comm is not None and not hpu_comm.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb28a3dcf307cc4c55abb26018ed4b82ad28ff57d72c202a516d4b6e3c62cdf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060i \u003E= self.ep_rank * self.experts_per_rank and i \u003C (self.ep_rank \u002B 1) * self.experts_per_rank\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad610ce0f834e22ca365fdd79cfafe9cdb1c9308b4da0eb0323238095e25ff7e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060importance.dim() == 1 and importance.size(0) == self.config.block_len and importance.dtype == torch.float16 and importance.is_contiguous() a\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f8cd6e792e4d71ed38b69f9f0e51354d7a79b92b5ff3881954e5ef208ef2f8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inp.is_contiguous() or ( inp.storage().nbytes() - inp.storage_offset() * inp.element_size() == inp.numel() * inp.element_size() )\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py, archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cd4c0eb155d32654ea5cb7f2c5fd934c9f738a69f79d54da9f9012801e3c08"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060input_ids is not None and inputs_embeds is not None\u0060 appears character-identically in 6 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/models/modeling_deepseek.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1454}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9dfdd4d4e91b3bfaa67b2c89d8b3e84cb8eb6d7b386863c04e116fc23e9d685"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060input_tensor.size(0)==1 and torch.xpu.is_available()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"851e3c0d94d9731beb4089465a6155c39b92723f9b076c79e29e75860779885e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inputs_embeds is not None and cache_position[0] == 0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_llama.py, archive/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"893adb89218df8015b683b693c7a2e19c383d90ffb813f157be79270ba288b54"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inputs_embeds is not None and past_key_values is None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f136c721d0ba41f8924a4a7fde69ac37d9ab6275be879ad8f3d4a7bd3dff678"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inputs_embeds is not None and past_length == 0\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_deepseek.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1832}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9c5b4570bb55c68dc40ca8d2d8a12325888771d584416295ac4771f579dbe1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inputs_embeds.device.type == \u0022xpu\u0022 and position_ids is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"68740ef971eb33ac187f5fe0d5f7a07a81364348b26a2caa8cbd92d455227031"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_cuda_available and CUDA_CAPABILITY[0] \u003E 8\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/triton_attention_prefill.py, archive/ktransformers/operators/triton_attention_prefill.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/triton_attention_prefill.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"72456db40e8b194bc427c329d30638ad31627caded2ed3d5865da8e58b38d304"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(device_type, str) and device_type != \u0022mps\u0022\u0060 appears character-identically in 10 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"70cb1c7ac8222020234edf06e8ad87be1e2829ac69b95d477e0912e8b9c372b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(event, MessageDelta) or isinstance(event, RunStepDelta) or isinstance(event, RunStreamResponse) or isinstance(event, Done)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py, archive/ktransformers/server/schemas/assistants/streaming.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/streaming.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"6003a267a9a6d0bf37224434862e5f6a31298b7aa7bc20780bfa0340e6b7eef7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(module, nn.Linear) and len(weights.shape)==1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"7853a3e541cd8f2bf39e5cfbd53ca89639cd799923b231af79610576feb4862a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(res, tuple) and len(res) == 2\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/endpoints/chat.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf2354393a82f0eb14879278aaad47ed30a3f13c384aa10bdaea3a9e8e01cfd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(value, bool) or not isinstance(value, int) or value \u003C= 0\u0060 appears character-identically in 3 files \u2014 kt-kernel/python/sft/artifacts.py, kt-kernel/python/sft/layer.py, kt-kernel/python/sft/weight_manifest.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff3898bc2ddbf4cbf57780fb2993355563ac2688f4cbff6d558cf1eb72b8db1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(x.device.type, str) and x.device.type != \u0022mps\u0022\u0060 appears character-identically in 2 files \u2014 archive/ktransformers/models/modeling_smallthinker.py, archive/ktransformers/operators/RoPE.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_smallthinker.py"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"775686e49516e02932750408dfd5382e5df0e5ec8911a9cc6e09dc59bbb5de59"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060k_in.dim() == 3 and k_in.size(1) == self.config.block_len and k_in.size(0) == self.config.kv_head_num and k_in.size(2) == self.config.head_d\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bef9def0259196ef858912610e5f52c8f85568eb4d23e4e89a42bef27b1bbfc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key in self.tensor_file_map and translate_name_to_gguf(key)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/custom_loader.py, archive/ktransformers/util/custom_loader.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7ba2c24e31fbeb3b76b35f0a15c2a1a01cd57741fa5d1a209bde1cb7c7f74c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060kwargs.get(\u0022ssl_keyfile\u0022) and kwargs.get(\u0022ssl_certfile\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/main.py, archive/ktransformers/server/main.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/main.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cebd27e050f199d79cedfd795eb0384e49e8a60f892b74982401659c6c33d883"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060labels.dtype == torch.long or labels.dtype == torch.int\u0060 appears character-identically in 10 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1966}}}],"partialFingerprints":{"codehealthFindingId/v1":"aefa3cb9b02e48cc3f66dc864b7ee2c8f125a6aa044ff6adb20857e00a3c5386"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060layer_id \u003E= 0 and layer_id \u003C self.config.layer_num\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"57857463cc0f16d6076527421f0399ad5324d3a5970f4580ff0c5e85620f5fdf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060layer_idx \u003E= 0 and layer_idx \u003C self.config.layer_num\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f10c72bf83c67c2b386aedff7c3278cb3bd6a5cfc6a825be9f5f3b14cb4da93"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(text) \u003E 0 and self._is_chinese_char(ord(text[-1]))\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/textstream.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/textstream.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b852e5d33a2632d5179e8e4a7e4c985892de33eb5b20fdf7941cd787aaf2d2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060low_freq_factor is None or not isinstance(low_freq_factor, float)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5e10622f8e6a2010149f6be22644e32ba690a1e0a834dc62523effa646eba1c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060m[\u0022role\u0022] == \u0022user\u0022 and new_messages[-1][\u0022role\u0022] == \u0022user\u0022\u0060 appears character-identically in 3 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/server/backend/interfaces/balance_serve.py, archive/ktransformers/server/backend/interfaces/transformers.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f475614667ff69b326f250e739caa47093c621eb49caeebc408e999593b3e2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060max_cache_length is not None and attention_mask is not None and cache_length \u002B input_ids.shape[1] \u003E max_cache_length\u0060 appears character-identically in 6 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_deepseek.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c41932e5d681dd2a82ebe0e8592ca327f6e1edf07dba5a16bff2b18b50c7bf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060merge_to_safetensor and os.path.isdir(\u0022/dev/shm\u0022)\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"610a31ba8e2ed1ef39efdbabc8dc91c3067d832f4b8ae040c293bed7f4eed2c9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060message.role.is_user() and message.thread_id == self.thread.id and message.status == MessageObject.Status.in_progress\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/base.py, archive/ktransformers/server/backend/base.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/base.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9ef503413dcd8b62c4125ee4ef2e29ff115dc7911be562eafa4c862dda0c3f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060model.format == \u0022safetensors\u0022 and model.path_exists()\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/model.py, kt-kernel/python/cli/utils/run_interactive.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"25dbb7769b00f8d97c950addc505d2a64e5cdf98c5b7d666fafc1858a707b805"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060name in self.tensor_file_map or translate_name_to_gguf(name) in self.tensor_file_map\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/custom_loader.py, archive/ktransformers/util/custom_loader.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_loader.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd21172df10a6c2e9c2cdfabcef2a79bc0048ed66996b16beb476061dfa26d19"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060next_token == self.tokenizer.eos_token_id or \u0022\u003C|im_end|\u003E\u0022 == self.tokenizer.decode(next_token)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/server/backend/interfaces/transformers.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e82bba198eab25adb2eb4349a9b0dd62c209bee9c8571d26547302eb8ed18c0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060next_token[0].item() == tokenizer.eos_token_id or tokenizer.decode(next_token.tolist()) == \u0027\u003C|im_end|\u003E\u0027\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4cc925c67dd324c79bb96fd3864a405b3191cbfe4b9419c92cde9640199090c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not check_path.exists() and check_path != check_path.parent\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/quant.py, kt-kernel/python/cli/utils/quant_interactive.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a489630be644f8018c15d275a3b7daaa5126dbd2b7f843f49a1cfcd151f32a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not cmake_generator or cmake_generator == \u0022Ninja\u0022\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/setup.py, archive/setup.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"691ed032b66d7475afed9fc170edcf649620974d9fd5e7a2e97e60b0df98d035"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not is_distributed or get_world_group().local_rank == 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py, archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf39ae2aeca938ccd18e6810bf263feb4cfedeeb08685621f1cb8387302accb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(attention_factor, float) or attention_factor \u003C 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"a221d6ce79b167998b33e2c52e5e126393e3dadc14a4bfcf7a7f5bb959b9115f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(attention_factor, float) or attention_factor \u003C 0.0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"a16bce07c250ff78f1b4e483343e99973d4203fb36e26f38095391a7279a1502"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(factor, float) or factor \u003C 1.0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a26cf241f073b82422ef41d663267e02b9136d9342f1975492020fdf6c2388"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(files, list) or not files\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/artifacts.py, kt-kernel/python/sft/ephemeral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93c4714e5b943bd56b5f9f939a768074edb6654f1503e631da46f87383931b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(weight_block_size, list) or len(weight_block_size) != 2\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3af47a35a56c8e10be67810cd3e296b08d09ff145b903d2876df6d1bd0387f69"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(weight_map, dict) or not weight_map\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/artifacts.py, kt-kernel/python/sft/wrapper.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0b48cdfd7d0c9ee2092de950ac162901ab0121f8e38159d38091e5a25ab434"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not self.base_log_path.is_symlink() or os.readlink(self.base_log_path) != self.current_filename\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/config/log.py, archive/ktransformers/server/config/log.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/config/log.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"0946889e5fc8338609c036521e6d31f475b42b239ee4950143b5cfd63e427170"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not self.is_prepared() and not their.is_prepared()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py, archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"41754bb47c5d972c65afae6f947e47a5128ba876920209f2de3008ca0f7cf1cd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not self.is_required and not their.is_required\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py, archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/orchestrator.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a24e26546b6ab88bb4f42683ff084e57f7d70307833373890b1f9e42e1673e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not single_config and not contains_arch and cmake_generator\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/setup.py, archive/setup.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9d06916de8480e2c4cbfc225e1ba9798ea10790b26933d8f3722ebcf9e3115"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not tool_call_mode and tool_calls_begin_marker in buffer \u002B token\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/endpoints/chat.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"481cc40bbe7dbe2e0dc8bae08ea41d875e3d89682d64b2aa649ccc2f653ba1a0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not torch.distributed.is_initialized() or self.world_size == 1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"704d037f7f125568dc7471d5a55f528cd58b5c04883ae59731af399105550c30"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not torch.xpu.is_available() and not use_torch_npu\u0060 appears character-identically in 3 files \u2014 archive/ktransformers/operators/linear.py, archive/ktransformers/util/custom_gguf.py, archive/ktransformers/util/custom_loader.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/linear.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"682701d94d2d7c946f5bf0fa51bc98e390f2fff1f1c05c3b39c35951eda869b2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not torch.xpu.is_available() or input_tensor.size(0) \u003E 1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f4e2d509f75a77367a271cd75025c8c12ed23b183d32fb60f0f6d06f73bb6f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060num_params == 0 and hasattr(param, \u0022ds_numel\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/sft/metrics_utils/misc.py, archive/kt-sft/ktransformers/sft/peft_utils/peft_model.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/misc.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d1caf831717a72c182d0ef347bef8c0c33db69339edd37e79558c88e0efe003"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060old_path != new_path and os.path.exists(old_path)\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec971c5bbc983dba6a7a09b74e18fa2db1a709555081af9835eb8b3cbf3e785"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060origin_shape[1] == 1 and torch.cuda.is_current_stream_capturing()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/linear.py, archive/ktransformers/operators/linear.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac405561834a5aea823a172c9d5b5c66d1ac1c94a6242d3d7edd9bf49b38166"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060original_max_position_embeddings is None or not isinstance(original_max_position_embeddings, int)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b47f6d66778c63fdd864219a8c54c9c3af1f7a6c6f0b6ba4d71c37fe6942670"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060os.name == \u0027nt\u0027 or get_compute_capability() \u003C 8 or hidden_states.device.type == \u0027cpu\u0027 or device_manager.gpu_vendor != GPUVendor.NVIDIA\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/attention.py, archive/ktransformers/operators/attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4836f962c64b682396bff0feea1618bc298b5b3971cbe8735e98e29e1b016d8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060output.dim() == 4 and output.size(0) == batch_size and output.size(2) == self.config.q_head_num and output.size(1) == q_len and output.size(\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c46a2b31f5a1e4753d7eb0f61656cc6276dc93f30f882fb2a31c9d77191979"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060output_router_logits and layer_outputs[-1] is not None\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"271c727afaf91819eecf387710b4922875d312e923f63eabc940a82a501edbe9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060p_src.exitcode == 0 and p_tgt.exitcode == 0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py, archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce_utils.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19a1087f206cfd85a71a103cdb151bc2ffbb3400f4ecf67e3ba6ce80bff288c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060param.device == \u0022meta\u0022 or param.device == torch.device(\u0022meta\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/optimize/optimize.py, archive/ktransformers/optimize/optimize.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/optimize/optimize.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e2d4ebf10c9eb383dca49c0a14f96164cd9e7fc4d5fab41f27468d09d635c3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060past_key_values != None and isinstance(past_key_values, StaticCache)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/utils.py, archive/ktransformers/util/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/utils.py"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"214fbf6ac46e5212599a3e86e1aab3de31c90a01cd0ba0b0b6738f7ff2b0388d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.exists() and (path / \u0022config.json\u0022).exists()\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/cli/commands/quant.py, kt-kernel/python/cli/utils/model_registry.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f1ffd2dbaa9d50ee6ceab4a226d0dbf77cb1b123deb970cd5ebef2e8d460d3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.is_file() and not path.is_symlink()\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/artifacts.py, kt-kernel/python/sft/ephemeral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/artifacts.py"},"region":{"startLine":2014}}}],"partialFingerprints":{"codehealthFindingId/v1":"50520212668d869cfe939d2d8c36e07b74dcc7b5ab896435a5c834ded0d8fa6e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060per_layer_prefill_intput_threshold and per_layer_prefill_intput_threshold \u003C seq_lenth\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"7714708a3c6da1af0acc0f50abb12487ba3174c3b6daa70d72e561b8577cf256"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060pretrained_config is None and temperatures is None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py, archive/ktransformers/server/balance_serve/inference/sampling/sampler.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c37809051232031af594fc9bc681772be33ecccb2c50b5da3eae79125e15d6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060pynccl_comm is not None and not pynccl_comm.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"67cf5a7b6df39e0e51d6928c6a449484957742f308a336bcc6b9fe21f5e44bbe"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060q_in.dim() == 4 and q_in.size(2) == self.config.q_head_num and q_in.size(3) == self.config.head_dim and q_in.dtype == torch.float16 and q_in\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d723bc4a32ce8333e1cfdedd938fabf55aeb16728686606e3d892a0daded9f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060quant_config is None and text_config is not None\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/backend.py, kt-kernel/python/sft/wrapper.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/backend.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"9447aea17f9917468a68fb6e51b3478a116cfd1cb9dfde33353ad29daff34891"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060query_info.active_position \u003E= query_info.query_length and query_info.is_prefill\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py, archive/ktransformers/server/balance_serve/inference/query_manager.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e1e5fb5c257727df3fdf41d73f07165954f6befe551fb622e45867eac2b297"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060query_states.device.type == \u0022cuda\u0022 and attention_mask is not None\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_mixtral.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_mixtral.py"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"313becda6a446038b7ab0991364c11fb209fff86ad9191bdcd5bc6a206b1dd7e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060query_states.device.type == \u0022cuda\u0022 and causal_mask is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/ktransformers/models/modeling_llama.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ae0408e5eb2f29d6dd7098026b243299760395a7ef88631a15d83ac3f38500"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060relative_path.is_absolute() or \u0022..\u0022 in relative_path.parts\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/ephemeral.py, kt-kernel/python/sft/weight_manifest.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/ephemeral.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cd9c47f49434e087e96630b055a18363e23c4d1b694dc495537c336c9cb6dc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060req.sampling_params.stop_token_ids or set()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py, archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"189dfb5f5208c4c22f1418f2f2de74bf45664af74c5fa6d962fd64425642ea91"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060req.tokenizer.additional_stop_token_ids or set()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py, archive/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/sampling/penaltylib/penalizers/min_new_tokens.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"e501ac4c55361893f1adebd2288e426b5c14caea3437b0608f7dcd33693998d8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060sched_process and sched_process.poll() is None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py, archive/ktransformers/server/backend/interfaces/balance_serve.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b02f3b513ee6919fa2afec2ac0dd8a9f4239f2d3e59c8e10c6d155788c5b1f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self._scratch_path != self.output_path and os.path.isdir(self._scratch_path)\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da127090171cb6519d197834e09b63eb304a238d18eb1e449c0d629a67bc1b6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.anchor_type == \u0022DYNAMIC\u0022 or self.preselect_block\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/dynamic_attention.py, archive/ktransformers/operators/dynamic_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74e36f6e2cb5d360b546203ea03c7b300ac2f8ef082f72d1ae13bd7378dd0ef"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.ca_comm is not None and not self.ca_comm.disabled and self.ca_comm.should_custom_ar(input_)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9bf869df2e8f074f9d353df8e672e21fcdc35f3bc82a045acb1e879e6ee9d44"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.config._attn_implementation == \u0022sdpa\u0022 and attention_mask is not None and attention_mask.device.type == \u0022cuda\u0022 and not output_attentions\u0060 appears character-identically in 12 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1632}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ad1bafa6e82e343161d8114ee38f0a5e1bde842bc5da3c86cc2f17210cf6e64"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.config._attn_implementation == \u0022sdpa\u0022 and kwargs.get(\u0022output_attentions\u0022, False)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/attention.py, archive/ktransformers/models/modeling_smallthinker.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f25e3d90e11762eee674b805dea18e93e429ae1048833631fb19af0d017e12"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.config._attn_implementation == \u0022sdpa\u0022 and not using_static_cache and not output_attentions\u0060 appears character-identically in 12 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1589}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3eaf4b1ef25be09e1d0da5d69e31c8bc52a4ac356c3a27e711ef48eae45341d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.config.pad_token_id is None and batch_size != 1\u0060 appears character-identically in 10 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1941}}}],"partialFingerprints":{"codehealthFindingId/v1":"88dc0bc4252fd9a436c33508f3f9ec83dcc3be1669e16183ef75857a6fad27b3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.disabled or not self.should_custom_ar(input)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py, archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b924e220c267042766632d4d85692a7d9e4491a187c1c791ac22c950bf6257"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.gguf_loader.has_tensor(key \u002B \u0022.weight\u0022) or \u0022kv_b_proj\u0022 in key\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/linear.py, archive/ktransformers/operators/linear.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"626144e8a2368e2c7356fba05ae233a489916c450ebd9d8936a371bfcbde705f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.gpu_vendor == GPUVendor.NVIDIA or self.gpu_vendor == GPUVendor.AMD\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/vendors.py, archive/ktransformers/util/vendors.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"79bd4c57a1499d6f73ee9becf2327548121a29e51b2db736c58288936429cd85"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.gradient_checkpointing and self.training\u0060 appears character-identically in 11 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek.py, archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek.py"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"2985d02ffbf6fe9fe1eeafe3de9022379462a576f3107945d2c5dfe248aeec1d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.gradient_checkpointing and self.training and use_cache\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/models/modeling_llama.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"292438cf12b763ddc2f336f411918bda4e4469da376625f18044dcb211049da2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.hpu_communicator is not None and not self.hpu_communicator.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"489234e4280900682ee050807b8381d90b8cd6a97bb85f2c343cb164c9cb0b10"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.in_features%GPTQ_MARLIN_MIN_THREAD_K!=0 or self.out_features%GPTQ_MARLIN_MIN_THREAD_K!=0\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/linear.py, archive/ktransformers/operators/linear.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/linear.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"0660536fe0195253349f2f0b350a11c46c70778faa046c737669ba97462cdb22"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.max_seq_len_cached is None or seq_len \u003E self.max_seq_len_cached\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py, archive/ktransformers/models/modeling_deepseek_v3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf3d54d94e28d8d1e09630e2d8c48a7f90e79141fe1095276e26f9f606407bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.merge_to_safetensor and layer_tensors\u0060 appears character-identically in 2 files \u2014 kt-kernel/scripts/convert_cpu_weights.py, kt-kernel/scripts/convert_cpu_weights_ds4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/scripts/convert_cpu_weights.py"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c28d3d32a6e3b7eafa64ea105b6d91c99abe89a43dfdbf4be0b7250eefc05a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.model.transfer_map is not None and i in self.model.transfer_map\u0060 appears character-identically in 8 files \u2014 archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py, archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v3.py, archive/kt-sft/ktransformers/models/custom_modeling_qwen2_moe.py, archive/kt-sft/ktransformers/models/custom_modeling_qwen3_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/custom_modeling_deepseek_v2.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ffb207e52b02c069e182e97e7376acdf0b1e5e1e0ab4585bab101b0075df0a1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.remaining_length \u003C= self.prefill_chunk_size and q_len != 1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/dynamic_attention.py, archive/ktransformers/operators/dynamic_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e1156feef4417af021154a59455bc8c0a6814680a6129e3a417d67751634de4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.rope_scaling is not None and \u0022type\u0022 in self.rope_scaling\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/configuration_llama.py, archive/kt-sft/ktransformers/models/configuration_qwen3_moe.py, archive/ktransformers/models/configuration_llama.py, archive/ktransformers/models/configuration_qwen3_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/configuration_llama.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f29e2b8da0f3ec4bb57d6f3044c6a8ed687c07f27334c7922db989ccefa6485"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.skip_prompt and self.next_tokens_are_prompt\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py, archive/kt-sft/ktransformers/util/textstream.py, archive/ktransformers/server/backend/interfaces/transformers.py, archive/ktransformers/util/textstream.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"99788310f1d1a2150bfb791b93f4a10e4f48dbacf7983cd6dae6b8c24ab487ed"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.tpu_communicator is not None and not self.tpu_communicator.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"77eafcef5794f250ae6a76f0247300f668738a6c94622110a30b4e4e7f1475df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.transfer_map is not None and \u0027cpu\u0027 in self.transfer_map.values()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"124ee0f669aae038fe143ba226a3a8e51b29f55b266568fbc016f894daa747cf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.transfer_map is not None and i in self.transfer_map\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"1278e8fd4e1f4b273d9e5aada9a7b9749e25a1dcc6545f56a35b8a989ce82bca"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.world_size == 2 or self.full_nvlink\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py, archive/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/custom_all_reduce.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf82363c023b732820cd06658a785f108760d5291b064400d0417f142a7f34b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.xpu_communicator is not None and not self.xpu_communicator.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"b11d9478f4f20c41f01fbecaf8db646a729e0104c7cd6cd3ac7ac7e52fc038eb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seq_len \u003C self.original_max_seq_len and self.max_seq_len_cached \u003E self.original_max_seq_len\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/ktransformers/models/modeling_llama.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2911caa88c60b738c885815fbce6e84594db043bc2f66f76e78db22d32435291"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seq_len and seq_len \u003E original_max_position_embeddings\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb06945ee1f6b386d8b8448067ea3cbd29afc0adb4dec5b3de2fbeac2624ee3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seq_len is not None and seq_len \u003E max_position_embeddings\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/util/modeling_rope_utils.py, archive/ktransformers/util/modeling_rope_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/modeling_rope_utils.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9564a8aad0eb7727ffa04ac8de5e072266a0d1b14188d0561855adada0d97d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060sequence_length == 1 and hasattr(self.experts.generate_experts, \u0022submit_for_one_decode\u0022)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b014c91cf3c9cb645dc18d5058e5027f1ba33d8e7afbd304a22368f45892e1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060sequence_length == 1 and hasattr(self.experts.generate_experts, \u0022submit_for_one_decode\u0022) and torch.cuda.is_available() and torch.cuda.is_cur\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0d2ded0fb5b04f49aead9ca87eed0148597b7acc6dbe91c43cf12decae2f4d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060shutil.get_terminal_size().columns or 80\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/setup.py, archive/setup.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/setup.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"36705f85dae65c7ca590df2dca93ebdca06e2e398d2b28729a5a067af31dc8f2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060staging.exists() and not staging.is_symlink()\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/deepseek_v4.py, kt-kernel/scripts/prepare_ephemeral_int8.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/deepseek_v4.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d4d1711f229055839c6fba7bde485a636f9a60c2cfebdec60b8c694efe28bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060start_index == -1 or end_index == -1 or start_index \u003E end_index\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/endpoints/chat.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"d687d2be20290b3f816229d961963d13885d8ef644d0efa2105c59758c493a18"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060start_positions is not None and end_positions is not None\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/ktransformers/models/modeling_llama.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1633}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4d323bba8c391ec1b844b8a9f0f3057870467bffb554c5575c2439cbc5eed6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tool.is_related_threads and tool.meta_data[\u0027assistant_id\u0027] == self.id\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py, archive/ktransformers/server/schemas/assistants/assistants.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/schemas/assistants/assistants.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"4566c15df3bb53f251e85cc9e19e18ca7f051a0dae0e8cfe65b06a52e81bdd5c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tool_call_begin_marker in working_buffer and tool_call_end_marker in working_buffer\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py, archive/ktransformers/server/api/openai/endpoints/chat.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/api/openai/endpoints/chat.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d97a7e51a82c21764cd974ba44f98f47bdb2a59e6894a5671f494580f87903"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060topk is None or local is None or topk \u002B local \u003E= max_block_num\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"a443499b4ca66d8dfa6354e7328177f2750342e1fd3ae5c3ac716a20536ba34a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.cuda.is_available() and torch.cuda.is_current_stream_capturing()\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"f870a8098e7851ac5861947f0109779b20278d830eccfbca4778fde469544256"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.distributed.is_available() and torch.distributed.is_initialized()\u0060 appears character-identically in 2 files \u2014 archive/ktransformers/models/custom_cache.py, archive/ktransformers/operators/ascend/ascend_experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"4680aa80d4000a0fd34581feded79564d18099d3d33882972e27259ef4b150f8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.equal(self.query_tokens[self.active_position - stop_len - 1:self.active_position - 1], stop_tensor) and self.active_position\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py, archive/ktransformers/server/balance_serve/inference/query_manager.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/query_manager.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0302d266868b88ca77ddde1a3ad1411a79ca69b63357212e4b49c60bbbd96a06"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.xpu.is_available() and inputs_embeds.device.type == \u0022xpu\u0022\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5fa955fa87e2ce6d853e53e9851551bb78088072cf583d1946377857eb9adf0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.xpu.is_available() and model_dtype == torch.float16\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/experts.py, archive/ktransformers/operators/experts.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/experts.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a4e95b3f75650f4b8e1c939767aff7ed19fa74d258f925aeab7fcab1031988"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tpu_comm is not None and not tpu_comm.disabled\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d72a556559b88d825fc4a89c38c6248703b8cb51be5786a6c497ad316a6f2d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060union_with_last_layer and layer_idx == 31\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/dynamic_attention.py, archive/ktransformers/operators/dynamic_attention.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/dynamic_attention.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a87eb4c6346060314ddc44706398e33f9e6c20a4d970ca17f77a27a46f73c33"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060use_cache and not isinstance( past_key_values, Cache )\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/models.py"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"586690b6390bca34b50398d1c26e485b0288cd482b68f3e100d148e829fa14ab"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060use_cache and not isinstance(past_key_values, Cache)\u0060 appears character-identically in 4 files \u2014 archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/operators/models.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"037344994dd125e370544bcf9a252395fa65eb7c7b8e3a3dc572e818c4390d3b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060use_cache and not isinstance(past_key_values, Cache) and not self.training\u0060 appears character-identically in 6 files \u2014 archive/kt-sft/ktransformers/models/modeling_llama.py, archive/kt-sft/ktransformers/models/modeling_mixtral.py, archive/kt-sft/ktransformers/operators/models.py, archive/ktransformers/models/modeling_llama.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_llama.py"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"bffbe887057784ec9c79f5f1d53c4e234fc4143e91dcb56333aa334f9ba6af5d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060use_custom_allreduce and self.world_size \u003E 1\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py, archive/ktransformers/server/balance_serve/inference/distributed/parallel_state.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/balance_serve/inference/distributed/parallel_state.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b0bab0a2d1ff8cdbeae6b23472febb1997dd58dce173c9e4e247ea9db280cb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060use_sliding_windows and self.layer_idx \u003E= self.config.max_window_layers\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py, archive/ktransformers/models/modeling_qwen2_moe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/models/modeling_qwen2_moe.py"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdd2703ed35fc35d024b213da788d5f69215c47c46b45e31ebf091fcf5f64cc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060user_model_obj and user_model_obj.format == \u0022safetensors\u0022\u0060 appears character-identically in 3 files \u2014 kt-kernel/python/cli/commands/quant.py, kt-kernel/python/cli/commands/run.py, kt-kernel/python/cli/utils/quant_interactive.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b8e4bba3a9582bda7abd86f72a74ffbbf9ed82a64b710040a5f289595c9eaa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060v_in.dim() == 3 and v_in.size(1) == self.config.block_len and v_in.size(0) == self.config.kv_head_num and v_in.size(2) == self.config.head_d\u2026\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/operators/cpuinfer.py, archive/ktransformers/operators/cpuinfer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/cpuinfer.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e93c423cddd49b3f8569292522b008bf033ba76b9d24c520476d5a300ed712"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value is not None and hasattr(Config(), key)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py, archive/ktransformers/server/backend/interfaces/balance_serve.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"e60ab9e362fd43598856d1db889ed2951669fdd523ef28328d18b9b4dd43a6cd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value is not None and hasattr(self.cfg, key)\u0060 appears character-identically in 2 files \u2014 archive/kt-sft/ktransformers/server/args.py, archive/ktransformers/server/args.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/server/args.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c396bb51c5aee8017936d9f342021de5d97704603a3d11b3b6318d2cb7f05eea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060wrapper is not None and getattr(wrapper, \u0022_uses_authoritative_optimizer_grads\u0022, False)\u0060 appears character-identically in 2 files \u2014 kt-kernel/python/sft/autograd.py, kt-kernel/python/sft/layer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/autograd.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ce900ec2e9b4260e68e2d817d37c6c25671376e808b802f4da57f78566e09e"}},{"ruleId":"X15","level":"warning","message":{"text":"Length read from the parsed input is spent without ever being bounded: \u0060length\u0060 is read from the bytes being parsed at line 179 (\u0060struct.unpack(\u0022\u003CQ\u0022)\u0060), then passed as the size of \u0060read\u0060 at line 180 \u2014 and nowhere in its function is \u0060length\u0060 compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: the call reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has), and the reservation either raises \u0060MemoryError\u0060 out of a parser whose failure path was written for malformed input, not for hostile input, or succeeds and holds gigabytes for a few bytes on the wire. Bound \u0060length\u0060 against the bytes actually remaining and a maximum the format allows before reading."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"8307845defa912c00d61148c3a4fc07a3fcfb95c71fabbb55cc30925b7bcffa1"}},{"ruleId":"X15","level":"warning","message":{"text":"Length read from the parsed input is spent without ever being bounded: \u0060length\u0060 is read from the bytes being parsed at line 301 (\u0060struct.unpack(\u0022\u003CQ\u0022)\u0060), then passed as the size of \u0060read\u0060 at line 302 \u2014 and nowhere in its function is \u0060length\u0060 compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: the call reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has), and the reservation either raises \u0060MemoryError\u0060 out of a parser whose failure path was written for malformed input, not for hostile input, or succeeds and holds gigabytes for a few bytes on the wire. Bound \u0060length\u0060 against the bytes actually remaining and a maximum the format allows before reading."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/weight_loader.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"939a8e4ffe8c500c340fc7a2456497f741849107d321caa51ad0bf8cd150a88f"}},{"ruleId":"X15","level":"warning","message":{"text":"Length read from the parsed input is spent without ever being bounded: \u0060length\u0060 is read from the bytes being parsed at line 172 (\u0060struct.unpack(\u0022\u003CQ\u0022)\u0060), then passed as the size of \u0060read\u0060 at line 173 \u2014 and nowhere in its function is \u0060length\u0060 compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: the call reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has), and the reservation either raises \u0060MemoryError\u0060 out of a parser whose failure path was written for malformed input, not for hostile input, or succeeds and holds gigabytes for a few bytes on the wire. Bound \u0060length\u0060 against the bytes actually remaining and a maximum the format allows before reading."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/custom_gguf.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03298ea78f2283c9386acd4ccd1f6af4713a3a56a7a00a8c6f766c031a047be"}},{"ruleId":"X15","level":"warning","message":{"text":"Length read from the parsed input is spent without ever being bounded: \u0060length\u0060 is read from the bytes being parsed at line 301 (\u0060struct.unpack(\u0022\u003CQ\u0022)\u0060), then passed as the size of \u0060read\u0060 at line 302 \u2014 and nowhere in its function is \u0060length\u0060 compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: the call reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has), and the reservation either raises \u0060MemoryError\u0060 out of a parser whose failure path was written for malformed input, not for hostile input, or succeeds and holds gigabytes for a few bytes on the wire. Bound \u0060length\u0060 against the bytes actually remaining and a maximum the format allows before reading."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/weight_loader.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"5894098b2971cb9ed2b8209a1af22e7b76c921602b564fdf39c416efd0d39e0d"}},{"ruleId":"X2","level":"note","message":{"text":"Not all async functions that make a request accept an AbortSignal: Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up \u2014 a page navigated away from, an unmounted component, a timed-out job. Take a \u0060signal\u0060 (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice \u2014 judge against how the function is used."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bd89d014f84408f7063269aa5892ba3df7c9af3e981ecfb0752c5731bc62d406"}},{"ruleId":"X2","level":"warning","message":{"text":"Async function without AbortSignal: createRun: \u0060createRun\u0060 awaits \u0060fetch(\u2026)\u0060 but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept \u0060{ signal }\u0060 and pass it through: \u0060fetch(url, { signal })\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/api/run.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e3a1d3dff784f829b7498afa8c02a4d5b2ab166353f6e7502c8608bb5b8b03"}},{"ruleId":"X2","level":"warning","message":{"text":"Async function without AbortSignal: cancelRun: \u0060cancelRun\u0060 awaits \u0060fetch(\u2026)\u0060 but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept \u0060{ signal }\u0060 and pass it through: \u0060fetch(url, { signal })\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/website/src/api/run.ts"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"a129022c45c47103401b873da4b2362c4be73c6cf4c763933a230be330b550b8"}},{"ruleId":"X2","level":"warning","message":{"text":"Async function without AbortSignal: createRun: \u0060createRun\u0060 awaits \u0060fetch(\u2026)\u0060 but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept \u0060{ signal }\u0060 and pass it through: \u0060fetch(url, { signal })\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/api/run.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"125f8919dd211e817996d0f11200758e8748d374613be2ab573312226f2b3209"}},{"ruleId":"X2","level":"warning","message":{"text":"Async function without AbortSignal: cancelRun: \u0060cancelRun\u0060 awaits \u0060fetch(\u2026)\u0060 but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept \u0060{ signal }\u0060 and pass it through: \u0060fetch(url, { signal })\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/website/src/api/run.ts"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c90a663aa138ad929545b9eb4d1888d3e1de5f25bb23fbdb19fe4e1eda28d3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ktransformers.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"7146d3f4038f371efef4c4875c5e6599414658ecf309f55a098f6b200a503d8e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"475a384863ec340a4748b7d31cad367b6d05ed55b103073a36ef3f59eef001b9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb47c524e5affab5b335fc710727c6b2353ed510bafe720008791c206fd20d5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f53aa6d9c8385387a02acdfee9940d6f5ed016f6b2815b49e903967f2ddbb0c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1394bc7569fd0aa23b700cf66b5a57a434af873641ad33e5f25b33dccad45f22"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"6beb82bf7b00671091ea62d98399e729a67aed23bcfadb51bb1e48d32db653d2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea10ed16cc4fe1b4bb81338bc12224bebe17f34ddc066c5428abd2e13fef17c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7043eddb45b6428a6dc1a2ca595f3575c713604b76eb4ce4750b146114460d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/utils/loader.py"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62c027d137494d4924b22ce534fd0de6025b0de426c30e820c12893b3446bcc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce757d3f5730ff863bb244cafa79292fc20d5d0737d25cd554dfab5952a7d8d6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/base.py"},"region":{"startLine":969}}}],"partialFingerprints":{"codehealthFindingId/v1":"b695adfc96d6d8bde0a329ef85bf077a9abc5ed1f4966ff1294025f13b9b2df4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"262f512f32a44bccb70f06f9615295dce9c229fd604fa4504973cb631e045148"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f4b695bce17431d4c96e97d7a1ee6307194606a8018b34df21e9e588baec69"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"108f68fa1670ce17c99ea02d74f923b18884ae72e061542cbeff4b4068bea6fa"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb175d4cb0458da541052688e0292a5afb6fec10d8eb919eb99cbb4d8392552"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b720ac79a0faabb2105ff1e033fd1e3fbedd8737de01b6782959d52abee40ff"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"292d52cdc401ff39067e02dfce63b3934d11113cf06d0ea6fc0c6f350f6819b3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfaa83a8b1d32fa53a632ef8be187816ab6efdf2093751f191e5a6edb855256"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"64973e400acf7ec04931ebf56b3cbacba0490f7f5b1bc3c7bd43b89814e4a69b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae93b3da171f256095222cf3a178e7376a8c9bb9c8b24a0383ec47a4753763e9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4e588dcddf1b769a94542c3f20255127f4e19c4d31ee033beab350e5cd5f8d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78457e99e623dea035b9fa9415b5665c4086a0ac2faf8cfdb7c872b28c7461f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"282ac4a43e1fd73022166da55f9aab0260dca5c5bb8093d4ae1fbd5434ecc1cc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b1ed321dc5035a20359360b50c75c85fb7c75060b50f544af9125c78fb2f67c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30c3996d2c417d0014b6db65558f95ba6e4a4649b429b3a8e48fec5d8295fd0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/quant_interactive.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"820bb0604ceff4a2b75f5d56590356235ea31e827d04e5ac100ab8f614289978"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/quant_interactive.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"a198816196028fa1e98cfea3f86b07a4be6837cc8b9a0f4b2c30d8f4a055b1fe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a52e105910896a03e272591a9d65472e990d19d68c0fad535c67b79734a2929"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe1b4e2d0c8de33c1aa27085cf168e766637c551cb5e7ed18b8be353d1eb34a0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_configs.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"226b5151b47ff851f290e59780e96c772086c38fcad057624f3d81fc896db73a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/run_interactive.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e673fb30a0461fc92f80f0ff24f793b94bd630312c623afea1352400107555a5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/tuna_engine.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ece0868ec0fa3559568f4218193bf2f71a354b572b1d6a524e5f57e71b32cc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9954b5953dec0bcc2b082ab3bd027fb0935cf97de0355cf32f880e0cb2bd09"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except (ImportError, Exception)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b8dc2ce17e5d921099e375c0e09c476cde7285f71672b0a3d5fec533a628a2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"bebabee8b71593ff857e731f4c857aa127ff274358641147acf746e428f8ee90"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"0045d4fb9ad819b104ee4fa536cad389ea1a331e515d01f6bf59662db86ca431"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b796bb7feff615fb5de08914ca037a0a2d187e4d23caef973fe5fa5f027229"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":873}}}],"partialFingerprints":{"codehealthFindingId/v1":"0404e9c77446afbca40e03ed21246d1b10230eaebc2da103b2eb08eee49510dc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"1361323c6d7cf4129485b9071c4f4ccbd57dda2cc6fc25cb098e540bde4b5a51"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8b63a8097d012ed7cedc6a071b81944a9e2dcc7605aaea1b313b46bd245b9a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1888}}}],"partialFingerprints":{"codehealthFindingId/v1":"f471648c4407548d2136977b73a5da5c47f8ff54b6cdc113312b8b67a2d23079"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":1894}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4fb071945e529ba6013cadbae459ca6d25e828d57fe9a8fde6133002c74d7dc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2136}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e92f2c42a9c200d1090182152ce6efe36b5d04523b50a6b4d9a98bb10aafcbb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/model.py"},"region":{"startLine":2173}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd215c73eab0597a9990a8af39379376aad77f003d9c9971af535915251a33f2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"07755b79f2f888cb00cba0a9606641316fe9cabf4d255a1418f1e614f4db520d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/commands/quant.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"600ab49e6d8c9adc70491e614366429b72269c1fd2f42b86d951227bfd4f7593"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/setup.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6237ea95408cbb816cd1ae7aca76517083c594dc057399e1a719dd33a5a7e245"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/local_chat.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbab73a2d9df2bf4956cdb9512942e33c746c5b120b5d3f17e9b7014902e1230"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/local_chat.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d465de2c4ad45d0a95c1efe838b24ccc02d745f7bf6de81b0d54305ffb46f0c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_gguf.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"660b6a852677151ede82a4a6febe0d2df06897b33237201adf80d0e8a4dde78a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/custom_loader.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"0429a81c880b5347173e53a25566de8b81c49cd08a06d0b9b0bb59573cf604a3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/utils.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f032e137477058ecc7b3dcce781a85c4ee0145883f4467e91a705cbb16ef60"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/util/vendors.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"19974e5433c0cc041bc7661c2904a8237d5a7868ed118a0ff84d35cdb7adb05e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/main.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f4f4ee120373c814c0bf40522e27d58435302498391f7b1954a2fa79303310"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/sched_rpc.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f547afd976150c7749477a7b832e8f420b54f807d9fd0988943f15b885ae1e97"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/forward_batch.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"120f6e553af31a3f772742b7b21317a10e46fde2bd6c00b27478adb53ce572df"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/model_runner.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"137b0c45b50c7fe8065ac112afd6d1c225fb395ac73532dc77a36d4067554796"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/balance_serve/inference/sampling/sampler.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d7d9a3c749d1746e2133c96666d2733ad4d1d52abebf063a31374271851dcb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/balance_serve.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4dae92613d3be0219f7ce74d9f1a26640cbe91c02457b3a0593119e8b1c4361"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/ktransformers.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"94acd0961d0e7a84bf357415f97b67fb0796ffb18c2c5dd21443a9cf6b64ef8b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/server/backend/interfaces/transformers.py"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc9350dbccd0e8c15f057a4e79fe5d156d24421f94260af08fb705d87fadf09"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/optimize/optimize.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf723acf6c4f9b61d9be7f087c733d660b1a5fcca6a8ccae352a896ccb57f5a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/attention.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"b97c17dd37b78d00b877f6d058471ff8ee27be9a06fa9e5ba137baac9d825008"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/experts.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0844b8aabc5567b34a4c0dac86bbf79a7889d68ad2fc9b243f1f81d426b4d2b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/flashinfer_batch_prefill_wrapper.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"25dd9cb324a0f717b5d1425536f47582da0253be1b85ba57f401550fe190be20"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/flashinfer_wrapper.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b0c800c24f9d688ca0cc4bdaedc0f4dbe7959a4d1310b64714cf68cf109cec"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/linear.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d674404e17fe13238f7bad74c43f3bf4df438a929122efec5468e8e60907336"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/linear.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc806b6069c4cff63c0fcf7b615cee41e92fc1418b3f960437c7c7bd8cec0e00"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/models.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb871450042d4caf6ec3cb9186d27306cf873ffa5e04e630ec11c2988c9882d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/operators/ascend/ascend_experts.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"160e613734786e9a82b8310f38f0e53cdd86d13a02935b4b9d055c17426e517a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/custom_cache.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"63145c0ba51cf50d7804f7705c04c43dc3f2eaef26e89bf9984afb2e6e2fe0c9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/modeling_deepseek_v3.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7a115d3c5203830d00680807533958772716de813c119d2667ad856658cbcd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/ktransformers/models/ascend/custom_ascend_modeling_qwen3.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f782026777738e752dabcd85fbacc70f9e2be295097ed72e8e8e8ca343695b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/util/vendors.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf9521e7eb4fa81cce209c5b8fec8da1a84530ba7a3149c66f6c64bdc1b43bb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"87447287ff2d20734e75c56e1615a98b164979801ebd51fe726df9a819404858"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/lora.py"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d12d26a8cfdb872505e69e4cd9eb223690d446ca607501a94460eda56f739b6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/env.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21235b2951d1280639ca9b4c462494a2dc689d2d2a40cbc56c79fd720cbd9e5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/env.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa78c42566478f84a832cf7b6f243ec79506211b2756280929d7793fdee8f3d6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/env.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3629b5b3ff4ab4188c67e3c3938c6d745c46ca440fb96a9791664dff7a0311f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/env.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4dd2b588547abeed7f147d89d4b8c67b0bc61fb01645f39766e8e6f660596c9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/sft/metrics_utils/misc.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ea0b94c40e884d64b0e72b108eaf9979db5e383cfd505a2323aba717519087"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"archive/kt-sft/ktransformers/operators/attention.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb03c9ee41437d8b314f664c389934d9df421a40d120881a3c7605588460d81c"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1007 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fa8f13f476f316e83502ff75c190af3044b587f4737812a4b27a276d273b859"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1019 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64990fdb32d8bfbe1f02b5c6b7061b0ad0c22f74e77b62655112f7656645a08"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 1024 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/amx.py"},"region":{"startLine":1024}}}],"partialFingerprints":{"codehealthFindingId/v1":"7790a88f3fe36c5b8a46908a3d72556903be2a731940db144702ff4f46e1fb3a"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 333 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/arch.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bceb94ea6aff59361cf47685b2cc23dd7ff74c2fc13f2942dfe7a9a90f27cca"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 985 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":985}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a5ae0188fef5b0e926372cc4bf8a25fb46a7c5692d88582b559f2a02dbaee3"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 988 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/layer.py"},"region":{"startLine":988}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5f37fcf6306da81c719428a52ca18b6de2dfc2331292707bdfc356b202296b"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 365 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"779a87ffcb390f363175b5c79f032632e16f0912fd68967a8f6c1d3744f9cf4f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 398 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2dfcc8312c3136a743d9d08c6594e7584c97be8c12062c7278466b4e38bbc8"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 427 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"35268b55e0b18fbe16710c80c6758932a80811d8ecc517ce763469c4e42dac6b"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 471 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"a216ab1a5b0520b70d7f2971bafe6a1293338c1bc56d8a2708028ecc55051da3"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 495 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"564c65f80c8e437099194994f37100de3ca7d69311ac3e038a57cdc41d808efa"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 558 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72ab7f76995fedebeee2fc660fbb1a886302e92f159a823e1246e4a9a4a4c3c"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 698 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6a46c8e28218cd97a377e881fd55ab7b80f5c94ccefdbbe169fd0844309662"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 930 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"7593bbbd8e4ce3ef05d2e49ed2296f194577877dbfd52ae80aa152b8d7d4e046"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 951 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3c194c2e2134b647586ba07d9b3e9332dfb0ee64c84bf4d958c17a64b23e68"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 956 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":956}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b801b5de92385afcb13a9f4ab345c594f79a07373e813a4b89722e186e270d"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1026 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fb63e560a35b8e9ca68729c5485791c59dc66a342426c6a118859f176bc26f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1094 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f3e0575e3f57d903bffd2d24f037611cecd97d5b3159ad8ec6c52fa9eadc66"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 1121 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2421b2d2d00102afc5afe70333c995da0dbdbf1a60548cbd7501ba49dc37c0ff"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1124 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7858f54889c1132ac7f56e4e8937283a3604498438de4ac203f98a3f52b2b10"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 1143 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"c50a9c2f6ac7efef50b102e67a77949ae2eff9b88483f0dc55e9f2a8640ad12f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1159 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/lora.py"},"region":{"startLine":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4e39b2a6e00069fea1463c6ada671b346d2110fbda67a4354ddd52fe5427df"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 232 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"75fa0c867d7dd4e46cb7b87206ba649d69e132e658f62ab0e000008152c6074e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 241 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e7198905bc1d59be1c3f2608fda2a1bf62d2b0b41f5e15f6b3134bff5d1dad"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 243 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d3426c0eaa7ed2d64a44d916e3a3bdd92a85209d39d0e9ca930b9c3639cbb8"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 716 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"8148bbebb8c4189a334f75627477d008f6b366dcb11b3ad37132933f7f25a92f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 939 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/weights.py"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bd5be5050f2293f17b69ea014078e802fee09a180dba94cce7329654e8dd225"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 260 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f8ddfc55d7ee345c93c7b52c2598e13c3a4481c15496bf2f901380a78a1a01"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 320 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"edeff5041e96828ccd7e6133b50f3d243dc600a10fa680c83840a8da327f7b09"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 359 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"89538fa3abe980f2a9f8c65ff4f459d791ad0aad42ac7b1471e0763ce59e3eb6"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 364 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"0807eb344c5b04a82ee8e8176b091e53d225519bdc8cbb72e45ba4ffa3b96a19"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 393 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0b35c007a16621076064cc2d0d12b525324b302db44df363ea90b99d8f7e57"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 399 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6657d9e184da9e5b7fbcc5aeb10741744ea2171609de7f8e6e7b41039412c5f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 636 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"acafa6394cc7db23fb4f03dcf8e3fbb14c1edef36f0c53db8744a034557e450f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 638 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ecad0f5907f8dbc0ab58f96c500b97b91c1e21c544beadf30437940efc27abe"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 645 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d2cbd84bbbdb89725524f91e5b6346ee06ee270c7f7c1db9eea8aa3d46ec3c"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 647 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb4116ed36649dc7b093475e4a7efbb5fd908aac7e24445d6db87dcccb11818"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 684 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"423ca0a304d38759f037bc205ff8974fd4433b20782b21dc3d4c8d04068d943b"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 734 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c292e3cbf4f35ec3d1de32979a560cd070d06dccfa155e25eb104cd35af62e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 877 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb267ecaf3b39f5f5e5335b7d40f48b8ad553a1e46620bf88a6af0f23ee5c93"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 1022 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b0dc3109194c8e08352cded5746f3d32804ea546dcf1c48271593972169af6"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 1032 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.debug(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.debug(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"37904939cbffb4270ce8e82de59861a7ad5ae31c88ba4a919c6d86d3e6c8966a"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1155 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1155}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e4810cff562916c9c9b1632a5527790f67a12fe720b95f1f178629ece063f6d"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 1445 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/wrapper.py"},"region":{"startLine":1445}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a43f455a964d0e7bc0e0325e10377ea9c5950d6c4f6eec65356b1d915d8d65"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_load_all_cache\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d06e0512427c223e6fa03b7ab71337e5efe74cb65cce6066db08ab38b78f21"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_compute_config_fingerprint\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"40884ef6c2ba4d6d6cb25e7ee4ac4f2cd05f85e19da4f6f36014aa33ef9da168"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_load_cache\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fa915e0efa8ab344f0c0c8e1bdfec57580f8dcf36c244b7a3dbd31c33cf984"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_load_config_json\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbd4fee644ef8923965643587192d98ef65e0d05e38beb7b0b9a73242c7e425"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_estimate_model_size\u0060 swallows every exception into \u0060return 0.0\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/analyze_moe_model.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0837aa0499c304f13962bdcf15f3e2b0798285cd1728e09c568b6e22c13c56e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060get_installed_package_version\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/environment.py"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"2beb306b56577bc50ec07982ac97e33860cd68a3510194fbb84e4f69c00e2cad"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060format_model_size\u0060 swallows every exception into \u0060return \u0027[dim]-[/dim]\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/model_table_builder.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac9131ff28eb0637e128ed0efd34385739a9478179097a442ea25390d5ca337"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060parse_readme_frontmatter\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd1843a1ee8a229c7a55f67758ca1f7c7d5c34ee5839bdcc898d37a6c97fe11"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060extract_repo_from_global_search\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/cli/utils/repo_detector.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ae896f15a9bdecf9b0a6a3d41055c51432b9b90c63fa1bd92c461d8c343639"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_ascend_callback_worker_running\u0060 swallows every exception into \u0060return None\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/experts_base.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"1156a769baff8fa48f122b486b00b8165fffd1eb3cefb2083e5db1a8d484fd82"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060_checkpoint_hook_mode\u0060 swallows every exception into \u0060return \u0027other\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/python/sft/dist_utils.py"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ef9a6987e3ff26ea8939d5d01fb3b43dace6bc73f8f6c55c72f7a68580e8d4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060detect_parallel_jobs\u0060 swallows every exception into \u0060return \u00271\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"kt-kernel/setup.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c88707a483b53480274dc246fee1a6510afc41a649f88de17a329dbce15dd30b"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-200","guid":"b0ce3b1d-7a29-fe50-8aab-9aba899d2988","name":"Exposure of Sensitive Information to an Unauthorized Actor","shortDescription":{"text":"Exposure of Sensitive Information to an Unauthorized Actor"},"helpUri":"https://cwe.mitre.org/data/definitions/200.html"},{"id":"CWE-214","guid":"b10ad120-fb22-1351-9348-aa23b453e815","name":"CWE-214","shortDescription":{"text":"CWE-214"},"helpUri":"https://cwe.mitre.org/data/definitions/214.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-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"Cleartext Transmission of Sensitive Information","shortDescription":{"text":"Cleartext Transmission of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"Use of a Broken or Risky Cryptographic Algorithm","shortDescription":{"text":"Use of a Broken or Risky Cryptographic Algorithm"},"helpUri":"https://cwe.mitre.org/data/definitions/327.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-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"Deserialization of Untrusted Data","shortDescription":{"text":"Deserialization of Untrusted Data"},"helpUri":"https://cwe.mitre.org/data/definitions/502.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-532","guid":"1cd8877a-76e8-ce54-b40b-779af23364a0","name":"Insertion of Sensitive Information into Log File","shortDescription":{"text":"Insertion of Sensitive Information into Log File"},"helpUri":"https://cwe.mitre.org/data/definitions/532.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-939","guid":"12397742-f2c4-8254-8012-482c3356c551","name":"CWE-939","shortDescription":{"text":"CWE-939"},"helpUri":"https://cwe.mitre.org/data/definitions/939.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"},{"id":"CWE-942","guid":"a5e9f9ae-e5c1-215b-b5ef-9b85aa6b4828","name":"Permissive Cross-domain Policy with Untrusted Domains","shortDescription":{"text":"Permissive Cross-domain Policy with Untrusted Domains"},"helpUri":"https://cwe.mitre.org/data/definitions/942.html"},{"id":"CWE-95","guid":"400bba4e-483c-5c50-a695-114fa9168003","name":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/95.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":"A01:2025","guid":"df693558-c822-0452-8f7b-4d53cb6bcc59","name":"Broken Access Control","shortDescription":{"text":"Broken Access Control"},"helpUri":"https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/"},{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"},{"id":"A09:2025","guid":"78892bc9-3c98-495d-881c-8af1390d643c","name":"Security Logging \u0026 Alerting Failures","shortDescription":{"text":"Security Logging \u0026 Alerting Failures"},"helpUri":"https://top10.owasp.org/2025/A09_2025-Security_Logging_and_Alerting_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":240,"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."]}]}