{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"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":"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":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"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":"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":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"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":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"Trainer.__init__ (cyclomatic 97): Trainer.__init__ has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"932a779c237f52afa5421a04b3df4f22b03aeac3aa5bac91abc445bba939e978"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer._inner_training_loop (cyclomatic 93): Trainer._inner_training_loop 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e33922b10dd9803deede7fc9ad0ebcd727cc38c37967f31c76b08b35e84f07"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.evaluation_loop (cyclomatic 61): Trainer.evaluation_loop 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3040}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98e671cda3c838eeed50cd235ea3e5ec803b7685b8b26d029182a958300fb44"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer._wrap_model (cyclomatic 43): Trainer._wrap_model 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"172b92a7e08de844fd369969e22dced3b6a382d79a7fb9d8b0a4aac001983387"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 42): main.main has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/main.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0082a1a8761d930363f4905c8f7050f9182de360be06c73d8c7fe0db33b81539"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.prediction_loop (cyclomatic 38): Trainer.prediction_loop 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3631}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d734a738fcd1e6a97c84ac2f3a68ecc5e91c0436b89612549f34f384012d4c6"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer._save_checkpoint (cyclomatic 27): Trainer._save_checkpoint 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2286}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb91e653d354e6a5ce32cf62245de22871b072a1f24c48e4bbaa9529b3293799"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.prediction_step (cyclomatic 26): Trainer.prediction_step 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3303}}}],"partialFingerprints":{"codehealthFindingId/v1":"07b8355dcabf1c79d708d44a95a15abf831775ee139c9dce2b693d01cc1fe354"}},{"ruleId":"D1","level":"warning","message":{"text":"Seq2SeqTrainer.prediction_step (cyclomatic 23): Seq2SeqTrainer.prediction_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":"ptuning/trainer_seq2seq.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce4310cccde5c5be8e7c2a58f786e966ba41c64ac1f7bed3c172e0515749379"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.save_model (cyclomatic 18): Trainer.save_model has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2720}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef8f492d88581efe3944ed58ffc30d9ef92fb06f4bcb0d123a69c4b4684a346"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.get_optimizer_cls_and_kwargs (cyclomatic 17): Trainer.get_optimizer_cls_and_kwargs 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e25f02e39f14dee2b6ca0240e8cfe0ab136f68e9b7b5af461fb5f1ac763887"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.train (cyclomatic 16): Trainer.train 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: ptuning/trainer.py holds 10 of the 12 methods over the threshold \u2014 including the worst \u2014 and 286 of the 321 points over it (89%), 10.6\u00D7 the next-largest file (ptuning/main.py at 27). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"5534a8c6ada4aa75428c59cf0d964153cd82344372e5cbe03525c9c8dba32b18"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._inner_training_loop (cognitive 181): Trainer._inner_training_loop has cognitive complexity 181 (threshold 15). Drivers by points: if/else 65 (136 pts), boolean chains 24, loops 5 (11 pts), ternaries 3 (10 pts) (nesting depth added 84). 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 file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec5f90bbb4ba3044c1b4fbc211906a3bd2ec8703f9885584b9a6d8d1c885eadd"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.__init__ (cognitive 131): Trainer.__init__ has cognitive complexity 131 (threshold 15). Drivers by points: if/else 60 (95 pts), boolean chains 23, ternaries 7 (9 pts), loops 2 (4 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"d360d76d2905437caa14e0f6c66fbc0d399fc6604bcd1802053c8364412c0eb1"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.evaluation_loop (cognitive 108): Trainer.evaluation_loop has cognitive complexity 108 (threshold 15). Drivers by points: if/else 39 (61 pts), ternaries 14 (39 pts), boolean chains 6, loops 2 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3040}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6c1b96464843574f947e6c1fb907fc339e7e3e6e761e1570e395c10ce566cc"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._wrap_model (cognitive 87): Trainer._wrap_model has cognitive complexity 87 (threshold 15). Drivers by points: if/else 33 (67 pts), loops 2 (9 pts), ternaries 3 (6 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 46). 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 file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"3da8c2a053c10f3ddc2cd48c1edb3214da3aa158ae2db278dbd872b40629be52"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 62): main.main has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (41 pts), ternaries 11 (14 pts), loops 2 (6 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":"ptuning/main.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe2f322e39fd0216f844a1126e7175f15a1c2f46856ba334baf9764239e9b7d2"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.prediction_loop (cognitive 58): Trainer.prediction_loop has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (33 pts), ternaries 9 (18 pts), boolean chains 5, loops 2 (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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3631}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c49698dcdebeb7b6589edf143e4c995e4ff438738611f9aec1d2c281fb74150"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.prediction_step (cognitive 52): Trainer.prediction_step has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (46 pts), boolean chains 4, ternaries 2 (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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3303}}}],"partialFingerprints":{"codehealthFindingId/v1":"f16aab4878aedacf8afe68e9e37a46cf96600351e19cda9b0bd790a30be3ac43"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._save_checkpoint (cognitive 35): Trainer._save_checkpoint has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2286}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb0f33dca5992692e2e093d9f1202362e55da8f020013d8c421bc12ab92104a5"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.create_optimizer (cognitive 26): Trainer.create_optimizer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (4 pts), boolean chains 2, 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"c308754f8d8e29618f2a1601057599c5f6cb8c3f07b971a70ece3d020acb2121"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.save_model (cognitive 25): Trainer.save_model has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2 (nesting depth added 12). 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 file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2720}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5711612b6ed8bd955d4e99d188edc853d63587c392984cb249ba1fe2313ecca"}},{"ruleId":"D2","level":"warning","message":{"text":"cli_demo_vision.main (cognitive 24): cli_demo_vision.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli_demo_vision.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"5252c47bbe81e1239cc92a3b171253a464209833daa5a5a941f2922db5509f32"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._load_optimizer_and_scheduler (cognitive 24): Trainer._load_optimizer_and_scheduler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2392}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa06ec978c10a92ec9033869a2b11e33d80cdb56617895eb0fcb76d3be52f200"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._load_from_checkpoint (cognitive 23): Trainer._load_from_checkpoint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2075}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8db7507fddf89c07991ddecd4d0993271cc3efc898623c46bf8120acfec28ab"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._load_best_model (cognitive 23): Trainer._load_best_model has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2133}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3532ca1cc6c4dd34dbd08ac28b3d25cd5acc11b5af40d51716ec8950d931e0c"}},{"ruleId":"D2","level":"warning","message":{"text":"Seq2SeqTrainer.prediction_step (cognitive 23): Seq2SeqTrainer.prediction_step has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 3 (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":"ptuning/trainer_seq2seq.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5122af5d5449e1df9038b0aee11e3f817a6bf5e4ee8b59393db5765e9009905"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._get_train_sampler (cognitive 22): Trainer._get_train_sampler has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 3 (6 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c6fba6a08dc4d6104d2f4f1a8bcfb1c0d525d944de5eff5eff912b6cd0f1c66"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.train (cognitive 18): Trainer.train has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be8ca2214da8df4e16a2352de9da033b29140a4ba55b302b7664653af4cc166"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer._save (cognitive 18): Trainer._save has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts), 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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: ptuning/trainer.py holds 15 of the 18 methods over the threshold \u2014 including the worst \u2014 and 606 of the 670 points over it (90%), 12.9\u00D7 the next-largest file (ptuning/main.py at 47). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":2812}}}],"partialFingerprints":{"codehealthFindingId/v1":"629938c7d8f435baecda54bcde87c469f22ff92d5f948c4db764782d18ae92a7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ptuning/trainer.py: FileTooLong \u2014 2486 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1986 over it, 4.97\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":"ptuning/trainer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9894233740066bc6b2839b4a9a1869a62cbc0b9e3a6100b7412d5972518420de"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Trainer: TooManyMethods \u2014 65 methods. The bar is 30 methods; this is 35 over it, 2.17\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":"ptuning/trainer.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"b016f8eb9b00a397bcc9e6ec3844ad3ab39fecf04966000815ec6ba9017cd527"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201347 lines \u00D7 2): ptuning/trainer_seq2seq.py:38-76 | ptuning/trainer_seq2seq.py:87-133 \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":"ptuning/trainer_seq2seq.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b19641cb9ab3b377f929f4f17a9472399d2c4b3170f50cb5b7a5901261e683"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): ptuning/trainer.py:951-973 | ptuning/trainer.py:998-1021 \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 \u0060ptuning/trainer.py:951\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":"ptuning/trainer.py"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4b6b417aba690a5fe7d048df2eb8eb885b8fa2951c9c7de5f855c9ff5b5299"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): ptuning/web_demo.py:43-62 | web_demo.py:27-46 | web_demo_vision.py:27-46 \u2014 before extracting anything, compare \u0060ptuning/web_demo.py\u0060 and \u0060web_demo.py\u0060 as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/web_demo.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4fa45e75c2ab68444d9e57f5bfed9e65fb909928e4a31be0b5c881270ed1978"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ptuning/trainer.py:1438-1454 | ptuning/trainer.py:1488-1504 \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":"ptuning/trainer.py"},"region":{"startLine":1438}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f2f67ed11537afbd3b0421cc957344f99ca7e1a33de552bd967184d53e1325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): ptuning/main.py:116-131 | ptuning/web_demo.py:141-155 \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. 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":"ptuning/main.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d3917101bc2611edece9c5aee07e259200048528155849925e4b2f4cea4e577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): ptuning/trainer.py:3157-3171 | ptuning/trainer.py:3184-3196 \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":"ptuning/trainer.py"},"region":{"startLine":3157}}}],"partialFingerprints":{"codehealthFindingId/v1":"f451717d756b18045765231a1dc19466d3b075b16d7bf7ae23011d6bce156286"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): ptuning/trainer.py:2952-2964 | ptuning/trainer.py:3022-3033 \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 \u0060ptuning/trainer.py:2952\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":"ptuning/trainer.py"},"region":{"startLine":2952}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a7ea6afc13711fa367558816879cbadb0a6bb51c321cd56bb42738e0fd877f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): ptuning/main.py:246-256 | ptuning/main.py:265-275 | ptuning/main.py:284-294 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/main.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"d31c7f2115b2774a063f8b21661fa60dde968a2aa85a1a6d707b0a0b54ca9ff9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): ptuning/trainer.py:859-868 | ptuning/trainer.py:939-949 | ptuning/trainer.py:986-996 \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 \u0060ptuning/trainer.py:859\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":"ptuning/trainer.py"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec18b11dd5186d4c7ce3680286429622c99fa1f4b07a0d1dfc9b15b887bf3f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ptuning/trainer.py:3068-3076 | ptuning/trainer.py:3665-3673 \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":"ptuning/trainer.py"},"region":{"startLine":3068}}}],"partialFingerprints":{"codehealthFindingId/v1":"e009e3cdf4154d930f07f7fc438af3e4c49536a571fcaef57f297b588d69b7e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ptuning/web_demo.py:65-72 | web_demo.py:49-56 | web_demo_vision.py:49-56 \u2014 before extracting anything, compare \u0060ptuning/web_demo.py\u0060 and \u0060web_demo.py\u0060 as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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":"ptuning/web_demo.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"afbe91d72213c6548d150a7c2b99e5d18820679ed80251702deeb7d4bf460d61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ptuning/web_demo.py:77-81 | web_demo.py:61-65 \u2014 before extracting anything, compare \u0060ptuning/web_demo.py\u0060 and \u0060web_demo.py\u0060 as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/web_demo.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8f4097e4d074ef084ea102559c7dfb7b4f73d8475b3d1070c2dc1d6ea091e08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): web_demo_vision.py:63-67 | web_demo_vision.py:73-78 \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":"web_demo_vision.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff7b19fd42fbdacc375194ad7d56665f1ca8ce2e022d1a01a212e2542e00b42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ptuning/web_demo.py:29-36 | web_demo.py:13-20 | web_demo_vision.py:13-20 \u2014 before extracting anything, compare \u0060ptuning/web_demo.py\u0060 and \u0060web_demo.py\u0060 as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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":"ptuning/web_demo.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"b917e555cc6cbdedcc9828f758c86d2e1b308dc32d89b21338faed7de877c217"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ptuning/trainer.py:2326-2330 | ptuning/trainer.py:2334-2338 \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":"ptuning/trainer.py"},"region":{"startLine":2326}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08f4c49ec70734f89cde765154d861d7e167e60729f60c3069d14439232ed5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ptuning/trainer_seq2seq.py:206-210 | ptuning/trainer_seq2seq.py:220-224 \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":"ptuning/trainer_seq2seq.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8628d06a6c4d5413310291454ff045608662d7b6312cbd7ca2b6e48667f8ba6"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (pytest or unittest), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D9","level":"note","message":{"text":"No tests found: No test suite could be collected \u2014 no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (pytest or unittest) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9bf64cbb5a4ae13d6bcd01fa3bc8d2879d860c73bc67f176ee3c2cecb8adce3"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: adapt synced_gpus for fairscale as well \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer_seq2seq.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"31686085ee557aa8e72536558e2148546add01428c71904debd8658af131cae3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Change dtypes back to M=FP32, Var = BF16, Kahan = False once they can be cast together in torchdistx. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1165}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f395a2bf2e6d8d7f2a72e5d62ed0755ae09f3e12b2deef3385cd9b0dac90ed4"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: Breaking the self.model convention but I see no way around it for 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":"ptuning/trainer.py"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"1718f9ba093f798a3d6802ee35a3c4019bf3e3caa7045cbbe44e0c9461cac80a"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: Breaking the self.model convention but I see no way around it for 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":"ptuning/trainer.py"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f83a7c270df72c24e4284b6a769311b1477c923561d930a301a512eb5c18550"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this needs to be fixed and made cleaner 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":"ptuning/trainer.py"},"region":{"startLine":2681}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f14f24e9612f404fdb5ba850eca0a2959a0c2814abc295f5155ad5b7bb29bcf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this needs to be fixed and made cleaner 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":"ptuning/trainer.py"},"region":{"startLine":3395}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4594ad1909d06120c89e4f474b8b35ce15f41f80492d7bb4d81a04122cfbe31"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: eval doesn\u0027t have \u0060resume_from_checkpoint\u0060 arg but we should be able to do eval \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3059}}}],"partialFingerprints":{"codehealthFindingId/v1":"261099e7c3ba711d22a4102f4487294945959797077758308e8188309c6f72da"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: eval doesn\u0027t have \u0060resume_from_checkpoint\u0060 arg but we should be able to do eval \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3653}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdc61d6376425d21a8dced41cfff4823a906b30ea58ae7d834ddbcef6080a6a"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX: we don\u0027t need optim/sched for inference, but this needs to be sorted out, since \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":3659}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda0ae50e5901b777b56089f7645928466ce448033a7385a05c7d910d37bf44d"}},{"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":"3865c4eaa94734e5ac919daf71a92eb0715233e7bf054fa307bde0d566976b13"},"properties":{"dependency":{"package":"transformers","version":"4.27.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]","[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-2023-299","PYSEC-2023-300","PYSEC-2023-301","PYSEC-2024-227","PYSEC-2024-228","PYSEC-2024-229","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-2025-40","PYSEC-2026-1977","PYSEC-2026-1978","PYSEC-2026-1980","PYSEC-2026-1981","PYSEC-2026-1982","PYSEC-2026-1983","PYSEC-2026-1984","PYSEC-2026-1985","PYSEC-2026-1986","PYSEC-2026-1987","PYSEC-2026-1988","PYSEC-2026-2288","PYSEC-2026-2289","PYSEC-2026-2290","PYSEC-2026-3929"],"reachability":{"kind":"production","file":"api.py","line":2}}}},{"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":"583c754707031c7f24952734cba9fa97072608f6614c4fad93566ca3b3bbef1a"},"properties":{"dependency":{"package":"torch","version":"1.10","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"],"reachability":{"kind":"production","file":"api.py","line":4}}}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f18785ada0539321d4e24983a2a91eb8b3cd5e55fa156aeafa4d87200731926"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 6 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than raised one row each \u2014 most significant first: ptuning/main.py, ptuning/trainer_seq2seq.py, ptuning/arguments.py, ptuning/web_demo.py, web_demo_vision.py, web_demo.py (7 orphaned of 7 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 7 of the 13 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/main.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd68a8d7fc9d597151f6b29c6f3495a84cc1cd3f1fc46cf8a40fb55931bc47cd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/trainer_seq2seq.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e236db7bd047b172983c99ee41e413daf45510dc553079d2a5c83f9cc29bd8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/arguments.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fefa64690f698e0a633d66a5eacd848bcb2523f90c6c416dc53b89644c688fb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ptuning/web_demo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4f39bc87339cb4e3b6a701e589cd130e26e1a7f67f2aa2fbedcd0b9c64f9f2e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web_demo_vision.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"054d839d15bc373029ecc79a1daeec6125dba3b11c509ae85939965f4296f9d9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web_demo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e906dc82d79e0e19eb3dd0c0e19229cad8cef02942e1f913f51d5368752f988f"}},{"ruleId":"C2","level":"warning","message":{"text":"No authorization: This repository serves requests \u2014 a request handler (@app.post() (api.py:21) \u2014 and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdd4670c8a40cb50cba3c16b5c5de611922ca4df94762b84ddada5e23709f97"}},{"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":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Production code isn\u0027t grouped under a src/ folder \u2014 it\u0027s mixed at the repository root with everything else the repository holds, so nothing marks which files are the product."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README claims ChatGLM-6B is a standalone model but the evidence shows no such file exists \u2014 searched for: \u0060ChatGLM-6B\u0060. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest and configuration files (package.json and other *.json, *.csproj, *.props, *.sln/*.slnx, *.yml, *.toml, *.config, tool configs such as eslint.config.js, Dockerfile); the README\u0027s own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read \u2014 a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"343bbbd51ceb8de7a9ff88d79f7c797abf9b5921f8727b67b4d0f4f8a22c5e49"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README.md documents the environment variable \u0060GIT_LFS_SKIP_SMUDGE\u0060, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"b85864071a30ab325207b0475304e4f6aa1b79c8e2996b50e4173a6d35a328ea"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"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 \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(sys.argv) == 2 and sys.argv[1].endswith(\u0022.json\u0022)\u0060 appears character-identically in 2 files \u2014 ptuning/main.py, ptuning/web_demo.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":"ptuning/main.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3c2ef0f029fb60f34705b30c2ac29a123bebc36474fbbc84f8b08b0a4f2eea"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 82 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":"ptuning/main.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"a301ae530accc7193435e7c005004c1cd11af3ba005a20a88eee233386074735"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":2,"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."]}]}