Public report of Genesis-Embodied-AI/genesis-world, published 4 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 4 November 2026, 01:06 UTC · Survey ID cd_d53b7db70e9a4b9eb1fe919feefe4ba3
Genesis-Embodied-AI/genesis-world
Measured 4 November 2026, 01:05 UTC, at code version 8650cfb
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 135,311 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Production Readiness, 39
Findings by how serious they are
53 critical1575 serious86 minor
17 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
4 November 2026, 01:05 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
59of 59 dimensions measured by tools.
1694of 1714 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
59dimensions across 7 lenses, read from 135,311 lines of product code in 1 project.
Genesis-Embodied-AI/genesis-world falls short of our standard for production, in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 47 out of 100 and is rated Weak, and 47 of its 53 critical findings are security problems.
Production Readiness, at 39, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the package under a licence on your banned list, worth about 4 points. Adding automated security scanning would lift Production Readiness itself, worth about 5 points. Raising Production Readiness to 70 would lift the score to about 54.
Thirty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Five pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Pinning each tool to an exact version and passing outside input through environment variables would close both risks. Correcting the flagged pipeline settings would fix the two weaknesses in the build pipeline's configuration, and the two pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The two images with no text description need a text description.
The product code is 135,311 lines, about €160,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 39 to 70, the lowest score rated Strong, the score would rise from 47 to about 54.
Code composition: what the lines of code are
Product code 77%Tests 23%
New since the last survey: 174 findings
These 174 critical or serious findings weren't in the previous survey, on 20 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 183 findings
These 183 critical or serious findings were in the previous survey, on 20 October 2026, and are gone from this one. The first 100 are listed here.
€53,000 to €270,000, for 880 to 2,791 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 47. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 135,311 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Banned license finding(s) in License Compliance.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 4 points · Medium effort · Text alternatives
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Production Readiness, at 39 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 License Compliance findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 135,500 lines over the last 90 days, which is about 549,528 lines a year. At that pace, the extra work comes to an estimated 71.7 to 430.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
208 modules, with 215 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 168 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
engine.couplers.sap_coupler uses constants, so a change to constants can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break constants.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses repr_base, so a change to repr_base can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break repr_base.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
76 pairs of types, where a type in engine.couplers.sap_coupler uses a type in utils.array_class. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
engine.couplers.sap_coupler uses utils.array_class, so a change to utils.array_class can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break utils.array_class.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.mesh uses utils.serialization, so a change to utils.serialization can break engine.mesh, while a change to engine.mesh can't break utils.serialization.
Position
Below the diagonal: engine.mesh uses a module listed above it, which is the healthy direction.
engine.sensors.base_sensor uses repr_base, so a change to repr_base can break engine.sensors.base_sensor, while a change to engine.sensors.base_sensor can't break repr_base.
Position
Below the diagonal: engine.sensors.base_sensor uses a module listed above it, which is the healthy direction.
engine.states.solvers uses repr_base, so a change to repr_base can break engine.states.solvers, while a change to engine.states.solvers can't break repr_base.
Position
Below the diagonal: engine.states.solvers uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity uses constants, so a change to constants can break engine.entities.rigid_entity, while a change to engine.entities.rigid_entity can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity uses engine.mesh, so a change to engine.mesh can break engine.entities.rigid_entity, while a change to engine.entities.rigid_entity can't break engine.mesh.
Position
Below the diagonal: engine.entities.rigid_entity uses a module listed above it, which is the healthy direction.
engine.materials.base uses options.options, so a change to options.options can break engine.materials.base, while a change to engine.materials.base can't break options.options.
Position
Below the diagonal: engine.materials.base uses a module listed above it, which is the healthy direction.
engine.simulator uses engine.states.solvers, so a change to engine.states.solvers can break engine.simulator, while a change to engine.simulator can't break engine.states.solvers.
Position
Below the diagonal: engine.simulator uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses repr_base, so a change to repr_base can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break repr_base.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses engine.states.solvers, so a change to engine.states.solvers can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break engine.states.solvers.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
options.morphs uses options.options, so a change to options.options can break options.morphs, while a change to options.morphs can't break options.options.
Position
Below the diagonal: options.morphs uses a module listed above it, which is the healthy direction.
options.recorders uses options.options, so a change to options.options can break options.recorders, while a change to options.recorders can't break options.options.
Position
Below the diagonal: options.recorders uses a module listed above it, which is the healthy direction.
options.sensors.options uses options.options, so a change to options.options can break options.sensors.options, while a change to options.sensors.options can't break options.options.
Position
Below the diagonal: options.sensors.options uses a module listed above it, which is the healthy direction.
options.solvers uses options.options, so a change to options.options can break options.solvers, while a change to options.solvers can't break options.options.
Position
Below the diagonal: options.solvers uses a module listed above it, which is the healthy direction.
options.surfaces uses options.options, so a change to options.options can break options.surfaces, while a change to options.surfaces can't break options.options.
Position
Below the diagonal: options.surfaces uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses repr_base, so a change to repr_base can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break repr_base.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses engine.materials.base, so a change to engine.materials.base can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break engine.materials.base.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.materials.MPM.base uses engine.materials.base, so a change to engine.materials.base can break engine.materials.MPM.base, while a change to engine.materials.MPM.base can't break engine.materials.base.
Position
Below the diagonal: engine.materials.MPM.base uses a module listed above it, which is the healthy direction.
engine.materials.PBD.base uses engine.materials.base, so a change to engine.materials.base can break engine.materials.PBD.base, while a change to engine.materials.PBD.base can't break engine.materials.base.
Position
Below the diagonal: engine.materials.PBD.base uses a module listed above it, which is the healthy direction.
engine.sensors.raycaster uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.raycaster, while a change to engine.sensors.raycaster can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.raycaster uses a module listed above it, which is the healthy direction.
engine.sensors.raycaster uses options.sensors.options, so a change to options.sensors.options can break engine.sensors.raycaster, while a change to engine.sensors.raycaster can't break options.sensors.options.
Position
Below the diagonal: engine.sensors.raycaster uses a module listed above it, which is the healthy direction.
engine.sensors.surface_distance_probe uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors.surface_distance_probe, while a change to engine.sensors.surface_distance_probe can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors.surface_distance_probe uses a module listed above it, which is the healthy direction.
engine.sensors.surface_distance_probe uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.surface_distance_probe, while a change to engine.sensors.surface_distance_probe can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.surface_distance_probe uses a module listed above it, which is the healthy direction.
engine.sensors.surface_distance_probe uses options.sensors.options, so a change to options.sensors.options can break engine.sensors.surface_distance_probe, while a change to engine.sensors.surface_distance_probe can't break options.sensors.options.
Position
Below the diagonal: engine.sensors.surface_distance_probe uses a module listed above it, which is the healthy direction.
engine.solvers.particle_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.particle_solver, while a change to engine.solvers.particle_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.particle_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses constants, so a change to constants can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break constants.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses engine.states.solvers, so a change to engine.states.solvers can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break engine.states.solvers.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses options.solvers, so a change to options.solvers can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
options.scene uses options.options, so a change to options.options can break options.scene, while a change to options.scene can't break options.options.
Position
Below the diagonal: options.scene uses a module listed above it, which is the healthy direction.
options.scene uses options.solvers, so a change to options.solvers can break options.scene, while a change to options.scene can't break options.solvers.
Position
Below the diagonal: options.scene uses a module listed above it, which is the healthy direction.
engine.entities.particle_entity uses engine.entities.base_entity, so a change to engine.entities.base_entity can break engine.entities.particle_entity, while a change to engine.entities.particle_entity can't break engine.entities.base_entity.
Position
Below the diagonal: engine.entities.particle_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses constants, so a change to constants can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.options, so a change to options.options can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.options.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses engine.materials.base, so a change to engine.materials.base can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break engine.materials.base.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.morphs, so a change to options.morphs can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.morphs.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.surfaces, so a change to options.surfaces can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.surfaces.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses engine.entities.base_entity, so a change to engine.entities.base_entity can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break engine.entities.base_entity.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.scene uses recorders.trajectory, so a change to recorders.trajectory can break engine.scene, while a change to engine.scene can't break recorders.trajectory.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.scene uses engine.states.solvers, so a change to engine.states.solvers can break engine.scene, while a change to engine.scene can't break engine.states.solvers.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.scene uses engine.materials.base, so a change to engine.materials.base can break engine.scene, while a change to engine.scene can't break engine.materials.base.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.scene uses options.recorders, so a change to options.recorders can break engine.scene, while a change to engine.scene can't break options.recorders.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.sensors.kinematic_tactile uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors.kinematic_tactile, while a change to engine.sensors.kinematic_tactile can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors.kinematic_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.kinematic_tactile uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.kinematic_tactile, while a change to engine.sensors.kinematic_tactile can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.kinematic_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.kinematic_tactile uses engine.sensors.raycaster, so a change to engine.sensors.raycaster can break engine.sensors.kinematic_tactile, while a change to engine.sensors.kinematic_tactile can't break engine.sensors.raycaster.
Position
Below the diagonal: engine.sensors.kinematic_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.sensors.raycaster, so a change to engine.sensors.raycaster can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.sensors.raycaster.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_link uses constants, so a change to constants can break engine.entities.rigid_entity.rigid_link, while a change to engine.entities.rigid_entity.rigid_link can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_link uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_link uses repr_base, so a change to repr_base can break engine.entities.rigid_entity.rigid_link, while a change to engine.entities.rigid_entity.rigid_link can't break repr_base.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_link uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_link uses engine.entities.rigid_entity.description, so a change to engine.entities.rigid_entity.description can break engine.entities.rigid_entity.rigid_link, while a change to engine.entities.rigid_entity.rigid_link can't break engine.entities.rigid_entity.description.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_link uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors, while a change to engine.sensors can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.sensors uses utils.array_class, so a change to utils.array_class can break engine.sensors, while a change to engine.sensors can't break utils.array_class.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.sensors.point_cloud_tactile, so a change to engine.sensors.point_cloud_tactile can break engine.sensors, while a change to engine.sensors can't break engine.sensors.point_cloud_tactile.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses constants, so a change to constants can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses engine.entities.base_entity, so a change to engine.entities.base_entity can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break engine.entities.base_entity.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses engine.entities.rigid_entity.description, so a change to engine.entities.rigid_entity.description can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break engine.entities.rigid_entity.description.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses engine.entities.rigid_entity.rigid_link, so a change to engine.entities.rigid_entity.rigid_link can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break engine.entities.rigid_entity.rigid_link.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 58% · Adequate · gated by D1, D2, X4 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
77
High / Critical
A03:2025 — Software Supply Chain Failures
9
Medium
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Resolve the 1 Banned license finding(s) in License Compliance.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Banned license finding(s) in License Compliance.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 53
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1575
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 86
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 17
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 59 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 59 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1694 of 1714 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 60 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in genesis/vis/keybindings.py, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 2 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 224 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 13 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with narrowphase.func_add_polytope_vertex_contacts_sdf (cyclomatic 137), narrowphase.func_contact_overlap_axes (cyclomatic 132), box_contact.func_box_box_contact (cyclomatic 129). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 13 together lifts Cyclomatic Complexity from 3.6 to about 5.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 450 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 455 bodies over 15 down to 15 or less in Cognitive Complexity — start with narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 570), narrowphase.func_contact_overlap_axes (cognitive 557), contact.func_clamp_prune_contacts_coop (cognitive 403). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 455 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.9 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 57 FileTooLong finding(s) in God Classes — start with misc.py (2), REDACTED (2), camera.py (2). — One of this dimension's main actionable groups (57 warning-level).
Resolve the 13 TooManyMethods finding(s) in God Classes — start with rigid_entity.py (2), rigid_solver.py, sap_coupler.py. — One of this dimension's main actionable groups (13 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
451 duplicated block group(s) detected. A further 28 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 81 of the 479 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 141 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 58 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with sap_coupler.py (13), forward_dynamics.py (4), solver.py (4). — One of this dimension's main actionable groups (58 warning-level).
Resolve the 49 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with forward_dynamics.py (5), fem_solver.py (4), path_planning.py (4). — One of this dimension's main actionable groups (49 warning-level).
Resolve the 33 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with point_cloud_tactile.py (3), forward_dynamics.py (3), narrowphase.py (3). — One of this dimension's main actionable groups (33 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with rigid_entity.py, kinematic_solver.py, base_solver.py. — One of this dimension's main actionable groups (5 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
461 test methods: 458 unit, 3 integration, 0 BDD, 0 e2e. The Python suite contributes 461 test function(s) across 59 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
3 outdated, 0 yanked pinned Python distributions. 4 of 33 shipped distributions were graded against pypi.org (0 not published there, 29 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.
Outdated: gs-madrona · ×3
What to do
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
1 of 79 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 33 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (46 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 9 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged.
Banned license: frozendict
What to do
Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: genesis/engine/solvers/rigid/collider/narrowphase.py (38×137=5206); genesis/engine/solvers/rigid/rigid_solver.py (63×59=3717); genesis/engine/solvers/rigid/constraint/solver.py (45×68=3060) Repeated repair below the complexity floor: genesis/engine/entities/fem_entity.py (4 of 7 changes were fixes); genesis/engine/entities/rigid_entity/inertial.py (3 of 3 changes were fixes)
Resolve the 58 Hotspot finding(s) in Churn × Complexity Hotspots — start with viewer.py (2), narrowphase.py, rigid_solver.py. — One of this dimension's main actionable groups (58 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with fem_entity.py, inertial.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.1 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
18 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is genesis/engine/solvers/rigid/collider/narrowphase.py. Counted over 191 of the 262 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
207 deducted task-comment markers across 135311 LoC (0.2/KLoC) → score 9.7. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
FixmeComment · ×139tests/conftest.py:236
TodoComment · ×66tests/utils/assets.py:158
XxxCommentgenesis/logging/time_elapser.py:26
HackCommentREDACTED:62
What to do
Resolve the 139 FixmeComment finding(s) in Explicit Debt — start with misc.py (15), test_collision_nonconvex.py (8), __init__.py (6). — One of this dimension's main actionable groups (139 warning-level).
Resolve the 66 TodoComment finding(s) in Explicit Debt — start with sph_solver.py (7), sap_coupler.py (6), usd_rigid_entity.py (4). — One of this dimension's main actionable groups (66 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with time_elapser.py. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 4 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
1 of 1 build units (Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability6.2 / 10Adequate✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
89 % of calls cross a namespace and 0 % go through an interface, but 14 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
77 finding(s): 0 critical, 46 high, 30 medium, 1 low. 34 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
No action in Static Analysis (SAST) — all 34 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (34 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
9 of 191 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is genesis/ext/pyrender/material.py. Counted over 191 of the 262 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with material.py. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 8 Orphaned file finding(s) in Knowledge Freshness — start with force_fields.py, camera.py, font.py. — One of this dimension's main actionable groups (8 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 4 Change coupling finding(s) in Change Coupling — start with mpm_solver.py (2), rigid_solver.py, diff_gjk.py. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 33 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — genesis/assets/urdf/3763/tree_hier.html:2, genesis/assets/urdf/3763/tree_hier_after_merging.html:2
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure3.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — genesis/assets/urdf/3763/tree_hier.html:1, genesis/assets/urdf/3763/tree_hier_after_merging.html:1
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — genesis/assets/urdf/3763/tree_hier.html:1, genesis/assets/urdf/3763/tree_hier_after_merging.html:1
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×2) — genesis/assets/urdf/3763/tree_hier.html:2, genesis/assets/urdf/3763/tree_hier_after_merging.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 53412 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's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`get_written_paths` is public and takes `owner: object | None` from its caller, and it calls itself at line 115 (`get_written_paths`) with a piece of `owner` — and nowhere in `get_written_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_written_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — genesis/grad/kernel_writes.py:115
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
`init_context` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `DISPLAY` environment variable (set at line 227, put back at line 231) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — genesis/ext/pyrender/platforms/egl.py:140
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment passed to the operation that needs it (the `cwd=` and `env=` arguments of `subprocess.run`/`Popen`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, `contextlib.chdir`, `contextlib.redirect_stdout` or a `try`/`finally` is the least that makes the restore unconditional.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
`debug` at line 155 is called with an argument built by `"…".join(traceback.format())` (line 155), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/vis/viewer.py:155
`debug` at line 402 is called with an argument built by `"…".join(commands)` (line 402), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/utils/usd/usd_context.py:402
`debug` at line 403 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 403), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/engine/couplers/ipc_coupler/coupler.py:403
What to do
In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — 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. (×3) — genesis/repr_base.py:71, genesis/utils/misc.py:716, genesis/ext/pyrender/overlay/plugin.py:241
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×17) — genesis/vis/viewer.py:199, genesis/ext/_trimesh_patch.py:516, genesis/ext/_trimesh_patch.py:521, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×3) — genesis/ext/pyrender/offscreen.py:228, genesis/ext/pyrender/platforms/base.py:46, genesis/engine/sensors/base_sensor.py:65
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`warning` at line 104 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/__init__.py:104
`error` at line 454 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — genesis/__init__.py:454
`warning` at line 96 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/misc.py:96
`debug` at line 180 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/video_encoder.py:180
`warning` at line 56 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:56
`info` at line 58 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:58
`info` at line 145 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:145
`warning` at line 314 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:314
`debug` at line 402 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:402
`warning` at line 416 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:416
`warning` at line 423 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:423
`warning` at line 434 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:434
`warning` at line 473 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:473
`warning` at line 79 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/file_writers.py:79
`warning` at line 193 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:193
`info` at line 260 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:260
`info` at line 418 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:418
`warning` at line 538 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/trajectory.py:538
`debug` at line 246 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:246
`debug` at line 252 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:252
`debug` at line 258 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:258
`debug` at line 265 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:265
`debug` at line 403 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:403
`debug` at line 430 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:430
`debug` at line 603 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:603
`debug` at line 685 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:685
`debug` at line 791 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:791
`warning` at line 804 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:804
`info` at line 293 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:293
`info` at line 320 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:320
`info` at line 402 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:402
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 58 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~40867 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Python, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (90 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF2 Allocation hygiene — Not applicable: Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AC1 · Text alternatives· <img> without a text alternative · ×2
<img> without a text alternative genesis/assets/urdf/3763/tree_hier.html:2— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative genesis/assets/urdf/3763/tree_hier_after_merging.html:2— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<html> without a lang genesis/assets/urdf/3763/tree_hier.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang genesis/assets/urdf/3763/tree_hier_after_merging.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
Banned license: frozendict — `frozendict` 2.5.1 is published on PyPI under `LGPL-3.0-only`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Orphaned knowledge genesis/ext/pyrender/material.py:1— No living knowledge remains for this large file — 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.
FixmeComment tests/conftest.py:236— # FIXME: Enabling multi-threading in benchmark is making compile time estimation unreliable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/conftest.py:379— # FIXME: There is no easy way for Intel ARC device. Ignore device visibility issue for now... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/conftest.py:917— # FIXME: Must set temporary cache even if caching is forcibly disabled because this flag is not always honored — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/test_examples.py:31— # FIXME: segfault on exit — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/test_examples.py:32— # FIXME: segfault on exit (corrupted double-linked list) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/utils/mujoco_parity.py:159— # FIXME: only supporting 1DoF per actuator — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/utils/mujoco_parity.py:473— # FIXME: Masking geometries and equality constraints is not supported for now — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/utils/mujoco_parity.py:712— # FIXME: For some reason, mujoco is sometimes (seemingful) wrongly reporting 0... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/utils/simulators.py:62— # FIXME: Genesis gives every contact at least the sliding-friction basis, so a geom asking for a frictionless — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/utils/simulators.py:67— # FIXME: Genesis has no tendons, so a tendon's range contributes no constraint row on its side. Releasing the range — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/sensors/test_camera.py:439— # FIXME: This test fails without any entities in the scene. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/sensors/test_contact.py:165— # FIXME: Adding CoM offset on box is disturbing contact force computations on box_2 for some reason... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_api.py:381— # FIXME: Not sure why tolerance must be increased for tests to pass — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_api.py:760— # FIXME: pytorch#TBD - 'any' over an empty dimension returns uninitialized memory on MPS, so the contacts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_asset_loading.py:1091— # FIXME: The tolerance must be very high when using 32bits precision. This means that our computation of the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision.py:1506— # FIXME: The top ball is slightly rotating around z-axis (~0.5degree) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:226— # FIXME: The box test only checks that the body wedges at the L-corner equilibrium (position + zero velocity). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:338— # FIXME: The total energy should be not strictly decreasing but is not... relaxing the condition — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:795— # FIXME: There is spurious residual motion on both paths that prevents the objects from truly settling — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:806— # FIXME: The cup is falling on Windows OS because the convex decomposition provided by CoACD is different than — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:946— # FIXME: Rare (~5% of initial-pose draws) stem-through-wall traps exceed this bound by design: a thin feature — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:980— # FIXME: Why the angular velocity threshold has to be so large without any visual effect?! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:986— # FIXME: Both path pumps net positive contact energy over this window. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_collision_nonconvex.py:990— # FIXME: Both paths suffer from fictitious energy injection. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/rigid/test_control.py:52— # FIXME: We do NOT raise exception anymore when setting control targets that would have no effect — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/utils/assets.py:158— # TODO: Validating mesh files is more tricky. Ignoring them for now. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/utils/mujoco_parity.py:438— # TODO: 1 stiffness per joint in Mujoco, 1 stiffness per DoF in Genesis — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/rigid/test_asset_loading.py:1109— # TODO: None of the robots being tested for now have linear joints... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/rigid/test_asset_loading.py:1110— # TODO: Scaling of bounds depending on the type of joint should be explicitly checked. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/rigid/test_dynamics.py:154— # TODO: Cannot afford GPU test for this one — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/particles/test_sph.py:276— # TODO: Add more tests for validating the underlying physical behavior of DFSPH. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/benchmarks/test_rigid.py:404— # TODO: Entire scene reset is still slow currently because 'partial=False' by default. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/vis/batch_renderer.py:163— # TODO: support batch rgba — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/vis/rasterizer_context.py:986— # TODO: need to support multi-env visulaization for tet mode (it's using static node) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/vis/raytracer.py:757— # TODO: make this more principled — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/array_class.py:398— # TODO: Allocate the lower triangle alone. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:161— # TODO: Parse occlusion — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:275— # TODO: Parse them! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_bake.py:44— # TODO: set portable root to avoid extension conflicts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_context.py:356— # TODO: material_id is also reserved for group_by_material option. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_geometry.py:170— # TODO: discard degenerated faces — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_rigid_entity.py:283— # TODO: use attribute "state:<INSTANCE_NAME>:physics:positiion" to parse init_qpos (but it is IsaacSim specific) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_rigid_entity.py:443— # TODO: use drive.GetTypeAttr().Get() to parse force or velocity. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_rigid_entity.py:455— # TODO: Implement target solving in rigid solver. (GetTargetPositionAttr()) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/utils/usd/usd_rigid_entity.py:481— # TODO: parse actuator in USD articulation, now all joints are considered to have actuators — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/ext/_trimesh_patch.py:281— # TODO : should this be removed to always return a scene? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/ext/_trimesh_patch.py:417— # TODO: probably need to support 8 and 12 columns for quads — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/ext/pyrender/font.py:287— # TODO MAKE THIS MORE EFFICIENT, glBufferSubData is broken — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/ext/pyrender/material.py:132— # TODO TMP — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment genesis/ext/pyrender/primitive.py:440— # TODO JOINTS AND WEIGHTS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Hotspot: genesis/engine/solvers/rigid/collider/narrowphase.py genesis/engine/solvers/rigid/collider/narrowphase.py:77— genesis/engine/solvers/rigid/collider/narrowphase.py changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 137 in narrowphase.func_add_polytope_vertex_contacts_sdf at line 77. 12 of those changes were fix/bug commits, and the other 26 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/narrowphase.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/rigid_solver.py genesis/engine/solvers/rigid/rigid_solver.py:489— genesis/engine/solvers/rigid/rigid_solver.py changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in RigidSolver._build_static_config at line 489. 17 of those changes were fix/bug commits, and the other 46 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/rigid_solver.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/constraint/solver.py genesis/engine/solvers/rigid/constraint/solver.py:2834— genesis/engine/solvers/rigid/constraint/solver.py changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in solver.func_island_assemble_factor_solve_tiled at line 2834. 14 of those changes were fix/bug commits, and the other 31 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/solver.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/collider/contact.py genesis/engine/solvers/rigid/collider/contact.py:1563— genesis/engine/solvers/rigid/collider/contact.py changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in contact.func_clamp_prune_contacts_coop at line 1563. 15 of those changes were fix/bug commits, and the other 17 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/contact.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/collider/collider.py genesis/engine/solvers/rigid/collider/collider.py:914— genesis/engine/solvers/rigid/collider/collider.py changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in Collider.get_contacts at line 914. 4 of those changes were fix/bug commits, and the other 29 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/collider.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:892— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in KinematicEntityDescription._parse_scene at line 892. 6 of those changes were fix/bug commits, and the other 6 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py:874— genesis/engine/solvers/rigid/abd/forward_dynamics.py changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in forward_dynamics.func_factor_mass_tree_shared at line 874. 8 of those changes were fix/bug commits, and the other 19 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/abd/forward_dynamics.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/entities/rigid_entity/rigid_entity.py genesis/engine/entities/rigid_entity/rigid_entity.py:201— genesis/engine/entities/rigid_entity/rigid_entity.py changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in KinematicEntity.attach at line 201. 9 of those changes were fix/bug commits, and the other 16 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/entities/rigid_entity/rigid_entity.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/__init__.py genesis/__init__.py:59— genesis/__init__.py changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in genesis.init at line 59. 5 of those changes were fix/bug commits, and the other 11 changed it for other reasons — 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/__init__.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/utils/mesh.py genesis/utils/mesh.py:494— genesis/utils/mesh.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in mesh._postprocess_collision_geoms_impl at line 494. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/utils/mesh.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/constraint/linesearch.py genesis/engine/solvers/rigid/constraint/linesearch.py:1175— genesis/engine/solvers/rigid/constraint/linesearch.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in linesearch.func_linesearch_islands_coop at line 1175. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/linesearch.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/collider/mpr.py genesis/engine/solvers/rigid/collider/mpr.py:436— genesis/engine/solvers/rigid/collider/mpr.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in mpr.func_mpr_contact_from_centers at line 436. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/mpr.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/constraint/island.py genesis/engine/solvers/rigid/constraint/island.py:472— genesis/engine/solvers/rigid/constraint/island.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in island.func_build_islands_coop at line 472. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/island.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/utils/misc.py genesis/utils/misc.py:1201— genesis/utils/misc.py changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in misc.sanitize_index at line 1201. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/utils/misc.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/constraint/backward.py genesis/engine/solvers/rigid/constraint/backward.py:753— genesis/engine/solvers/rigid/constraint/backward.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in backward.kernel_manual_add_equality_constraints_bw 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/backward.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/scene.py genesis/engine/scene.py:333— genesis/engine/scene.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Scene.add_entity at line 333. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/scene.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/collider/box_contact.py genesis/engine/solvers/rigid/collider/box_contact.py:188— genesis/engine/solvers/rigid/collider/box_contact.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 129 in box_contact.func_box_box_contact at line 188. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/box_contact.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/kinematic_solver.py genesis/engine/solvers/kinematic_solver.py:1060— genesis/engine/solvers/kinematic_solver.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in KinematicSolver.set_dofs_velocity at line 1060. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/kinematic_solver.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:135— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in urdf.parse_urdf at line 135. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:287— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in mjcf.parse_link at line 287. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/abd/forward_kinematics.py genesis/engine/solvers/rigid/abd/forward_kinematics.py:1007— genesis/engine/solvers/rigid/abd/forward_kinematics.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in forward_kinematics.func_sweep_links_by_level at line 1007. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/abd/forward_kinematics.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/abd/inverse_kinematics.py genesis/engine/solvers/rigid/abd/inverse_kinematics.py:364— genesis/engine/solvers/rigid/abd/inverse_kinematics.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in inverse_kinematics.func_inverse_kinematics at line 364. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/abd/inverse_kinematics.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/solvers/rigid/collider/epa.py genesis/engine/solvers/rigid/collider/epa.py:951— genesis/engine/solvers/rigid/collider/epa.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in epa.func_safe_epa at line 951. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/epa.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/vis/camera.py genesis/vis/camera.py:592— genesis/vis/camera.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in Camera.set_pose at line 592. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/vis/camera.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: genesis/engine/simulator.py genesis/engine/simulator.py:185— genesis/engine/simulator.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Simulator.build at line 185. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/simulator.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (5 lines × 2) genesis/engine/bvh.py:180— genesis/engine/bvh.py:180-184 | genesis/engine/bvh.py:247-251 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/bvh.py:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:1091— genesis/engine/couplers/sap_coupler.py:1091-1095 | genesis/engine/couplers/sap_coupler.py:1444-1449 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:1097— genesis/engine/couplers/sap_coupler.py:1097-1101 | genesis/engine/couplers/sap_coupler.py:1451-1455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:1560— genesis/engine/couplers/sap_coupler.py:1560-1564 | genesis/engine/couplers/sap_coupler.py:1581-1585 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:1570— genesis/engine/couplers/sap_coupler.py:1570-1574 | genesis/engine/couplers/sap_coupler.py:1592-1596 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:2795— genesis/engine/couplers/sap_coupler.py:2795-2799 | genesis/engine/couplers/sap_coupler.py:2801-2805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:3012— genesis/engine/couplers/sap_coupler.py:3012-3016 | genesis/engine/couplers/sap_coupler.py:3693-3699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:3249— genesis/engine/couplers/sap_coupler.py:3249-3253 | genesis/engine/couplers/sap_coupler.py:3745-3749 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/couplers/sap_coupler.py:3249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:3691— genesis/engine/couplers/sap_coupler.py:3691-3695 | genesis/engine/couplers/sap_coupler.py:3709-3713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/couplers/sap_coupler.py:3802— genesis/engine/couplers/sap_coupler.py:3802-3806 | genesis/engine/couplers/sap_coupler.py:3808-3812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/entities/rigid_entity/rigid_geom.py:279— genesis/engine/entities/rigid_entity/rigid_geom.py:279-283 | genesis/engine/entities/rigid_entity/rigid_link.py:514-518 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/entities/rigid_entity/rigid_geom.py:279` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1419— genesis/engine/sensors/point_cloud_tactile.py:1419-1423 | genesis/engine/sensors/point_cloud_tactile.py:1579-1583 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/sensors/point_cloud_tactile.py:1419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/solvers/kinematic_solver.py:831— genesis/engine/solvers/kinematic_solver.py:831-835 | genesis/engine/solvers/rigid/rigid_solver.py:1226-1230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `genesis/engine/solvers/kinematic_solver.py:831` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:589— genesis/engine/solvers/rigid/abd/forward_dynamics.py:589-593 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:611-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1051— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1051-1055 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1109-1113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1494— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1494-1498 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1579-1583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:836— genesis/engine/solvers/rigid/abd/forward_kinematics.py:836-840 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1195-1199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:426— genesis/engine/solvers/rigid/collider/box_contact.py:426-430 | genesis/engine/solvers/rigid/collider/box_contact.py:683-687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:512— genesis/engine/solvers/rigid/collider/box_contact.py:512-516 | genesis/engine/solvers/rigid/collider/box_contact.py:793-797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/collider/collider.py:1023— genesis/engine/solvers/rigid/collider/collider.py:1023-1028 | genesis/engine/solvers/rigid/constraint/solver.py:406-410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `genesis/engine/solvers/rigid/collider/collider.py:1023` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:695— genesis/engine/solvers/rigid/collider/epa.py:695-699 | genesis/engine/solvers/rigid/collider/epa.py:755-759 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/epa.py:695` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/collider/mpr.py:582— genesis/engine/solvers/rigid/collider/mpr.py:582-586 | genesis/engine/solvers/rigid/collider/mpr.py:590-594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:556— genesis/engine/solvers/rigid/constraint/backward.py:556-560 | genesis/engine/solvers/rigid/constraint/solver.py:845-849 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:943— genesis/engine/solvers/rigid/constraint/linesearch.py:943-947 | genesis/engine/solvers/rigid/constraint/linesearch.py:1137-1141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2536— genesis/engine/solvers/rigid/constraint/solver.py:2536-2540 | genesis/engine/solvers/rigid/constraint/solver.py:2692-2696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
FileTooLong: constraint/solver.py genesis/engine/solvers/rigid/constraint/solver.py— FileTooLong — 4389 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3889 over it, 8.78× 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.
FileTooLong: collider/narrowphase.py genesis/engine/solvers/rigid/collider/narrowphase.py— FileTooLong — 3949 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3449 over it, 7.90× 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.
FileTooLong: couplers/sap_coupler.py genesis/engine/couplers/sap_coupler.py— FileTooLong — 3139 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2639 over it, 6.28× 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.
FileTooLong: rigid/rigid_solver.py genesis/engine/solvers/rigid/rigid_solver.py— FileTooLong — 2471 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1971 over it, 4.94× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 2099 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1599 over it, 4.20× 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.
FileTooLong: sensors/point_cloud_tactile.py genesis/engine/sensors/point_cloud_tactile.py— FileTooLong — 1806 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1306 over it, 3.61× 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.
FileTooLong: abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py— FileTooLong — 1738 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1238 over it, 3.48× 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.
FileTooLong: utils/geom.py genesis/utils/geom.py— FileTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1131 over it, 3.26× 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.
FileTooLong: collider/contact.py genesis/engine/solvers/rigid/collider/contact.py— FileTooLong — 1395 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 895 over it, 2.79× 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.
FileTooLong: rigid_entity/rigid_entity.py genesis/engine/entities/rigid_entity/rigid_entity.py— FileTooLong — 1359 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 859 over it, 2.72× 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.
FileTooLong: constraint/linesearch.py genesis/engine/solvers/rigid/constraint/linesearch.py— FileTooLong — 1296 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 796 over it, 2.59× 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.
FileTooLong: solvers/kinematic_solver.py genesis/engine/solvers/kinematic_solver.py— FileTooLong — 1212 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 712 over it, 2.42× 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.
FileTooLong: pyrender/jit_render.py genesis/ext/pyrender/jit_render.py— FileTooLong — 1193 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 693 over it, 2.39× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 1182 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 682 over it, 2.36× 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.
FileTooLong: solvers/fem_solver.py genesis/engine/solvers/fem_solver.py— FileTooLong — 1134 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 634 over it, 2.27× 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.
FileTooLong: collider/gjk.py genesis/engine/solvers/rigid/collider/gjk.py— FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 627 over it, 2.25× 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.
FileTooLong: sensors/kinematic_tactile.py genesis/engine/sensors/kinematic_tactile.py— FileTooLong — 1083 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 583 over it, 2.17× 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.
FileTooLong: collider/collider.py genesis/engine/solvers/rigid/collider/collider.py— FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 522 over it, 2.04× 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.
FileTooLong: vis/rasterizer_context.py genesis/vis/rasterizer_context.py— FileTooLong — 1017 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 517 over it, 2.03× 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.
FileTooLong: utils/misc.py genesis/utils/misc.py— FileTooLong — 1003 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 503 over it, 2.01× 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.
FileTooLong: utils/array_class.py genesis/utils/array_class.py— FileTooLong — 994 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 494 over it, 1.99× 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.
FileTooLong: utils/mesh.py genesis/utils/mesh.py— FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 492 over it, 1.98× 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.
FileTooLong: abd/accessor.py genesis/engine/solvers/rigid/abd/accessor.py— FileTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 469 over it, 1.94× 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.
FileTooLong: collider/epa.py genesis/engine/solvers/rigid/collider/epa.py— FileTooLong — 958 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 458 over it, 1.92× 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.
FileTooLong: pyrender/viewer.py genesis/ext/pyrender/viewer.py— FileTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 448 over it, 1.90× 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.
Duplicated block (6 lines × 2) genesis/engine/couplers/sap_coupler.py:1156— genesis/engine/couplers/sap_coupler.py:1156-1161 | genesis/engine/couplers/sap_coupler.py:1175-1180 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (6 lines × 2) REDACTED:1379— REDACTED:1379-1384 | REDACTED:1791-1796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/fem_solver.py:510— genesis/engine/solvers/fem_solver.py:510-515 | genesis/engine/solvers/fem_solver.py:517-522 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/fem_solver.py:510` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/fem_solver.py:1362— genesis/engine/solvers/fem_solver.py:1362-1367 | genesis/engine/solvers/fem_solver.py:1374-1379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/mpm_solver.py:752— genesis/engine/solvers/mpm_solver.py:752-757 | genesis/engine/solvers/pbd_solver.py:974-979 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/mpm_solver.py:752` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/pbd_solver.py:715— genesis/engine/solvers/pbd_solver.py:715-720 | genesis/engine/solvers/pbd_solver.py:792-797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/accessor.py:153— genesis/engine/solvers/rigid/abd/accessor.py:153-158 | genesis/engine/solvers/rigid/abd/accessor.py:314-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/accessor.py:1116— genesis/engine/solvers/rigid/abd/accessor.py:1116-1121 | genesis/engine/solvers/rigid/abd/accessor.py:1181-1186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:46— genesis/engine/solvers/rigid/abd/forward_dynamics.py:46-51 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:63-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1058— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1058-1063 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1116-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1058` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1225— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1225-1230 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1256-1261 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1705— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1705-1711 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2181-2186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:558— genesis/engine/solvers/rigid/abd/forward_kinematics.py:558-563 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:615-620 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_kinematics.py:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/manual_bw.py:252— genesis/engine/solvers/rigid/abd/manual_bw.py:252-257 | genesis/engine/solvers/rigid/abd/manual_bw.py:419-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/misc.py:519— genesis/engine/solvers/rigid/abd/misc.py:519-524 | genesis/engine/solvers/rigid/abd/misc.py:560-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:458— genesis/engine/solvers/rigid/collider/box_contact.py:458-463 | genesis/engine/solvers/rigid/collider/box_contact.py:746-755 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:630— genesis/engine/solvers/rigid/collider/box_contact.py:630-635 | genesis/engine/solvers/rigid/collider/box_contact.py:645-650 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:630` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:689— genesis/engine/solvers/rigid/collider/box_contact.py:689-694 | genesis/engine/solvers/rigid/collider/box_contact.py:699-704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/capsule_contact.py:43— genesis/engine/solvers/rigid/collider/capsule_contact.py:43-50 | genesis/engine/solvers/rigid/collider/capsule_contact.py:188-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:4285— genesis/engine/solvers/rigid/collider/narrowphase.py:4285-4290 | genesis/engine/solvers/rigid/collider/narrowphase.py:4950-4964 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:4950` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:819— genesis/engine/solvers/rigid/constraint/backward.py:819-824 | genesis/engine/solvers/rigid/constraint/solver.py:1461-1466 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:685— genesis/engine/solvers/rigid/constraint/linesearch.py:685-690 | genesis/engine/solvers/rigid/constraint/linesearch.py:730-736 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:730` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1290— genesis/engine/solvers/rigid/constraint/linesearch.py:1290-1295 | genesis/engine/solvers/rigid/constraint/linesearch.py:1416-1421 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/constraint/linesearch.py:1422` calls `Vector` and `genesis/engine/solvers/rigid/constraint/linesearch.py:1296` does not — 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.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5062— genesis/engine/solvers/rigid/constraint/solver.py:5062-5067 | genesis/engine/solvers/rigid/constraint/solver.py:5175-5180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1881— genesis/engine/solvers/rigid/rigid_solver.py:1881-1886 | genesis/engine/solvers/rigid/rigid_solver.py:2019-2024 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1881` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/bvh.py:351— genesis/engine/bvh.py:351-357 | genesis/engine/bvh.py:367-373 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/bvh.py:351` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/couplers/sap_coupler.py:2940— genesis/engine/couplers/sap_coupler.py:2940-2946 | genesis/engine/couplers/sap_coupler.py:3589-3595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/couplers/sap_coupler.py:3146— genesis/engine/couplers/sap_coupler.py:3146-3152 | genesis/engine/couplers/sap_coupler.py:3156-3162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:284— genesis/engine/sensors/point_cloud_tactile.py:284-290 | genesis/engine/sensors/surface_distance_probe.py:55-61 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:307— genesis/engine/sensors/point_cloud_tactile.py:307-313 | genesis/engine/sensors/surface_distance_probe.py:105-111 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:427— genesis/engine/sensors/point_cloud_tactile.py:427-433 | genesis/engine/sensors/surface_distance_probe.py:222-228 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) genesis/engine/solvers/fem_solver.py:1089— genesis/engine/solvers/fem_solver.py:1089-1095 | genesis/engine/solvers/fem_solver.py:1165-1171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:218— genesis/engine/solvers/rigid/abd/forward_dynamics.py:218-224 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1777-1783 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:622— genesis/engine/solvers/rigid/abd/forward_dynamics.py:622-631 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:963-969 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:622` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:772— genesis/engine/solvers/rigid/abd/forward_dynamics.py:772-778 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:848-854 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:772` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:781— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:781-787 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:801-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1436— genesis/engine/solvers/rigid/collider/contact.py:1436-1442 | genesis/engine/solvers/rigid/collider/contact.py:1800-1806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2814— genesis/engine/solvers/rigid/collider/narrowphase.py:2814-2823 | genesis/engine/solvers/rigid/collider/narrowphase.py:4273-4279 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2814` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:4544— genesis/engine/solvers/rigid/collider/narrowphase.py:4544-4550 | genesis/engine/solvers/rigid/collider/narrowphase.py:4602-4608 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:4544` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:238— genesis/engine/solvers/rigid/constraint/linesearch.py:238-244 | genesis/engine/solvers/rigid/constraint/solver.py:4777-4783 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:870— genesis/engine/solvers/rigid/constraint/linesearch.py:870-876 | genesis/engine/solvers/rigid/constraint/linesearch.py:1072-1078 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1124— genesis/engine/solvers/rigid/constraint/linesearch.py:1124-1130 | genesis/engine/solvers/rigid/constraint/linesearch.py:1604-1610 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:3127— genesis/engine/solvers/rigid/constraint/solver.py:3127-3133 | genesis/engine/solvers/rigid/constraint/solver.py:3142-3148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1907— genesis/engine/solvers/rigid/rigid_solver.py:1907-1915 | genesis/engine/solvers/rigid/rigid_solver.py:2059-2065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/sph_solver.py:481— genesis/engine/solvers/sph_solver.py:481-489 | genesis/engine/solvers/sph_solver.py:589-595 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/sph_solver.py:481` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) REDACTED:346— REDACTED:346-354 | REDACTED:358-364 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `REDACTED:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/vis/rasterizer_context.py:1044— genesis/vis/rasterizer_context.py:1044-1050 | genesis/vis/rasterizer_context.py:1067-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (7 lines × 2) genesis/vis/raytracer.py:710— genesis/vis/raytracer.py:710-716 | genesis/vis/raytracer.py:729-735 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/vis/raytracer.py:710` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) genesis/engine/sensors/camera.py:291— genesis/engine/sensors/camera.py:291-297 | genesis/engine/sensors/camera.py:659-665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) genesis/engine/solvers/pbd_solver.py:961— genesis/engine/solvers/pbd_solver.py:961-967 | genesis/engine/solvers/sph_solver.py:779-785 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) genesis/engine/couplers/sap_coupler.py:823— genesis/engine/couplers/sap_coupler.py:823-830 | genesis/engine/couplers/sap_coupler.py:3443-3450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/couplers/sap_coupler.py:2542— genesis/engine/couplers/sap_coupler.py:2542-2549 | genesis/engine/couplers/sap_coupler.py:3241-3248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) REDACTED:338— REDACTED:338-345 | REDACTED:699-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:376— genesis/engine/sensors/point_cloud_tactile.py:376-383 | genesis/engine/sensors/surface_distance_probe.py:198-205 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:450— genesis/engine/sensors/point_cloud_tactile.py:450-457 | genesis/engine/sensors/surface_distance_probe.py:243-250 — 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 — a file they already depend on, or a new one alongside them — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/surface_distance_probe.py:242` calls `max` and `genesis/engine/sensors/point_cloud_tactile.py:449` does not — 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.
Duplicated block (8 lines × 2) genesis/engine/solvers/fem_solver.py:242— genesis/engine/solvers/fem_solver.py:242-249 | genesis/engine/solvers/pbd_solver.py:108-115 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/fem_solver.py:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:321— genesis/engine/solvers/rigid/abd/forward_kinematics.py:321-328 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:352-359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:468— genesis/engine/solvers/rigid/collider/box_contact.py:468-475 | genesis/engine/solvers/rigid/collider/box_contact.py:759-766 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:468` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1460— genesis/engine/solvers/rigid/collider/contact.py:1460-1467 | genesis/engine/solvers/rigid/collider/contact.py:1833-1840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/collider/contact.py:1843` calls `qd_block_max` and `genesis/engine/solvers/rigid/collider/contact.py:1469` does not — 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.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:168— genesis/engine/solvers/rigid/collider/narrowphase.py:168-175 | genesis/engine/solvers/rigid/collider/narrowphase.py:938-945 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:1171— genesis/engine/solvers/rigid/collider/narrowphase.py:1171-1184 | genesis/engine/solvers/rigid/collider/narrowphase.py:1189-1196 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:1171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:806— genesis/engine/solvers/rigid/constraint/backward.py:806-813 | genesis/engine/solvers/rigid/constraint/solver.py:1451-1458 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:782— genesis/engine/solvers/rigid/constraint/linesearch.py:782-789 | genesis/engine/solvers/rigid/constraint/linesearch.py:911-918 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:144— genesis/engine/solvers/rigid/constraint/noslip.py:144-151 | genesis/engine/solvers/rigid/constraint/noslip.py:195-202 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) genesis/ext/pyrender/camera.py:181— genesis/ext/pyrender/camera.py:181-188 | genesis/ext/pyrender/camera.py:381-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) genesis/options/solvers.py:754— genesis/options/solvers.py:754-761 | genesis/options/solvers.py:832-839 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/utils/particle.py:194— genesis/utils/particle.py:194-201 | genesis/utils/particle.py:787-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/vis/rasterizer_context.py:1153— genesis/vis/rasterizer_context.py:1153-1160 | genesis/vis/rasterizer_context.py:1176-1183 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (8 lines × 2) genesis/vis/raytracer.py:274— genesis/vis/raytracer.py:274-281 | genesis/vis/raytracer.py:288-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:572— genesis/engine/solvers/rigid/collider/contact.py:572-579 | genesis/engine/solvers/rigid/collider/diff_gjk.py:330-337 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Swallowed exception (empty catch) genesis/vis/viewer.py:199— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:516— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:521— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:606— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/offscreen.py:216— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/offscreen.py:228— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:663— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:697— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:701— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:705— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:709— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1229— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1233— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1315— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/base.py:46— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:24— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:75— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:99— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/overlay/plugin.py:247— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/engine/sensors/base_sensor.py:65— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Duplicated block (9 lines × 2) genesis/engine/couplers/sap_coupler.py:603— genesis/engine/couplers/sap_coupler.py:603-611 | genesis/engine/solvers/fem_solver.py:84-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `genesis/engine/solvers/fem_solver.py:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) genesis/engine/couplers/sap_coupler.py:2158— genesis/engine/couplers/sap_coupler.py:2158-2166 | genesis/engine/couplers/sap_coupler.py:2203-2211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/couplers/sap_coupler.py:2167` calls `fill` and `genesis/engine/couplers/sap_coupler.py:2212` does not — 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.
Duplicated block (9 lines × 2) genesis/engine/entities/fem_entity.py:622— genesis/engine/entities/fem_entity.py:622-630 | genesis/engine/entities/particle_entity.py:510-518 — 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 — a file they already depend on, or a new one alongside them — 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.
Duplicated block (9 lines × 2) genesis/engine/sensors/kinematic_tactile.py:993— genesis/engine/sensors/kinematic_tactile.py:993-1001 | genesis/engine/sensors/kinematic_tactile.py:1262-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/solvers/kinematic_solver.py:1015— genesis/engine/solvers/kinematic_solver.py:1015-1023 | genesis/engine/solvers/rigid/rigid_solver.py:2288-2296 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/rigid_solver.py:2286` calls `reset` and `genesis/engine/solvers/kinematic_solver.py:1014` does not — 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.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:986— genesis/engine/solvers/rigid/abd/forward_dynamics.py:986-994 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1001-1009 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:986` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1444— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1444-1452 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1526-1535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:1379— genesis/engine/solvers/rigid/collider/narrowphase.py:1379-1387 | genesis/engine/solvers/rigid/collider/narrowphase.py:4285-4293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1211— genesis/engine/solvers/rigid/constraint/linesearch.py:1211-1219 | genesis/engine/solvers/rigid/constraint/linesearch.py:1565-1573 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:208— genesis/engine/solvers/rigid/constraint/noslip.py:208-216 | genesis/engine/solvers/rigid/constraint/noslip.py:484-492 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:208` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2363— genesis/engine/solvers/rigid/constraint/solver.py:2363-2371 | genesis/engine/solvers/rigid/constraint/solver.py:2428-2436 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/solver.py:2363` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/constraint/solver.py:2372` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2437` does not — 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.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2389— genesis/engine/solvers/rigid/constraint/solver.py:2389-2397 | genesis/engine/solvers/rigid/constraint/solver.py:2559-2567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2434— genesis/engine/solvers/rigid/constraint/solver.py:2434-2442 | genesis/engine/solvers/rigid/constraint/solver.py:2694-2702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:3232— genesis/engine/solvers/rigid/constraint/solver.py:3232-3240 | genesis/engine/solvers/rigid/constraint/solver.py:3280-3288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) REDACTED:628— REDACTED:628-636 | genesis/ext/urdfpy/utils.py:259-267 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) genesis/vis/rasterizer_context.py:346— genesis/vis/rasterizer_context.py:346-354 | genesis/vis/rasterizer_context.py:655-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) genesis/engine/entities/rigid_entity/rigid_entity.py:642— genesis/engine/entities/rigid_entity/rigid_entity.py:642-650 | genesis/engine/entities/rigid_entity/rigid_link.py:183-191 — 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 — a file they already depend on, or a new one alongside them — 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.
Duplicated block (9 lines × 2) examples/deformable/pbd_liquid.py:10— examples/deformable/pbd_liquid.py:10-18 | examples/rigid/domain_randomization.py:11-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/deformable/pbd_liquid.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples/ipc/ipc_momentum.py:222— examples/ipc/ipc_momentum.py:222-230 | examples/ipc/ipc_momentum.py:233-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 3) genesis/engine/couplers/sap_coupler.py:3010— genesis/engine/couplers/sap_coupler.py:3010-3014 | genesis/engine/couplers/sap_coupler.py:3034-3038 | genesis/engine/couplers/sap_coupler.py:3059-3063 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/engine/materials/FEM/elastic.py:185— genesis/engine/materials/FEM/elastic.py:185-189 | genesis/engine/materials/FEM/elastic.py:206-210 | genesis/engine/materials/FEM/elastic.py:217-221 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:382— genesis/engine/solvers/rigid/abd/accessor.py:382-387 | genesis/engine/solvers/rigid/abd/accessor.py:426-430 | genesis/engine/solvers/rigid/abd/accessor.py:467-471 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1705— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1705-1709 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1777-1781 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2181-2185 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:1162— genesis/engine/solvers/rigid/collider/narrowphase.py:1162-1166 | genesis/engine/solvers/rigid/collider/narrowphase.py:1183-1187 | genesis/engine/solvers/rigid/collider/narrowphase.py:1195-1199 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2819— genesis/engine/solvers/rigid/collider/narrowphase.py:2819-2823 | genesis/engine/solvers/rigid/collider/narrowphase.py:3476-3480 | genesis/engine/solvers/rigid/collider/narrowphase.py:4275-4279 — 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 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2819` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:553— genesis/engine/solvers/rigid/constraint/backward.py:553-557 | genesis/engine/solvers/rigid/constraint/backward.py:1285-1290 | genesis/engine/solvers/rigid/constraint/solver.py:1050-1055 — there are 3 copies across 2 file(s) — 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.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/constraint/linesearch.py:1241— genesis/engine/solvers/rigid/constraint/linesearch.py:1241-1245 | genesis/engine/solvers/rigid/constraint/linesearch.py:1365-1369 | genesis/engine/solvers/rigid/constraint/linesearch.py:1496-1500 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/utils/watertighten.py:362— genesis/utils/watertighten.py:362-366 | genesis/utils/watertighten.py:374-378 | genesis/utils/watertighten.py:386-390 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) genesis/vis/rasterizer_context.py:757— genesis/vis/rasterizer_context.py:757-761 | genesis/vis/rasterizer_context.py:840-844 | genesis/vis/rasterizer_context.py:923-928 — 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 — 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 `genesis/vis/rasterizer_context.py:757` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) genesis/vis/rasterizer_context.py:1154— genesis/vis/rasterizer_context.py:1154-1158 | genesis/vis/rasterizer_context.py:1177-1181 | genesis/vis/rasterizer_context.py:1191-1197 — 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 — 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 `genesis/vis/rasterizer_context.py:1154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) genesis/vis/camera.py:643— genesis/vis/camera.py:643-647 | genesis/vis/camera.py:649-653 | genesis/vis/camera.py:654-658 — 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 — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/vis/camera.py:643` calls `raise_exception` and `genesis/vis/camera.py:654` does not — 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.
Duplicated block (5 lines × 3) genesis/engine/solvers/fem_solver.py:1246— genesis/engine/solvers/fem_solver.py:1246-1250 | genesis/engine/solvers/mpm_solver.py:826-830 | genesis/engine/solvers/mpm_solver.py:850-854 — there are 3 copies across 2 file(s) — 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.
Duplicated block (5 lines × 3) genesis/engine/solvers/rigid/abd/forward_kinematics.py:422— genesis/engine/solvers/rigid/abd/forward_kinematics.py:422-426 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:58-62 | genesis/engine/solvers/rigid/abd/manual_bw.py:37-41 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) genesis/vis/rasterizer_context.py:679— genesis/vis/rasterizer_context.py:679-683 | genesis/vis/rasterizer_context.py:1002-1006 | genesis/vis/rasterizer_context.py:1010-1014 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) examples/rigid/diffik_controller.py:71— examples/rigid/diffik_controller.py:71-75 | examples/rigid/ik_duck.py:54-58 | examples/rigid/ik_franka.py:52-56 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place.
TooManyMethods: RigidSolver genesis/engine/solvers/rigid/rigid_solver.py:209— TooManyMethods — 115 methods. The bar is 30 methods; this is 85 over it, 3.83× 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.
TooManyMethods: SAPCoupler genesis/engine/couplers/sap_coupler.py:185— TooManyMethods — 112 methods. The bar is 30 methods; this is 82 over it, 3.73× 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.
TooManyMethods: RigidEntity genesis/engine/entities/rigid_entity/rigid_entity.py:1489— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× 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.
TooManyMethods: FEMSolver genesis/engine/solvers/fem_solver.py:25— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× 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.
TooManyMethods: RasterizerContext genesis/vis/rasterizer_context.py:174— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× 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.
TooManyMethods: Scene genesis/engine/scene.py:141— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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.
TooManyMethods: MPMSolver genesis/engine/solvers/mpm_solver.py:30— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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.
TooManyMethods: PBDSolver genesis/engine/solvers/pbd_solver.py:29— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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.
TooManyMethods: SPHSolver genesis/engine/solvers/sph_solver.py:20— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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.
TooManyMethods: KinematicSolver genesis/engine/solvers/kinematic_solver.py:155— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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.
TooManyMethods: Viewer genesis/ext/pyrender/viewer.py:58— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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.
TooManyMethods: KinematicEntity genesis/engine/entities/rigid_entity/rigid_entity.py:34— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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.
TooManyMethods: Renderer genesis/ext/pyrender/renderer.py:38— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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.
Duplicated block (12 lines × 2) genesis/engine/force_fields.py:102— genesis/engine/force_fields.py:102-113 | genesis/engine/force_fields.py:294-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:240— genesis/engine/solvers/rigid/collider/epa.py:240-251 | genesis/engine/solvers/rigid/collider/epa.py:1250-1261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1359— genesis/engine/solvers/rigid/constraint/linesearch.py:1359-1370 | genesis/engine/solvers/rigid/constraint/linesearch.py:1490-1501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1948— genesis/engine/solvers/rigid/rigid_solver.py:1948-1959 | genesis/engine/solvers/rigid/rigid_solver.py:2094-2105 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1948` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) genesis/utils/geom.py:1020— genesis/utils/geom.py:1020-1031 | genesis/utils/geom.py:2012-2023 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/utils/geom.py:1020` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) genesis/utils/path_planning.py:415— genesis/utils/path_planning.py:415-426 | genesis/utils/path_planning.py:777-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) genesis/utils/path_planning.py:535— genesis/utils/path_planning.py:535-546 | genesis/utils/path_planning.py:917-928 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (12 lines × 2) examples/coupling/grasp_soft_cube.py:15— examples/coupling/grasp_soft_cube.py:15-26 | examples/coupling/sand_wheel.py:16-27 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/coupling/grasp_soft_cube.py:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples/ipc/ipc_robot_cloth_teleop.py:101— examples/ipc/ipc_robot_cloth_teleop.py:101-112 | examples/ipc/ipc_robot_cloth_teleop.py:120-131 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `examples/ipc/ipc_robot_cloth_teleop.py:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples/locomotion/go2_env.py:243— examples/locomotion/go2_env.py:243-254 | examples/manipulation/grasp_env.py:238-249 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) examples/rendering/demo.py:62— examples/rendering/demo.py:62-73 | examples/rendering/demo.py:110-121 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `examples/rendering/demo.py:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples/rendering/moving_camera.py:17— examples/rendering/moving_camera.py:17-28 | examples/rigid/franka_cube.py:23-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/rendering/moving_camera.py:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples/rigid/ik_franka_batched.py:35— examples/rigid/ik_franka_batched.py:35-46 | examples/rigid/ik_shadow_hand.py:32-44 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/ik_franka_batched.py:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) genesis/engine/solvers/kinematic_solver.py:954— genesis/engine/solvers/kinematic_solver.py:954-963 | genesis/engine/solvers/kinematic_solver.py:1002-1011 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/kinematic_solver.py:954` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:86— genesis/engine/solvers/rigid/abd/forward_dynamics.py:86-95 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2355-2364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1628— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1628-1637 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1676-1685 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1628` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1292— genesis/engine/solvers/rigid/constraint/linesearch.py:1292-1301 | genesis/engine/solvers/rigid/constraint/linesearch.py:1582-1591 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5265— genesis/engine/solvers/rigid/constraint/solver.py:5265-5274 | genesis/engine/solvers/rigid/constraint/solver.py:5516-5525 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:2588— genesis/engine/solvers/rigid/rigid_solver.py:2588-2597 | genesis/engine/solvers/rigid/rigid_solver.py:2608-2617 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:2927— genesis/engine/solvers/rigid/rigid_solver.py:2927-2936 | genesis/engine/solvers/rigid/rigid_solver.py:2946-2955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) genesis/ext/pyrender/jit_render.py:477— genesis/ext/pyrender/jit_render.py:477-486 | genesis/ext/pyrender/jit_render.py:497-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) genesis/ext/pyrender/scene.py:73— genesis/ext/pyrender/scene.py:73-82 | genesis/ext/pyrender/scene.py:535-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) genesis/utils/sdf.py:294— genesis/utils/sdf.py:294-303 | genesis/utils/sdf.py:376-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) examples/rendering/demo.py:36— examples/rendering/demo.py:36-47 | examples/rendering/demo.py:133-142 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `examples/rendering/demo.py:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples/rigid/ik_duck.py:41— examples/rigid/ik_duck.py:41-50 | examples/rigid/ik_franka.py:38-47 — before extracting anything, compare `examples/rigid/ik_duck.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_duck.py:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples/rigid/rolling_coast.py:47— examples/rigid/rolling_coast.py:47-56 | examples/rigid/torsional_grasp.py:48-57 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/rolling_coast.py:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) genesis/engine/couplers/sap_coupler.py:2773— genesis/engine/couplers/sap_coupler.py:2773-2785 | genesis/engine/couplers/sap_coupler.py:3780-3792 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (13 lines × 2) genesis/engine/couplers/sap_coupler.py:2803— genesis/engine/couplers/sap_coupler.py:2803-2815 | genesis/engine/couplers/sap_coupler.py:3810-3822 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (13 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1367— genesis/engine/sensors/point_cloud_tactile.py:1367-1379 | genesis/engine/sensors/point_cloud_tactile.py:1531-1543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/point_cloud_tactile.py:1528` calls `template` and `genesis/engine/sensors/point_cloud_tactile.py:1364` does not — 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.
Duplicated block (13 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:1719— genesis/engine/solvers/rigid/collider/narrowphase.py:1719-1731 | genesis/engine/solvers/rigid/collider/narrowphase.py:4423-4435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2567— genesis/engine/solvers/rigid/constraint/solver.py:2567-2579 | genesis/engine/solvers/rigid/constraint/solver.py:2772-2784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:3047— genesis/engine/solvers/rigid/constraint/solver.py:3047-3059 | genesis/engine/solvers/rigid/constraint/solver.py:3076-3088 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) examples/coupling/cloth_on_rigid.py:19— examples/coupling/cloth_on_rigid.py:19-31 | examples/coupling/water_wheel.py:31-43 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/coupling/cloth_on_rigid.py:19` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) REDACTED:47— REDACTED:47-59 | REDACTED:36-48 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 82% of the shorter file's 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 — 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 `REDACTED:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) examples/rigid/apply_external_wrench.py:8— examples/rigid/apply_external_wrench.py:8-20 | examples/rigid/merge_entities.py:18-30 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/apply_external_wrench.py:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/merge_entities.py:17` calls `add_argument` and `examples/rigid/apply_external_wrench.py:7` does not — 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.
Duplicated block (13 lines × 2) examples/rigid/screw_constraint.py:28— examples/rigid/screw_constraint.py:28-40 | examples/tutorials/position_control_comparison.py:18-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/rigid/screw_constraint.py:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/screw_constraint.py:27` calls `add_argument` and `examples/tutorials/position_control_comparison.py:17` does not — 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.
Duplicated block (13 lines × 2) examples/sap_coupling/fem_fixed_constraint.py:14— examples/sap_coupling/fem_fixed_constraint.py:14-26 | examples/sap_coupling/fem_sphere_and_cube.py:8-20 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/sap_coupling/fem_fixed_constraint.py:28` calls `Elastic` and `examples/sap_coupling/fem_sphere_and_cube.py:22` does not — 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.
Duplicated block (11 lines × 2) genesis/engine/couplers/sap_coupler.py:2322— genesis/engine/couplers/sap_coupler.py:2322-2332 | genesis/engine/couplers/sap_coupler.py:3635-3645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) REDACTED:541— REDACTED:541-551 | REDACTED:628-638 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (11 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:439— genesis/engine/sensors/point_cloud_tactile.py:439-449 | genesis/engine/sensors/surface_distance_probe.py:230-240 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) genesis/engine/solvers/kinematic_solver.py:1032— genesis/engine/solvers/kinematic_solver.py:1032-1042 | genesis/engine/solvers/rigid/rigid_solver.py:2309-2319 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) genesis/engine/solvers/pbd_solver.py:759— genesis/engine/solvers/pbd_solver.py:759-769 | genesis/engine/solvers/pbd_solver.py:829-839 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/pbd_solver.py:759` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1480— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1480-1493 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1568-1578 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1480` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:972— genesis/engine/solvers/rigid/constraint/backward.py:972-982 | genesis/engine/solvers/rigid/constraint/backward.py:1177-1187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/constraint/backward.py:1173` calls `Vector` and `genesis/engine/solvers/rigid/constraint/backward.py:970` does not — 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.
Duplicated block (11 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:4039— genesis/engine/solvers/rigid/constraint/solver.py:4039-4049 | genesis/engine/solvers/rigid/constraint/solver.py:4114-4124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) genesis/ext/pyrender/overlay/plugin.py:1142— genesis/ext/pyrender/overlay/plugin.py:1142-1152 | genesis/ext/pyrender/overlay/plugin.py:1232-1242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) examples/rigid/apply_external_wrench.py:16— examples/rigid/apply_external_wrench.py:16-26 | examples/rigid/diffik_controller.py:24-34 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/apply_external_wrench.py:16` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:64— examples/sap_coupling/franka_grasp_fem_sphere.py:64-74 | examples/sap_coupling/franka_grasp_rigid_cube.py:57-67 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/sap_coupling/franka_grasp_fem_sphere.py:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) genesis/engine/solvers/kinematic_solver.py:938— genesis/engine/solvers/kinematic_solver.py:938-951 | genesis/engine/solvers/rigid/rigid_solver.py:1894-1907 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:64— genesis/engine/solvers/rigid/collider/epa.py:64-77 | genesis/engine/solvers/rigid/collider/epa.py:991-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1887— genesis/engine/solvers/rigid/rigid_solver.py:1887-1900 | genesis/engine/solvers/rigid/rigid_solver.py:2024-2037 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1887` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) genesis/ext/isaacgym/terrain_utils.py:15— genesis/ext/isaacgym/terrain_utils.py:15-28 | REDACTED:197-210 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) REDACTED:3020— REDACTED:3020-3033 | REDACTED:3104-3117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) genesis/engine/solvers/fem_solver.py:629— genesis/engine/solvers/fem_solver.py:629-642 | genesis/engine/solvers/fem_solver.py:686-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) examples/coupling/sand_wheel.py:61— examples/coupling/sand_wheel.py:61-74 | examples/coupling/sand_wheel.py:85-98 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `examples/coupling/sand_wheel.py:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) examples/sap_coupling/fem_fixed_constraint.py:47— examples/sap_coupling/fem_fixed_constraint.py:47-60 | examples/sap_coupling/fem_sphere_and_cube.py:47-60 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/sap_coupling/fem_fixed_constraint.py:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py:2679— genesis/engine/couplers/sap_coupler.py:2679-2687 | genesis/engine/couplers/sap_coupler.py:2691-2699 | genesis/engine/couplers/sap_coupler.py:3009-3029 | genesis/engine/couplers/sap_coupler.py:3033-3053 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py:3178— genesis/engine/couplers/sap_coupler.py:3178-3192 | genesis/engine/couplers/sap_coupler.py:3237-3262 | genesis/engine/couplers/sap_coupler.py:3392-3423 | genesis/engine/couplers/sap_coupler.py:3731-3762 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/sensors/kinematic_tactile.py:327— genesis/engine/sensors/kinematic_tactile.py:327-432 | genesis/engine/sensors/kinematic_tactile.py:454-500 | genesis/engine/sensors/kinematic_tactile.py:723-788 | genesis/engine/sensors/kinematic_tactile.py:820-952 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/sensors/point_cloud_tactile.py:376— genesis/engine/sensors/point_cloud_tactile.py:376-567 | genesis/engine/sensors/point_cloud_tactile.py:1367-1498 | genesis/engine/sensors/point_cloud_tactile.py:1531-1671 | genesis/engine/sensors/surface_distance_probe.py:189-299 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/solvers/rigid/collider/epa.py:441— genesis/engine/solvers/rigid/collider/epa.py:441-567 | genesis/engine/solvers/rigid/collider/epa.py:586-711 | genesis/engine/solvers/rigid/collider/epa.py:716-794 | genesis/engine/solvers/rigid/collider/epa.py:1268-1310 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/solvers/rigid/constraint/solver.py:2352— genesis/engine/solvers/rigid/constraint/solver.py:2352-2409 | genesis/engine/solvers/rigid/constraint/solver.py:2421-2465 | genesis/engine/solvers/rigid/constraint/solver.py:2521-2583 | genesis/engine/solvers/rigid/constraint/solver.py:2653-2813 — 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 — 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' 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. 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/utils/mesh.py:1071— genesis/utils/mesh.py:1071-1076 | genesis/utils/mesh.py:1092-1097 | genesis/utils/mesh.py:1113-1118 | genesis/utils/mesh.py:1179-1184 — 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 — 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' 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. 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.
Duplicated block (7 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:42— genesis/engine/solvers/rigid/abd/accessor.py:42-48 | genesis/engine/solvers/rigid/abd/accessor.py:74-80 | genesis/engine/solvers/rigid/abd/accessor.py:109-115 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2033— genesis/engine/solvers/rigid/constraint/solver.py:2033-2039 | genesis/engine/solvers/rigid/constraint/solver.py:5267-5273 | genesis/engine/solvers/rigid/constraint/solver.py:5518-5524 — 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 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:2033` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:5054— genesis/engine/solvers/rigid/constraint/solver.py:5054-5060 | genesis/engine/solvers/rigid/constraint/solver.py:5122-5128 | genesis/engine/solvers/rigid/constraint/solver.py:5167-5173 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:3194— genesis/engine/solvers/rigid/constraint/solver.py:3194-3200 | genesis/engine/solvers/rigid/constraint/solver.py:3248-3255 | genesis/engine/solvers/rigid/constraint/solver.py:3325-3331 — 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 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:3194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) genesis/engine/entities/rigid_entity/rigid_equality.py:27— genesis/engine/entities/rigid_entity/rigid_equality.py:27-33 | genesis/engine/entities/rigid_entity/rigid_geom.py:294-300 | genesis/engine/entities/rigid_entity/rigid_joint.py:88-94 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) examples/collision/pyramid.py:24— examples/collision/pyramid.py:24-30 | examples/sap_coupling/franka_grasp_fem_sphere.py:14-21 | examples/sap_coupling/franka_grasp_rigid_cube.py:13-20 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/collision/pyramid.py:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) examples/sensors/lidar_teleop.py:150— examples/sensors/lidar_teleop.py:150-156 | examples/sensors/surface_distance_shadowhand.py:138-144 | examples/sensors/temperature_grid.py:200-206 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/sensors/lidar_teleop.py:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/sensors/temperature_grid.py:209` calls `Keybind` and `examples/sensors/surface_distance_shadowhand.py:147` does not — 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.
Duplicated block (11 lines × 3) genesis/engine/solvers/rigid/rigid_solver.py:1866— genesis/engine/solvers/rigid/rigid_solver.py:1866-1876 | genesis/engine/solvers/rigid/rigid_solver.py:2004-2014 | genesis/engine/solvers/rigid/rigid_solver.py:2297-2307 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) examples/coupling/cloth_attached_to_rigid.py:36— examples/coupling/cloth_attached_to_rigid.py:36-46 | examples/coupling/cloth_on_rigid.py:22-32 | examples/coupling/water_wheel.py:34-44 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/coupling/cloth_attached_to_rigid.py:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) examples/coupling/cut_dragon.py:9— examples/coupling/cut_dragon.py:9-19 | examples/coupling/flush_cubes.py:10-20 | examples/coupling/sand_wheel.py:12-22 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/cut_dragon.py:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) examples/rendering/demo.py:74— examples/rendering/demo.py:74-84 | examples/rendering/demo.py:86-96 | examples/rendering/demo.py:98-108 — 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 — 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 `examples/rendering/demo.py:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) examples/rendering/moving_camera.py:10— examples/rendering/moving_camera.py:10-20 | examples/rigid/closed_loop.py:24-34 | examples/usd/import_stage.py:50-60 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rendering/moving_camera.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/usd/import_stage.py:49` calls `add_argument` and `examples/rigid/closed_loop.py:23` does not — 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.
Duplicated block (8 lines × 3) genesis/engine/couplers/sap_coupler.py:2884— genesis/engine/couplers/sap_coupler.py:2884-2891 | genesis/engine/couplers/sap_coupler.py:3539-3546 | genesis/engine/couplers/sap_coupler.py:3888-3895 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/couplers/sap_coupler.py:2883` calls `zero` and `genesis/engine/couplers/sap_coupler.py:3537` does not — 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.
Duplicated block (8 lines × 3) genesis/engine/solvers/fem_solver.py:558— genesis/engine/solvers/fem_solver.py:558-565 | genesis/engine/solvers/fem_solver.py:572-579 | genesis/engine/solvers/fem_solver.py:612-619 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) genesis/engine/solvers/rigid/abd/forward_dynamics.py:537— genesis/engine/solvers/rigid/abd/forward_dynamics.py:537-544 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:742-749 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:897-904 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/abd/forward_dynamics.py:905` calls `SharedArray` and `genesis/engine/solvers/rigid/abd/forward_dynamics.py:547` does not — 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.
Duplicated block (8 lines × 3) genesis/engine/solvers/rigid/abd/forward_kinematics.py:576— genesis/engine/solvers/rigid/abd/forward_kinematics.py:576-583 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:786-794 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:993-1000 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/abd/forward_kinematics.py:989` calls `template` and `genesis/engine/solvers/rigid/abd/forward_kinematics.py:572` does not — 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.
Duplicated block (8 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2570— genesis/engine/solvers/rigid/constraint/solver.py:2570-2577 | genesis/engine/solvers/rigid/constraint/solver.py:2638-2645 | genesis/engine/solvers/rigid/constraint/solver.py:2775-2782 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) genesis/engine/couplers/sap_coupler.py:2875— genesis/engine/couplers/sap_coupler.py:2875-2880 | genesis/engine/couplers/sap_coupler.py:3531-3536 | genesis/engine/couplers/sap_coupler.py:3879-3884 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/couplers/sap_coupler.py:2883` calls `zero` and `genesis/engine/couplers/sap_coupler.py:3539` does not — 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.
Duplicated block (6 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:4034— genesis/engine/solvers/rigid/constraint/solver.py:4034-4039 | genesis/engine/solvers/rigid/constraint/solver.py:4109-4114 | genesis/engine/solvers/rigid/constraint/solver.py:4547-4552 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) genesis/utils/geom.py:974— genesis/utils/geom.py:974-979 | genesis/utils/geom.py:1085-1090 | genesis/utils/geom.py:1160-1166 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) genesis/utils/watertighten.py:102— genesis/utils/watertighten.py:102-107 | genesis/utils/watertighten.py:111-116 | genesis/utils/watertighten.py:120-125 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) genesis/engine/solvers/rigid/collider/epa.py:228— genesis/engine/solvers/rigid/collider/epa.py:228-233 | genesis/engine/solvers/rigid/collider/epa.py:1160-1165 | genesis/engine/solvers/rigid/collider/epa.py:1214-1219 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Low cohesion: RigidEntity (LCOM4 56) genesis/engine/entities/rigid_entity/rigid_entity.py:1489— RigidEntity's methods fall into 56 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 56 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — 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.
Low cohesion: KinematicSolver (LCOM4 15) genesis/engine/solvers/kinematic_solver.py:155— KinematicSolver's methods fall into 15 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 15 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — 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.
Low cohesion: Solver (LCOM4 5) genesis/engine/solvers/base_solver.py:198— Solver's 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 — your repository's 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 — and which would otherwise dominate this list — 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.
Low cohesion: FEMSolver (LCOM4 5) genesis/engine/solvers/fem_solver.py:25— FEMSolver's 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 — your repository's 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 — and which would otherwise dominate this list — 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.
Low cohesion: UsdContext (LCOM4 5) genesis/utils/usd/usd_context.py:96— UsdContext's 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 — your repository's 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 — and which would otherwise dominate this list — 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.
Change coupling: rigid_solver.py ↔ sdf.py genesis/engine/solvers/rigid/rigid_solver.py:1— `genesis/engine/solvers/rigid/rigid_solver.py` and `genesis/utils/sdf.py` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b84599b9` [MISC] Compute the signed distance field of rigid geoms 8x faster and…; `491d41e2` [MISC] Speed up nonconvex collision detection with vert spatial grid …; `6d936326` [MISC] More robust nonconvex collision detection. (#3020) — run `git show` on any of them.
Change coupling: diff_gjk.py ↔ rigid_solver.py genesis/engine/solvers/rigid/collider/diff_gjk.py:1— `genesis/engine/solvers/rigid/collider/diff_gjk.py` and `genesis/engine/solvers/rigid/rigid_solver.py` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `5153f8cb` [BUG FIX] Fix invalid gradients in differentiable rigid-body simulati…; `21dd9d54` [MISC] Remove '_decomp' suffix from rigid engine modules. (#2249) (at that commit the file was still `genesis/engine/solvers/rigid/diff_gjk.py`); `17f4e4b9` [BUG FIX] Various minor bug fixes. (#2222) (at that commit the files were still `genesis/engine/solvers/rigid/diff_gjk_decomp.py` and `genesis/engine/solvers/rigid/rigid_solver_decomp.py`) — run `git show` on any of them.
Change coupling: mpm_solver.py ↔ pbd_solver.py genesis/engine/solvers/mpm_solver.py:1— `genesis/engine/solvers/mpm_solver.py` and `genesis/engine/solvers/pbd_solver.py` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4c4bca40` [MISC] Reduce memory footprint of scenes loading the same asset multi…; `7fb46148` [MISC] Skip Quadrants memory allocation for inactive solvers. (#3155); `33db31db` [BUG FIX] Fix 'MPMEntity.set_particles_vel' and 'Emitter.emit*' broke… — run `git show` on any of them.
Change coupling: mpm_solver.py ↔ sph_solver.py genesis/engine/solvers/mpm_solver.py:1— `genesis/engine/solvers/mpm_solver.py` and `genesis/engine/solvers/sph_solver.py` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7fb46148` [MISC] Skip Quadrants memory allocation for inactive solvers. (#3155); `130c9d99` [BUG FIX] Avoid calls to private solver API in emitter. (#1780); `1f61b8bd` [BUG FIX] Fix bugs in examples and reduce their running time (#1773) — run `git show` on any of them.
Duplicated block (28 lines × 2) genesis/engine/couplers/sap_coupler.py:2879— genesis/engine/couplers/sap_coupler.py:2879-2906 | genesis/engine/couplers/sap_coupler.py:3883-3910 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/couplers/sap_coupler.py:2879` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1188— genesis/engine/sensors/point_cloud_tactile.py:1188-1215 | genesis/engine/sensors/point_cloud_tactile.py:1625-1652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/point_cloud_tactile.py:1621` calls `qd_inv_transform_by_trans_quat`, `static` and `genesis/engine/sensors/point_cloud_tactile.py:1186` does not — 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.
Duplicated block (28 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:3211— genesis/engine/solvers/rigid/collider/narrowphase.py:3211-3238 | genesis/engine/solvers/rigid/collider/narrowphase.py:3693-3720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (28 lines × 2) genesis/utils/tools.py:78— genesis/utils/tools.py:78-105 | genesis/utils/tools.py:114-141 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/utils/tools.py:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (24 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1164— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1164-1187 | genesis/engine/solvers/rigid/constraint/noslip.py:22-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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.
Duplicated block (24 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:521— genesis/engine/solvers/rigid/collider/box_contact.py:521-544 | genesis/engine/solvers/rigid/collider/box_contact.py:802-825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24 lines × 2) genesis/engine/solvers/rigid/collider/collider.py:1283— genesis/engine/solvers/rigid/collider/collider.py:1283-1306 | genesis/engine/solvers/rigid/collider/collider.py:1333-1356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24 lines × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:31— examples/sap_coupling/franka_grasp_fem_sphere.py:31-54 | examples/sap_coupling/franka_grasp_rigid_cube.py:26-49 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/sap_coupling/franka_grasp_fem_sphere.py:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) genesis/engine/couplers/sap_coupler.py:2859— genesis/engine/couplers/sap_coupler.py:2859-2878 | genesis/engine/couplers/sap_coupler.py:3863-3882 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/couplers/sap_coupler.py:2859` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1479— genesis/engine/sensors/point_cloud_tactile.py:1479-1498 | genesis/engine/sensors/point_cloud_tactile.py:1652-1671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/point_cloud_tactile.py:1649` calls `abs` and `genesis/engine/sensors/point_cloud_tactile.py:1477` does not — 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.
Duplicated block (20 lines × 2) genesis/utils/path_planning.py:387— genesis/utils/path_planning.py:387-406 | genesis/utils/path_planning.py:736-755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:8— examples/sap_coupling/franka_grasp_fem_sphere.py:8-27 | examples/sap_coupling/franka_grasp_rigid_cube.py:7-26 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/sap_coupling/franka_grasp_fem_sphere.py:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) genesis/engine/solvers/rigid/collider/gjk.py:1630— genesis/engine/solvers/rigid/collider/gjk.py:1630-1648 | genesis/engine/solvers/rigid/collider/gjk_support.py:147-165 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/rigid/collider/gjk.py:1630` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) genesis/ext/pyrender/jit_render.py:975— genesis/ext/pyrender/jit_render.py:975-993 | genesis/ext/pyrender/jit_render.py:1112-1130 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/ext/pyrender/jit_render.py:975` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) genesis/ext/pyrender/jit_render.py:996— genesis/ext/pyrender/jit_render.py:996-1014 | genesis/ext/pyrender/jit_render.py:1133-1151 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/ext/pyrender/jit_render.py:996` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (19 lines × 2) examples/kinematic/go2_kinematic.py:54— examples/kinematic/go2_kinematic.py:54-73 | examples/sensors/depth_camera_custom_vverts.py:137-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (16 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:459— genesis/engine/solvers/rigid/collider/diff_gjk.py:459-474 | genesis/engine/solvers/rigid/collider/epa.py:1071-1086 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/rigid/collider/diff_gjk.py:459` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (16 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:139— genesis/engine/solvers/rigid/collider/epa.py:139-154 | genesis/engine/solvers/rigid/collider/epa.py:1074-1089 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (16 lines × 2) genesis/ext/pyrender/material.py:378— genesis/ext/pyrender/material.py:378-393 | genesis/ext/pyrender/material.py:587-602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/ext/pyrender/material.py:604` calls `ones` and `genesis/ext/pyrender/material.py:395` does not — 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.
Duplicated block (16 lines × 2) examples/drone/fly.py:17— examples/drone/fly.py:17-32 | examples/rigid/control_franka.py:17-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/drone/fly.py:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:437— genesis/engine/solvers/rigid/collider/diff_gjk.py:437-451 | genesis/engine/solvers/rigid/collider/epa.py:1050-1064 — 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 — a file they already depend on, or a new one alongside them — 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.
Duplicated block (15 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:3734— genesis/engine/solvers/rigid/collider/narrowphase.py:3734-3748 | genesis/engine/solvers/rigid/collider/narrowphase.py:3956-3970 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:3734` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) examples/coupling/flush_cubes.py:22— examples/coupling/flush_cubes.py:22-36 | examples/coupling/sand_wheel.py:24-38 — before extracting anything, compare `examples/coupling/flush_cubes.py` and `examples/coupling/sand_wheel.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/flush_cubes.py:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) examples/rigid/control_franka.py:15— examples/rigid/control_franka.py:15-29 | examples/rigid/grasp_bottle.py:17-31 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/control_franka.py:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/grasp_bottle.py:11` calls `add_argument` and `examples/rigid/control_franka.py:10` does not — 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.
Duplicated block (13 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:1005— genesis/engine/solvers/rigid/constraint/backward.py:1005-1017 | genesis/engine/solvers/rigid/constraint/backward.py:1203-1215 | genesis/engine/solvers/rigid/constraint/solver.py:1842-1854 — there are 3 copies across 2 file(s) — 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.
Duplicated block (13 lines × 3) examples/drone/fly.py:17— examples/drone/fly.py:17-29 | examples/rigid/control_franka.py:17-29 | examples/rigid/grasp_bottle.py:19-31 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/drone/fly.py:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) examples/rigid/friction_breakaway.py:37— examples/rigid/friction_breakaway.py:37-49 | examples/rigid/rolling_coast.py:22-34 | examples/rigid/torsional_grasp.py:23-35 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (13 lines × 3) examples/rigid/ik_custom_chain.py:15— examples/rigid/ik_custom_chain.py:15-27 | examples/rigid/ik_shadow_hand.py:15-27 | examples/rigid/nonconvex_mesh.py:14-26 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) genesis/engine/couplers/legacy_coupler.py:374— genesis/engine/couplers/legacy_coupler.py:374-385 | genesis/engine/couplers/legacy_coupler.py:395-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) genesis/engine/couplers/legacy_coupler.py:421— genesis/engine/couplers/legacy_coupler.py:421-432 | genesis/engine/couplers/legacy_coupler.py:442-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) genesis/engine/solvers/pbd_solver.py:472— genesis/engine/solvers/pbd_solver.py:472-483 | genesis/engine/solvers/sph_solver.py:191-203 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12–13 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2822— genesis/engine/solvers/rigid/collider/narrowphase.py:2822-2834 | genesis/engine/solvers/rigid/collider/narrowphase.py:3479-3490 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2822` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) genesis/engine/sensors/kinematic_tactile.py:605— genesis/engine/sensors/kinematic_tactile.py:605-613 | genesis/engine/sensors/kinematic_tactile.py:684-693 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:445— genesis/engine/solvers/rigid/collider/box_contact.py:445-453 | genesis/engine/solvers/rigid/collider/box_contact.py:716-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:646— genesis/engine/solvers/rigid/constraint/solver.py:646-655 | genesis/engine/solvers/rigid/constraint/solver.py:673-681 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) genesis/utils/path_planning.py:360— genesis/utils/path_planning.py:360-369 | genesis/utils/path_planning.py:706-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 2) genesis/engine/couplers/sap_coupler.py:2813— genesis/engine/couplers/sap_coupler.py:2813-2819 | genesis/engine/couplers/sap_coupler.py:3471-3478 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (7–8 lines × 2) genesis/engine/solvers/kinematic_solver.py:1024— genesis/engine/solvers/kinematic_solver.py:1024-1030 | genesis/engine/solvers/kinematic_solver.py:1079-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/kinematic_solver.py:1079` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:222— genesis/engine/solvers/rigid/constraint/noslip.py:222-229 | genesis/engine/solvers/rigid/constraint/noslip.py:237-243 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) genesis/utils/geom.py:739— genesis/utils/geom.py:739-746 | genesis/utils/geom.py:769-775 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) genesis/engine/sensors/kinematic_tactile.py:1049— genesis/engine/sensors/kinematic_tactile.py:1049-1070 | genesis/engine/sensors/kinematic_tactile.py:1333-1354 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/sensors/kinematic_tactile.py:1049` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1329— genesis/engine/solvers/rigid/collider/contact.py:1329-1372 | genesis/engine/solvers/rigid/collider/contact.py:1571-1592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/collider/contact.py:1325` calls `template` and `genesis/engine/solvers/rigid/collider/contact.py:1568` does not — 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.
Duplicated block (22 lines × 2) REDACTED:2997— REDACTED:2997-3018 | REDACTED:3081-3102 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (21 lines × 2) genesis/engine/entities/emitter.py:163— genesis/engine/entities/emitter.py:163-183 | genesis/engine/entities/emitter.py:230-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) examples/rigid/single_franka.py:17— examples/rigid/single_franka.py:17-37 | examples/rigid/single_franka_envs.py:28-48 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/single_franka.py:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) examples/rigid/terrain_height_field.py:13— examples/rigid/terrain_height_field.py:13-33 | examples/rigid/terrain_subterrain.py:12-32 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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. 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 — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/rigid/terrain_height_field.py:34` calls `zeros`, `arange`, `choice` and `examples/rigid/terrain_subterrain.py:33` does not — 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.
Duplicated block (19–20 lines × 3) genesis/engine/couplers/sap_coupler.py:2900— genesis/engine/couplers/sap_coupler.py:2900-2919 | genesis/engine/couplers/sap_coupler.py:3548-3566 | genesis/engine/couplers/sap_coupler.py:3904-3923 — 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 — 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.
Duplicated block (19–20 lines × 3) genesis/engine/sensors/kinematic_tactile.py:411— genesis/engine/sensors/kinematic_tactile.py:411-430 | genesis/engine/sensors/kinematic_tactile.py:909-927 | genesis/engine/sensors/kinematic_tactile.py:934-952 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/sensors/kinematic_tactile.py:930` calls `static` and `genesis/engine/sensors/kinematic_tactile.py:431` does not — 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.
Duplicated block (19–20 lines × 3) genesis/engine/solvers/rigid/collider/capsule_contact.py:62— genesis/engine/solvers/rigid/collider/capsule_contact.py:62-81 | genesis/engine/solvers/rigid/collider/capsule_contact.py:132-150 | genesis/engine/solvers/rigid/collider/capsule_contact.py:214-232 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14–15 lines × 2) genesis/engine/sensors/kinematic_tactile.py:327— genesis/engine/sensors/kinematic_tactile.py:327-341 | genesis/engine/sensors/kinematic_tactile.py:820-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–15 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2286— genesis/engine/solvers/rigid/constraint/solver.py:2286-2299 | genesis/engine/solvers/rigid/constraint/solver.py:2653-2667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/constraint/solver.py:2670` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2300` does not — 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.
Duplicated block (14–15 lines × 2) genesis/utils/geom.py:965— genesis/utils/geom.py:965-979 | genesis/utils/geom.py:1077-1090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:539— genesis/engine/solvers/rigid/abd/forward_dynamics.py:539-552 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:744-756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1036— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1036-1049 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1095-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1036` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:3253— genesis/engine/solvers/rigid/collider/narrowphase.py:3253-3265 | genesis/engine/solvers/rigid/collider/narrowphase.py:3833-3846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–13 lines × 2) REDACTED:770— REDACTED:770-782 | REDACTED:1843-1853 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `REDACTED:770` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–13 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:547— genesis/engine/solvers/rigid/collider/diff_gjk.py:547-557 | genesis/engine/solvers/rigid/collider/epa.py:1191-1203 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–13 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:124— genesis/engine/solvers/rigid/collider/epa.py:124-134 | genesis/engine/solvers/rigid/collider/epa.py:1058-1070 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/epa.py:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–13 lines × 2) genesis/engine/solvers/kinematic_solver.py:967— genesis/engine/solvers/kinematic_solver.py:967-976 | genesis/engine/solvers/rigid/rigid_solver.py:1969-1981 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/rigid_solver.py:1967` calls `reset` and `genesis/engine/solvers/kinematic_solver.py:966` does not — 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.
Duplicated block (10–13 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:642— genesis/engine/solvers/rigid/constraint/backward.py:642-651 | genesis/engine/solvers/rigid/constraint/solver.py:2115-2127 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10–13 lines × 2) examples/coupling/cloth_attached_to_rigid.py:37— examples/coupling/cloth_attached_to_rigid.py:37-46 | examples/coupling/cloth_on_rigid.py:23-35 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/coupling/cloth_attached_to_rigid.py:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) genesis/engine/solvers/rigid/collider/mpr.py:87— genesis/engine/solvers/rigid/collider/mpr.py:87-96 | genesis/engine/solvers/rigid/collider/utils.py:24-34 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10–11 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:548— genesis/engine/solvers/rigid/constraint/backward.py:548-557 | genesis/engine/solvers/rigid/constraint/solver.py:1045-1055 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10–11 lines × 2) genesis/engine/solvers/rigid/constraint/island.py:282— genesis/engine/solvers/rigid/constraint/island.py:282-292 | genesis/engine/solvers/rigid/constraint/island.py:499-508 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 3) genesis/engine/couplers/sap_coupler.py:2269— genesis/engine/couplers/sap_coupler.py:2269-2278 | genesis/engine/couplers/sap_coupler.py:2368-2377 | genesis/engine/couplers/sap_coupler.py:2384-2393 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2939— genesis/engine/solvers/rigid/collider/narrowphase.py:2939-2948 | genesis/engine/solvers/rigid/collider/narrowphase.py:3350-3360 | genesis/engine/solvers/rigid/collider/narrowphase.py:4323-4332 — 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 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2939` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) examples/collision/contype.py:37— examples/collision/contype.py:37-46 | examples/collision/contype.py:49-58 | examples/collision/contype.py:61-70 — 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 — 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 `examples/collision/contype.py:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) genesis/engine/couplers/sap_coupler.py:2863— genesis/engine/couplers/sap_coupler.py:2863-2871 | genesis/engine/couplers/sap_coupler.py:3329-3337 | genesis/engine/couplers/sap_coupler.py:3867-3875 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) genesis/engine/sensors/point_cloud_tactile.py:451— genesis/engine/sensors/point_cloud_tactile.py:451-459 | genesis/engine/sensors/point_cloud_tactile.py:1450-1458 | genesis/engine/sensors/point_cloud_tactile.py:1608-1616 — 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 — 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.
Duplicated block (9 lines × 3) examples/rigid/diffik_controller.py:53— examples/rigid/diffik_controller.py:53-61 | examples/rigid/ik_duck.py:39-48 | examples/rigid/ik_franka.py:36-45 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/diffik_controller.py:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) genesis/engine/couplers/legacy_coupler.py:377— genesis/engine/couplers/legacy_coupler.py:377-381 | genesis/engine/couplers/legacy_coupler.py:398-403 | genesis/engine/couplers/legacy_coupler.py:616-620 | genesis/engine/couplers/legacy_coupler.py:636-641 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) genesis/engine/solvers/pbd_solver.py:670— genesis/engine/solvers/pbd_solver.py:670-674 | genesis/engine/solvers/pbd_solver.py:715-719 | genesis/engine/solvers/pbd_solver.py:737-741 | genesis/engine/solvers/pbd_solver.py:792-796 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) genesis/utils/mesh.py:1072— genesis/utils/mesh.py:1072-1076 | genesis/utils/mesh.py:1093-1097 | genesis/utils/mesh.py:1114-1118 | genesis/utils/mesh.py:1180-1184 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Swallowed exception (caught, then discarded) genesis/repr_base.py:71— `except Exception` takes every exception and records none of it — 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.
Swallowed exception (caught, then discarded) genesis/utils/misc.py:716— `except Exception` takes every exception and records none of it — 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.
Swallowed exception (caught, then discarded) genesis/ext/pyrender/overlay/plugin.py:241— `except Exception` takes every exception and records none of it — 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.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark genesis/assets/urdf/3763/tree_hier.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark genesis/assets/urdf/3763/tree_hier_after_merging.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC3 · Page structure· Data table has no header cells · ×2
Data table has no header cells genesis/assets/urdf/3763/tree_hier.html:2— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells genesis/assets/urdf/3763/tree_hier_after_merging.html:2— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Repeated repair: genesis/engine/entities/fem_entity.py genesis/engine/entities/fem_entity.py:156— genesis/engine/entities/fem_entity.py changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is FEMEntity.__init__ at line 156), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “[BUG FIX] Make the signed distance fields of meshes reproducible. (#3659)”; “[BREAKING][BUG FIX] Support plain torch tensors and closed-loop policies in differentiable simulation. (#3586)”; “[BUG FIX] Support envs_idx mask in FEM vertex constraints. (#3241)”; “[BUG FIX] Support FEM vertex constraints and topology queries in multi-entity scenes. (#3239)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/entities/fem_entity.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: genesis/engine/entities/rigid_entity/inertial.py genesis/engine/entities/rigid_entity/inertial.py:191— genesis/engine/entities/rigid_entity/inertial.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is inertial.finalize_inertial at line 191), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “[BUG FIX] Fix dynamics of attached entities and resolve assets identically in every precision. (#3311)”; “[BUG FIX] Recover a usable inertia for URDF links stating a zero mass or inertia. (#3261)”; “[BUG FIX] Fix COM frames of fixed links on aligned bodies breaking thrust points. (#3283)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 01:22:45 +01:00' --until='2026-11-04 01:22:45 +01:00' --full-history --no-merges -- genesis/engine/entities/rigid_entity/inertial.py`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Near-duplicate member pair (60 shared lines) genesis/utils/path_planning.py:387— genesis/utils/path_planning.py:387-462 | genesis/utils/path_planning.py:736-827 — 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' grain — 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.
Near-duplicate member pair (60 shared lines) examples/sap_coupling/franka_grasp_fem_sphere.py:8— examples/sap_coupling/franka_grasp_fem_sphere.py:8-92 | examples/sap_coupling/franka_grasp_rigid_cube.py:7-85 — 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' grain — 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.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) genesis/engine/solvers/mpm_solver.py:868— genesis/engine/solvers/mpm_solver.py:868-881 | genesis/engine/solvers/mpm_solver.py:897-903 | genesis/engine/solvers/pbd_solver.py:1036-1043 | genesis/engine/solvers/pbd_solver.py:1062-1068 | genesis/engine/solvers/sph_solver.py:827-835 | genesis/engine/solvers/sph_solver.py:854-861 — 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 — 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' 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. 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.
Members sharing a duplicated core (6 members, 50+ identical tokens) examples/coupling/fem_cube_linked_with_arm.py:11— examples/coupling/fem_cube_linked_with_arm.py:11-131 | examples/coupling/grasp_soft_cube.py:9-104 | examples/rigid/control_franka.py:9-110 | examples/rigid/grasp_bottle.py:9-115 | examples/rigid/suction_cup.py:7-129 | examples/sensors/imu_franka.py:12-137 — 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 — 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' 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. 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.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/abd/forward_kinematics.py:338— genesis/engine/solvers/rigid/abd/forward_kinematics.py:338-374 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:806-841 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1153-1207 | genesis/engine/solvers/rigid/abd/manual_bw.py:236-258 | genesis/engine/solvers/rigid/abd/manual_bw.py:408-425 — 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 — 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' 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. 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/constraint/backward.py:424— genesis/engine/solvers/rigid/constraint/backward.py:424-611 | genesis/engine/solvers/rigid/constraint/backward.py:760-1445 | genesis/engine/solvers/rigid/constraint/solver.py:764-922 | genesis/engine/solvers/rigid/constraint/solver.py:979-1144 | genesis/engine/solvers/rigid/constraint/solver.py:1826-1878 — 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 — 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' 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. 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.
Duplicated block (29 lines × 2) genesis/engine/sensors/kinematic_tactile.py:342— genesis/engine/sensors/kinematic_tactile.py:342-370 | genesis/engine/sensors/kinematic_tactile.py:834-862 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/sensors/kinematic_tactile.py:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (29 lines × 2) genesis/ext/pyrender/renderer.py:260— genesis/ext/pyrender/renderer.py:260-288 | genesis/ext/pyrender/renderer.py:294-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25–26 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2923— genesis/engine/solvers/rigid/collider/narrowphase.py:2923-2948 | genesis/engine/solvers/rigid/collider/narrowphase.py:4308-4332 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2923` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25–26 lines × 2) examples/rigid/ik_custom_chain.py:25— examples/rigid/ik_custom_chain.py:25-50 | examples/rigid/ik_shadow_hand.py:46-70 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1167— genesis/engine/sensors/point_cloud_tactile.py:1167-1186 | genesis/engine/sensors/point_cloud_tactile.py:1233-1251 — both copies are in the same file, so extract the block into one function there and call it from each site — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/point_cloud_tactile.py:1165` calls `template` and `genesis/engine/sensors/point_cloud_tactile.py:1231` does not — 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.
Duplicated block (19–20 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:498— genesis/engine/solvers/rigid/collider/epa.py:498-517 | genesis/engine/solvers/rigid/collider/epa.py:628-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) genesis/ext/pyrender/jit_render.py:1397— genesis/ext/pyrender/jit_render.py:1397-1414 | genesis/ext/pyrender/jit_render.py:1422-1439 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/ext/pyrender/jit_render.py:1397` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) genesis/utils/path_planning.py:475— genesis/utils/path_planning.py:475-492 | genesis/utils/path_planning.py:842-859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) genesis/utils/particle.py:353— genesis/utils/particle.py:353-369 | genesis/utils/particle.py:377-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) examples/rigid/hibernation.py:102— examples/rigid/hibernation.py:102-118 | examples/rigid/wrecking_ball.py:223-239 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/hibernation.py:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) genesis/engine/solvers/rigid/collider/diff_gjk.py:460— genesis/engine/solvers/rigid/collider/diff_gjk.py:460-475 | genesis/engine/solvers/rigid/collider/epa.py:139-152 | genesis/engine/solvers/rigid/collider/epa.py:1072-1087 — there are 3 copies across 2 file(s) — 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 `genesis/engine/solvers/rigid/collider/diff_gjk.py:460` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (14 lines × 3) examples/rigid/gravity_compensation.py:10— examples/rigid/gravity_compensation.py:10-23 | examples/rigid/nonconvex_mesh.py:10-23 | examples/rigid/single_franka.py:10-23 — before extracting anything, compare `examples/rigid/gravity_compensation.py` and `examples/rigid/nonconvex_mesh.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/gravity_compensation.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:803— genesis/engine/solvers/rigid/constraint/linesearch.py:803-816 | genesis/engine/solvers/rigid/constraint/linesearch.py:1012-1023 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:803` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5244— genesis/engine/solvers/rigid/constraint/solver.py:5244-5257 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:78-89 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–13 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2375— genesis/engine/solvers/rigid/constraint/solver.py:2375-2387 | genesis/engine/solvers/rigid/constraint/solver.py:2546-2557 | genesis/engine/solvers/rigid/constraint/solver.py:2697-2706 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/constraint/solver.py:2372` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2696` does not — 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.
Duplicated block (10–13 lines × 3) genesis/ext/isaacgym/terrain_utils.py:378— genesis/ext/isaacgym/terrain_utils.py:378-387 | REDACTED:285-297 | REDACTED:334-343 — there are 3 copies across 2 file(s) — 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.
Duplicated block (12 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:477— genesis/engine/solvers/rigid/collider/epa.py:477-488 | genesis/engine/solvers/rigid/collider/epa.py:610-621 | genesis/engine/solvers/rigid/collider/epa.py:728-739 | genesis/engine/solvers/rigid/collider/epa.py:1276-1287 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:526— genesis/engine/solvers/rigid/collider/epa.py:526-537 | genesis/engine/solvers/rigid/collider/epa.py:678-689 | genesis/engine/solvers/rigid/collider/epa.py:744-755 | genesis/engine/solvers/rigid/collider/epa.py:1289-1300 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–12 lines × 2) genesis/utils/geom.py:1242— genesis/utils/geom.py:1242-1251 | genesis/utils/geom.py:1283-1294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–12 lines × 2) examples/rigid/merge_entities.py:23— examples/rigid/merge_entities.py:23-34 | examples/rigid/screw_constraint.py:33-42 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/merge_entities.py:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (2–6 lines × 3) genesis/utils/geom.py:222— genesis/utils/geom.py:222-227 | genesis/utils/geom.py:252-257 | genesis/utils/geom.py:1099-1100 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (2–6 lines × 3) examples/ipc/ipc_robot_grasp_cube.py:99— examples/ipc/ipc_robot_grasp_cube.py:99-100 | examples/ipc/ipc_robot_grasp_cube.py:101-106 | examples/ipc/ipc_robot_grasp_cube.py:113-118 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/ipc/ipc_robot_grasp_cube.py:100` calls `control_dofs_position` and `examples/ipc/ipc_robot_grasp_cube.py:99` does not — 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.
Duplicated block (5 lines × 5) genesis/engine/solvers/rigid/constraint/backward.py:553— genesis/engine/solvers/rigid/constraint/backward.py:553-557 | genesis/engine/solvers/rigid/constraint/backward.py:1012-1017 | genesis/engine/solvers/rigid/constraint/backward.py:1210-1215 | genesis/engine/solvers/rigid/constraint/solver.py:1050-1055 | genesis/engine/solvers/rigid/constraint/solver.py:1849-1854 — there are 5 copies across 2 file(s) — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/constraint/backward.py:552` calls `qd_float` and `genesis/engine/solvers/rigid/constraint/backward.py:1011` does not — 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.
Duplicated block (5 lines × 5) genesis/utils/particle.py:209— genesis/utils/particle.py:209-213 | genesis/utils/particle.py:244-248 | genesis/utils/particle.py:804-808 | genesis/utils/particle.py:824-828 | genesis/utils/particle.py:834-838 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) examples/rendering/moving_camera.py:14— examples/rendering/moving_camera.py:14-25 | examples/rigid/gravity_compensation.py:14-25 | examples/rigid/single_franka.py:14-25 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/single_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) examples/rigid/ik_duck.py:14— examples/rigid/ik_duck.py:14-25 | examples/rigid/ik_franka.py:14-25 | examples/rigid/ik_franka_batched.py:15-26 — before extracting anything, compare `examples/rigid/ik_duck.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_duck.py:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) examples/rendering/moving_camera.py:10— examples/rendering/moving_camera.py:10-19 | examples/rigid/closed_loop.py:23-33 | examples/usd/import_stage.py:50-59 | examples/viewer_plugin/mouse_interaction.py:18-27 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rendering/moving_camera.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/usd/import_stage.py:49` calls `add_argument`, `parse_args` and `examples/rigid/closed_loop.py:23` does not — 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.
Duplicated block (10 lines × 4) examples/rigid/apply_external_wrench.py:12— examples/rigid/apply_external_wrench.py:12-21 | examples/rigid/merge_entities.py:22-31 | examples/rigid/screw_constraint.py:32-41 | examples/tutorials/position_control_comparison.py:22-31 — 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 — a location they all depend on today, or a new shared one if there is none — 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 `examples/rigid/apply_external_wrench.py:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/merge_entities.py:17` calls `add_argument` and `examples/rigid/apply_external_wrench.py:7` does not — 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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
narrowphase.func_add_polytope_vertex_contacts_sdf (cyclomatic 137) genesis/engine/solvers/rigid/collider/narrowphase.py:77— narrowphase.func_add_polytope_vertex_contacts_sdf has cyclomatic complexity 137 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
narrowphase.func_contact_overlap_axes (cyclomatic 132) genesis/engine/solvers/rigid/collider/narrowphase.py:2198— narrowphase.func_contact_overlap_axes has cyclomatic complexity 132 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
box_contact.func_box_box_contact (cyclomatic 129) genesis/engine/solvers/rigid/collider/box_contact.py:188— box_contact.func_box_box_contact has cyclomatic complexity 129 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KinematicEntityDescription._parse_scene (cyclomatic 96) REDACTED:892— KinematicEntityDescription._parse_scene has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Data.__init__ (cyclomatic 94) REDACTED:414— Data.__init__ has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
contact.func_clamp_prune_contacts_coop (cyclomatic 80) genesis/engine/solvers/rigid/collider/contact.py:1563— contact.func_clamp_prune_contacts_coop has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
usd_geometry.parse_prim_geoms (cyclomatic 78) genesis/utils/usd/usd_geometry.py:38— usd_geometry.parse_prim_geoms has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
linesearch.func_linesearch_islands_coop (cyclomatic 70) genesis/engine/solvers/rigid/constraint/linesearch.py:1175— linesearch.func_linesearch_islands_coop has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
narrowphase.func_add_polytope_vertex_contacts_sdf_shell (cyclomatic 69) genesis/engine/solvers/rigid/collider/narrowphase.py:828— narrowphase.func_add_polytope_vertex_contacts_sdf_shell has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
solver.func_island_assemble_factor_solve_tiled (cyclomatic 68) genesis/engine/solvers/rigid/constraint/solver.py:2834— solver.func_island_assemble_factor_solve_tiled has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mesh._postprocess_collision_geoms_impl (cyclomatic 66) genesis/utils/mesh.py:494— mesh._postprocess_collision_geoms_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.
genesis.init (cyclomatic 64) genesis/__init__.py:59— genesis.init has cyclomatic complexity 64 (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.
multi_contact.func_multi_contact (cyclomatic 64) genesis/engine/solvers/rigid/collider/multi_contact.py:19— multi_contact.func_multi_contact has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Collider.get_contacts (cyclomatic 60) genesis/engine/solvers/rigid/collider/collider.py:914— Collider.get_contacts has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
usd_rigid_entity._parse_link (cyclomatic 60) genesis/utils/usd/usd_rigid_entity.py:166— usd_rigid_entity._parse_link has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
narrowphase.func_recompute_perturbed_contact (cyclomatic 59) genesis/engine/solvers/rigid/collider/narrowphase.py:1810— narrowphase.func_recompute_perturbed_contact has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RigidSolver._build_static_config (cyclomatic 59) genesis/engine/solvers/rigid/rigid_solver.py:489— RigidSolver._build_static_config has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
urdf.parse_urdf (cyclomatic 59) REDACTED:135— urdf.parse_urdf has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
island.func_build_islands_coop (cyclomatic 58) genesis/engine/solvers/rigid/constraint/island.py:472— island.func_build_islands_coop has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
narrowphase.func_convex_convex_contact (cyclomatic 55) genesis/engine/solvers/rigid/collider/narrowphase.py:2795— narrowphase.func_convex_convex_contact has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
backward.kernel_manual_add_equality_constraints_bw (cyclomatic 54) genesis/engine/solvers/rigid/constraint/backward.py:753— backward.kernel_manual_add_equality_constraints_bw 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.
inverse_kinematics.func_inverse_kinematics (cyclomatic 51) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:364— inverse_kinematics.func_inverse_kinematics has cyclomatic complexity 51 (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.
narrowphase.func_narrowphase_multicontact (cyclomatic 48) genesis/engine/solvers/rigid/collider/narrowphase.py:3991— narrowphase.func_narrowphase_multicontact has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
narrowphase._func_multicontact_detect (cyclomatic 47) genesis/engine/solvers/rigid/collider/narrowphase.py:3426— narrowphase._func_multicontact_detect 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.
bvh.func_build_bvh (cyclomatic 46) genesis/engine/bvh.py:262— bvh.func_build_bvh has cyclomatic complexity 46 (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.
Collider._compute_collision_pair_idx (cyclomatic 46) genesis/engine/solvers/rigid/collider/collider.py:430— Collider._compute_collision_pair_idx 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.
solver.func_hessian_direct_batch (cyclomatic 46) genesis/engine/solvers/rigid/constraint/solver.py:2650— solver.func_hessian_direct_batch 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.
mjcf.parse_link (cyclomatic 46) REDACTED:287— mjcf.parse_link 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.
contact.func_contact_support_hull (cyclomatic 44) genesis/engine/solvers/rigid/collider/contact.py:1117— contact.func_contact_support_hull has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImGuiOverlayPlugin._render_entity_browser (cyclomatic 44) genesis/ext/pyrender/overlay/plugin.py:1018— ImGuiOverlayPlugin._render_entity_browser has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KinematicEntity.attach (cyclomatic 43) genesis/engine/entities/rigid_entity/rigid_entity.py:201— KinematicEntity.attach 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.
solver._add_collision_constraints_per_contact (cyclomatic 43) genesis/engine/solvers/rigid/constraint/solver.py:971— solver._add_collision_constraints_per_contact 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.
Camera.set_pose (cyclomatic 43) genesis/vis/camera.py:592— Camera.set_pose 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.
mpr.func_mpr_contact_from_centers (cyclomatic 42) genesis/engine/solvers/rigid/collider/mpr.py:436— mpr.func_mpr_contact_from_centers 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.
narrowphase.func_contact_mpr_terrain (cyclomatic 42) genesis/engine/solvers/rigid/collider/narrowphase.py:1503— narrowphase.func_contact_mpr_terrain 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.
forward_dynamics.func_factor_mass_tree_shared (cyclomatic 40) genesis/engine/solvers/rigid/abd/forward_dynamics.py:874— forward_dynamics.func_factor_mass_tree_shared 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.
ImGuiOverlayPlugin._render_scene_editor (cyclomatic 40) genesis/ext/pyrender/overlay/plugin.py:826— ImGuiOverlayPlugin._render_scene_editor 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.
point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh (cyclomatic 39) genesis/engine/sensors/point_cloud_tactile.py:352— point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh 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.
epa.func_safe_epa (cyclomatic 39) genesis/engine/solvers/rigid/collider/epa.py:951— epa.func_safe_epa 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.
solver.func_island_hessian_assemble_block (cyclomatic 39) genesis/engine/solvers/rigid/constraint/solver.py:3161— solver.func_island_hessian_assemble_block 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.
RigidSolver.set_base_links_quat (cyclomatic 38) genesis/engine/solvers/rigid/rigid_solver.py:1965— RigidSolver.set_base_links_quat 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.
gltf.parse_glb_material (cyclomatic 38) REDACTED:136— gltf.parse_glb_material 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.
serialization._load_value (cyclomatic 38) REDACTED:443— serialization._load_value 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.
usd_collision.apply_collision_filtering (cyclomatic 38) genesis/utils/usd/usd_collision.py:15— usd_collision.apply_collision_filtering 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.
forward_dynamics.func_midpoint_free_body (cyclomatic 37) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1892— forward_dynamics.func_midpoint_free_body has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
contact.func_clamp_prune_contacts (cyclomatic 37) genesis/engine/solvers/rigid/collider/contact.py:1320— contact.func_clamp_prune_contacts has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
island.func_build_islands (cyclomatic 37) genesis/engine/solvers/rigid/constraint/island.py:260— island.func_build_islands has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
kernel_writes.get_written_paths (cyclomatic 37) genesis/grad/kernel_writes.py:36— kernel_writes.get_written_paths has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mjcf.build_model (cyclomatic 37) REDACTED:65— mjcf.build_model has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IPCCoupler._add_rigid_geoms_to_ipc (cyclomatic 36) genesis/engine/couplers/ipc_coupler/coupler.py:399— IPCCoupler._add_rigid_geoms_to_ipc has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forward_dynamics.func_torque_and_passive_force (cyclomatic 36) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1587— forward_dynamics.func_torque_and_passive_force has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
solver.func_solve_init (cyclomatic 36) genesis/engine/solvers/rigid/constraint/solver.py:5560— solver.func_solve_init has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
island.func_reorder_island_dofs (cyclomatic 35) genesis/engine/solvers/rigid/constraint/island.py:749— island.func_reorder_island_dofs has cyclomatic complexity 35 (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.
RigidSolver.set_base_links_pos (cyclomatic 35) genesis/engine/solvers/rigid/rigid_solver.py:1829— RigidSolver.set_base_links_pos 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.
solver._add_friction_constraint (cyclomatic 34) genesis/engine/solvers/rigid/constraint/solver.py:753— solver._add_friction_constraint 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.
Renderer._get_primitive_program (cyclomatic 34) genesis/ext/pyrender/renderer.py:749— Renderer._get_primitive_program 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.
Viewer._render (cyclomatic 34) genesis/ext/pyrender/viewer.py:1065— Viewer._render 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.
Raytracer.build (cyclomatic 34) genesis/vis/raytracer.py:213— Raytracer.build 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.
multi_contact.func_clip_polygon (cyclomatic 33) genesis/engine/solvers/rigid/collider/multi_contact.py:874— multi_contact.func_clip_polygon 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.
gltf.parse_mesh_glb (cyclomatic 33) REDACTED:343— gltf.parse_mesh_glb 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.
mjcf.parse_geom (cyclomatic 33) REDACTED:513— mjcf.parse_geom 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.
Entity._get_global_idx (cyclomatic 32) genesis/engine/entities/base_entity.py:169— Entity._get_global_idx 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.
Solver.save_checkpoint (cyclomatic 32) genesis/engine/solvers/base_solver.py:557— Solver.save_checkpoint 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.
RigidSolver._jacobi_mass_spread_bound (cyclomatic 32) genesis/engine/solvers/rigid/rigid_solver.py:800— RigidSolver._jacobi_mass_spread_bound 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.
_trimesh_patch.load_obj (cyclomatic 32) genesis/ext/_trimesh_patch.py:38— _trimesh_patch.load_obj 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.
TrajectoryFileWriter.build (cyclomatic 32) genesis/recorders/trajectory.py:523— TrajectoryFileWriter.build 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.
KinematicEntityDescription._load_heterogeneous_morphs (cyclomatic 31) REDACTED:480— KinematicEntityDescription._load_heterogeneous_morphs 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.
diff_gjk.func_gjk_contact (cyclomatic 31) genesis/engine/solvers/rigid/collider/diff_gjk.py:18— diff_gjk.func_gjk_contact 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.
gjk.func_gjk_contact (cyclomatic 31) genesis/engine/solvers/rigid/collider/gjk.py:141— gjk.func_gjk_contact 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.
RigidSolver._set_links_info (cyclomatic 31) genesis/engine/solvers/rigid/rigid_solver.py:2108— RigidSolver._set_links_info 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.
JITRenderer.set_primitive (cyclomatic 31) genesis/ext/pyrender/jit_render.py:517— JITRenderer.set_primitive 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.
narrowphase.func_narrowphase_contact0 (cyclomatic 30) genesis/engine/solvers/rigid/collider/narrowphase.py:4218— narrowphase.func_narrowphase_contact0 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.
linesearch.func_ls_state_advance (cyclomatic 30) genesis/engine/solvers/rigid/constraint/linesearch.py:379— linesearch.func_ls_state_advance 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.
Viewer.start (cyclomatic 30) genesis/ext/pyrender/viewer.py:1161— Viewer.start 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.
data._allocate (cyclomatic 30) REDACTED:762— data._allocate 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.
misc.indices_to_mask (cyclomatic 30) genesis/utils/misc.py:720— misc.indices_to_mask 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.
RigidEntityDescription._describe_link (cyclomatic 29) REDACTED:1674— RigidEntityDescription._describe_link 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.
_trimesh_patch.export_obj (cyclomatic 29) genesis/ext/_trimesh_patch.py:756— _trimesh_patch.export_obj 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.
Renderer.render (cyclomatic 29) genesis/ext/pyrender/renderer.py:118— Renderer.render 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.
usd_material.parse_preview_surface (cyclomatic 29) genesis/utils/usd/usd_material.py:57— usd_material.parse_preview_surface 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.
Mesh.from_trimesh (cyclomatic 28) REDACTED:438— Mesh.from_trimesh 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.
gjk.func_safe_gjk (cyclomatic 28) genesis/engine/solvers/rigid/collider/gjk.py:1134— gjk.func_safe_gjk 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.
narrowphase.func_narrow_phase_nonconvex_vs_nonterrain (cyclomatic 28) genesis/engine/solvers/rigid/collider/narrowphase.py:4895— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain 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.
KinematicEntityDescription._align_free_roots (cyclomatic 27) REDACTED:1199— KinematicEntityDescription._align_free_roots 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.
Scene.add_entity (cyclomatic 27) genesis/engine/scene.py:333— Scene.add_entity 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.
point_cloud_tactile._kernel_elastomer_surface_state_via_global_bvh (cyclomatic 27) genesis/engine/sensors/point_cloud_tactile.py:1502— point_cloud_tactile._kernel_elastomer_surface_state_via_global_bvh 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.
Simulator.build (cyclomatic 27) genesis/engine/simulator.py:185— Simulator.build 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.
multi_contact.func_potential_box_normals (cyclomatic 27) genesis/engine/solvers/rigid/collider/multi_contact.py:283— multi_contact.func_potential_box_normals 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.
misc.sanitize_index (cyclomatic 27) genesis/utils/misc.py:1201— misc.sanitize_index 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.
watertighten._quadric_decimate_loop (cyclomatic 27) genesis/utils/watertighten.py:751— watertighten._quadric_decimate_loop 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.
Raytracer.update_scene (cyclomatic 27) genesis/vis/raytracer.py:659— Raytracer.update_scene 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.
KinematicEntity.inverse_kinematics_multilink (cyclomatic 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1304— KinematicEntity.inverse_kinematics_multilink has cyclomatic complexity 26 (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.
forward_dynamics.func_factor_mass_tree_tiled (cyclomatic 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:516— forward_dynamics.func_factor_mass_tree_tiled 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.
forward_dynamics.func_integrate (cyclomatic 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2147— forward_dynamics.func_integrate 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.
diff_gjk.func_extended_epa (cyclomatic 26) genesis/engine/solvers/rigid/collider/diff_gjk.py:354— diff_gjk.func_extended_epa 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.
epa.func_epa (cyclomatic 26) genesis/engine/solvers/rigid/collider/epa.py:28— epa.func_epa 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.
RigidSolver.build (cyclomatic 26) genesis/engine/solvers/rigid/rigid_solver.py:297— RigidSolver.build 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.
Primitive._add_to_context (cyclomatic 26) genesis/ext/pyrender/primitive.py:368— Primitive._add_to_context 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.
mjcf.parse_geoms (cyclomatic 26) REDACTED:745— mjcf.parse_geoms has cyclomatic complexity 26 (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.
point_cloud_tactile._kernel_elastomer_surface_state_bvh (cyclomatic 25) genesis/engine/sensors/point_cloud_tactile.py:1344— point_cloud_tactile._kernel_elastomer_surface_state_bvh 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.
KinematicSolver.set_dofs_velocity (cyclomatic 25) genesis/engine/solvers/kinematic_solver.py:1060— KinematicSolver.set_dofs_velocity 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.
linesearch.func_row_alpha_terms (cyclomatic 25) genesis/engine/solvers/rigid/constraint/linesearch.py:107— linesearch.func_row_alpha_terms 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.
solver._sort_contacts_and_build_islands (cyclomatic 25) genesis/engine/solvers/rigid/constraint/solver.py:1559— solver._sort_contacts_and_build_islands 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.
RRTConnect.plan (cyclomatic 25) genesis/utils/path_planning.py:893— RRTConnect.plan 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.
LegacyCoupler.fem_surface_force (cyclomatic 24) genesis/engine/couplers/legacy_coupler.py:493— LegacyCoupler.fem_surface_force 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.
KinematicSolver.build (cyclomatic 24) genesis/engine/solvers/kinematic_solver.py:230— KinematicSolver.build 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.
epa.func_epa_init_polytope_3d (cyclomatic 24) genesis/engine/solvers/rigid/collider/epa.py:571— epa.func_epa_init_polytope_3d 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.
solver.func_add_dynamic_constraint_rows_batch (cyclomatic 24) genesis/engine/solvers/rigid/constraint/solver.py:1882— solver.func_add_dynamic_constraint_rows_batch 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.
Renderer._bind_and_draw_primitive (cyclomatic 24) genesis/ext/pyrender/renderer.py:559— Renderer._bind_and_draw_primitive 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.
terrain.parse_terrain (cyclomatic 24) REDACTED:19— terrain.parse_terrain 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.
SAPCoupler.build (cyclomatic 23) genesis/engine/couplers/sap_coupler.py:267— SAPCoupler.build 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.
forward_dynamics.func_factor_mass_tree_global (cyclomatic 23) genesis/engine/solvers/rigid/abd/forward_dynamics.py:723— forward_dynamics.func_factor_mass_tree_global 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.
misc.broadcast_tensor (cyclomatic 23) genesis/utils/misc.py:1346— misc.broadcast_tensor 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.
misc.assign_indexed_tensor (cyclomatic 23) genesis/utils/misc.py:1478— misc.assign_indexed_tensor 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.
RRT.plan (cyclomatic 23) genesis/utils/path_planning.py:511— RRT.plan 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.
UsdContext.find_all_materials (cyclomatic 23) genesis/utils/usd/usd_context.py:338— UsdContext.find_all_materials 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.
LegacyCoupler.mpm_grid_op (cyclomatic 22) genesis/engine/couplers/legacy_coupler.py:322— LegacyCoupler.mpm_grid_op 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.
forward_kinematics.func_sweep_links_by_level (cyclomatic 22) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1007— forward_kinematics.func_sweep_links_by_level 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.
manual_bw.func_forward_kinematics_link_bw (cyclomatic 22) genesis/engine/solvers/rigid/abd/manual_bw.py:17— manual_bw.func_forward_kinematics_link_bw has cyclomatic complexity 22 (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.
linesearch.func_search_single_island (cyclomatic 22) genesis/engine/solvers/rigid/constraint/linesearch.py:754— linesearch.func_search_single_island 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.
noslip.func_noslip_update_row (cyclomatic 22) genesis/engine/solvers/rigid/constraint/noslip.py:250— noslip.func_noslip_update_row 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.
RigidSolver._set_dofs_info (cyclomatic 22) genesis/engine/solvers/rigid/rigid_solver.py:2424— RigidSolver._set_dofs_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.
JITRenderer.update_context (cyclomatic 22) genesis/ext/pyrender/jit_render.py:358— JITRenderer.update_context has cyclomatic complexity 22 (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.
Mesh._get_trimesh_props (cyclomatic 22) genesis/ext/pyrender/mesh.py:232— Mesh._get_trimesh_props 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.
OffscreenRenderer.render (cyclomatic 22) genesis/ext/pyrender/offscreen.py:65— OffscreenRenderer.render 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.
utils.format_texture_source (cyclomatic 22) genesis/ext/pyrender/utils.py:47— utils.format_texture_source 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.
MPLLinePlotter._update_plot (cyclomatic 22) genesis/recorders/plotters.py:567— MPLLinePlotter._update_plot 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.
usd_rigid_entity.parse_usd_rigid_entity (cyclomatic 22) genesis/utils/usd/usd_rigid_entity.py:648— usd_rigid_entity.parse_usd_rigid_entity 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.
RasterizerContext.update_rigid (cyclomatic 22) genesis/vis/rasterizer_context.py:621— RasterizerContext.update_rigid 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.
MPMSolver.p2g (cyclomatic 21) genesis/engine/solvers/mpm_solver.py:371— MPMSolver.p2g 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.
forward_kinematics.func_forward_kinematics_link (cyclomatic 21) genesis/engine/solvers/rigid/abd/forward_kinematics.py:378— forward_kinematics.func_forward_kinematics_link 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.
gjk.func_gjk (cyclomatic 21) genesis/engine/solvers/rigid/collider/gjk.py:416— gjk.func_gjk 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.
RigidSolver.set_state (cyclomatic 21) genesis/engine/solvers/rigid/rigid_solver.py:1665— RigidSolver.set_state 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.
ImGuiOverlayPlugin._render_file_browser (cyclomatic 21) genesis/ext/pyrender/overlay/plugin.py:745— ImGuiOverlayPlugin._render_file_browser 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.
surfaces._make_rgba (cyclomatic 21) genesis/options/surfaces.py:255— surfaces._make_rgba 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.
misc.get_gpu_shared_tile_sizes (cyclomatic 21) genesis/utils/misc.py:309— misc.get_gpu_shared_tile_sizes 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.
GenesisGeomRetriever.retrieve_rigid_meshes_static (cyclomatic 21) genesis/vis/batch_renderer.py:66— GenesisGeomRetriever.retrieve_rigid_meshes_static 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.
InteractiveScene._apply_rebuild (cyclomatic 20) genesis/engine/interactive_scene.py:234— InteractiveScene._apply_rebuild 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.
SensorManager._resolve_sensor_cls (cyclomatic 20) genesis/engine/sensors/sensor_manager.py:80— SensorManager._resolve_sensor_cls 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.
forward_dynamics.func_refresh_links_invweight_and_meaninertia (cyclomatic 20) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1426— forward_dynamics.func_refresh_links_invweight_and_meaninertia 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.
backward.kernel_manual_add_collision_constraints_bw (cyclomatic 20) genesis/engine/solvers/rigid/constraint/backward.py:416— backward.kernel_manual_add_collision_constraints_bw 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.
noslip.func_refresh_qacc_batch (cyclomatic 20) genesis/engine/solvers/rigid/constraint/noslip.py:175— noslip.func_refresh_qacc_batch 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.
solver._func_contact_row_direction (cyclomatic 20) genesis/engine/solvers/rigid/constraint/solver.py:692— solver._func_contact_row_direction 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.
solver.func_equality_links (cyclomatic 20) genesis/engine/solvers/rigid/constraint/solver.py:1219— solver.func_equality_links 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.
solver.func_cholesky_solve_batch (cyclomatic 20) genesis/engine/solvers/rigid/constraint/solver.py:4304— solver.func_cholesky_solve_batch has cyclomatic complexity 20 (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.
Scene.add_node (cyclomatic 20) genesis/ext/pyrender/scene.py:381— Scene.add_node 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.
URDF.animate (cyclomatic 20) REDACTED:3400— URDF.animate 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.
LaunchRecorder.insert (cyclomatic 20) genesis/grad/bridge.py:336— LaunchRecorder.insert 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.
Options._validation_error (cyclomatic 20) genesis/options/options.py:42— Options._validation_error 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.
Trajectory.__init__ (cyclomatic 20) genesis/recorders/trajectory.py:1047— Trajectory.__init__ 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.
FrameImageExporter.export_frame_single_camera (cyclomatic 20) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera 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.
particle._advect_foams (cyclomatic 20) genesis/utils/particle.py:674— particle._advect_foams has cyclomatic complexity 20 (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.
serialization._export_value (cyclomatic 20) REDACTED:348— serialization._export_value 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.
usd_stage._find_connected_components (cyclomatic 20) genesis/utils/usd/usd_stage.py:55— usd_stage._find_connected_components 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.
Camera.render (cyclomatic 20) genesis/vis/camera.py:404— Camera.render 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.
SensorManager.build (cyclomatic 19) genesis/engine/sensors/sensor_manager.py:141— SensorManager.build 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.
TemperatureGridSensor.build (cyclomatic 19) genesis/engine/sensors/temperature.py:520— TemperatureGridSensor.build 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.
forward_dynamics.func_init_dofs_invweight (cyclomatic 19) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1364— forward_dynamics.func_init_dofs_invweight 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.
manual_bw.func_forward_velocity_link_bw (cyclomatic 19) genesis/engine/solvers/rigid/abd/manual_bw.py:284— manual_bw.func_forward_velocity_link_bw has cyclomatic complexity 19 (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.
gjk.func_gjk_subdistance (cyclomatic 19) genesis/engine/solvers/rigid/collider/gjk.py:810— gjk.func_gjk_subdistance 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.
solver.func_factor_island_incremental_or_direct (cyclomatic 19) genesis/engine/solvers/rigid/constraint/solver.py:4157— solver.func_factor_island_incremental_or_direct 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.
RigidSolver.__init__ (cyclomatic 19) genesis/engine/solvers/rigid/rigid_solver.py:219— RigidSolver.__init__ 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.
ImGuiOverlayPlugin._render_sim_controls (cyclomatic 19) genesis/ext/pyrender/overlay/plugin.py:465— ImGuiOverlayPlugin._render_sim_controls 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.
Texture._add_to_context (cyclomatic 19) genesis/ext/pyrender/texture.py:167— Texture._add_to_context 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.
TrajectoryFileWriter._compress_frames (cyclomatic 19) genesis/recorders/trajectory.py:812— TrajectoryFileWriter._compress_frames 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.
particle._relax_volume_sampling (cyclomatic 19) genesis/utils/particle.py:159— particle._relax_volume_sampling has cyclomatic complexity 19 (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.
usd_rigid_entity._parse_articulation_structure (cyclomatic 19) genesis/utils/usd/usd_rigid_entity.py:491— usd_rigid_entity._parse_articulation_structure 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.
FEMSelfTetContactHandler.compute_pairs (cyclomatic 18) genesis/engine/couplers/sap_coupler.py:2828— FEMSelfTetContactHandler.compute_pairs 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 shape REPEATS in the file: one other method here (RigidRigidTetContactHandler.compute_pairs) has the same decision points, in the same order, at the same nesting depths — 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.
RigidRigidTetContactHandler.compute_pairs (cyclomatic 18) genesis/engine/couplers/sap_coupler.py:3835— RigidRigidTetContactHandler.compute_pairs 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 shape REPEATS in the file: one other method here (FEMSelfTetContactHandler.compute_pairs) has the same decision points, in the same order, at the same nesting depths — 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.
KinematicEntityDescription._resolve_geoms (cyclomatic 18) REDACTED:1387— KinematicEntityDescription._resolve_geoms has cyclomatic complexity 18 (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.
surface_distance_probe._kernel_surface_distance_probe_bvh (cyclomatic 18) genesis/engine/sensors/surface_distance_probe.py:172— surface_distance_probe._kernel_surface_distance_probe_bvh 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.
Solver._sanitize_io_variables (cyclomatic 18) genesis/engine/solvers/base_solver.py:356— Solver._sanitize_io_variables 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.
FEMSolver.accumulate_vertex_force_preconditioner (cyclomatic 18) genesis/engine/solvers/fem_solver.py:647— FEMSolver.accumulate_vertex_force_preconditioner has cyclomatic complexity 18 (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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cyclomatic 18) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1502— forward_dynamics.kernel_refresh_invweight_and_meaninertia 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.
Collider._init_static_config (cyclomatic 18) genesis/engine/solvers/rigid/collider/collider.py:179— Collider._init_static_config has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
epa.func_epa_init_polytope_2d (cyclomatic 18) genesis/engine/solvers/rigid/collider/epa.py:425— epa.func_epa_init_polytope_2d 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.
linesearch.func_exit_islands_coop (cyclomatic 18) genesis/engine/solvers/rigid/constraint/linesearch.py:1544— linesearch.func_exit_islands_coop 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.
solver.func_island_hessian_patch_block (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3341— solver.func_island_hessian_patch_block 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.
solver.func_apply_staged_rank_updates_island (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3822— solver.func_apply_staged_rank_updates_island 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.
solver.func_cone_rank_update_island (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3997— solver.func_cone_rank_update_island has cyclomatic complexity 18 (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.
solver.func_update_constraint_batch (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:5093— solver.func_update_constraint_batch 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.
RigidSolver.set_qpos (cyclomatic 18) genesis/engine/solvers/rigid/rigid_solver.py:2284— RigidSolver.set_qpos 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.
Viewer.on_close (cyclomatic 18) genesis/ext/pyrender/viewer.py:646— Viewer.on_close 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.
URDF.link_fk (cyclomatic 18) REDACTED:2965— URDF.link_fk 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 shape REPEATS in the file: one other method here (URDF.link_fk_batch) has the same decision points, in the same order, at the same nesting depths — 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.
URDF.link_fk_batch (cyclomatic 18) REDACTED:3051— URDF.link_fk_batch 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 shape REPEATS in the file: one other method here (URDF.link_fk) has the same decision points, in the same order, at the same nesting depths — 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.
ImageTexture._validate_and_load (cyclomatic 18) genesis/options/textures.py:140— ImageTexture._validate_and_load 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.
data.iter_data (cyclomatic 18) REDACTED:902— data.iter_data 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.
RRTConnect._kernel_rrt_connect_step1 (cyclomatic 18) genesis/utils/path_planning.py:725— RRTConnect._kernel_rrt_connect_step1 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.
watertighten._collapse_safe (cyclomatic 18) genesis/utils/watertighten.py:595— watertighten._collapse_safe 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.
Camera.build (cyclomatic 18) genesis/vis/camera.py:148— Camera.build 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.
IPCCoupler._add_articulation_entities_to_ipc (cyclomatic 17) genesis/engine/couplers/ipc_coupler/coupler.py:579— IPCCoupler._add_articulation_entities_to_ipc 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.
FEMFloorTetContactHandler.detection (cyclomatic 17) genesis/engine/couplers/sap_coupler.py:2564— FEMFloorTetContactHandler.detection 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.
RigidFemTriTetContactHandler.compute_pairs (cyclomatic 17) genesis/engine/couplers/sap_coupler.py:3486— RigidFemTriTetContactHandler.compute_pairs 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.
RigidJointDescription.__post_init__ (cyclomatic 17) REDACTED:190— RigidJointDescription.__post_init__ 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.
Sensor.__init_subclass__ (cyclomatic 17) genesis/engine/sensors/base_sensor.py:195— Sensor.__init_subclass__ 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.
contact.func_contact_is_after (cyclomatic 17) genesis/engine/solvers/rigid/collider/contact.py:822— contact.func_contact_is_after 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.
island.func_group_constraints_by_island_coop (cyclomatic 17) genesis/engine/solvers/rigid/constraint/island.py:169— island.func_group_constraints_by_island_coop 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.
solver.func_add_cone_hessian_block_island (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:2514— solver.func_add_cone_hessian_block_island 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.
solver.func_cone_rank_update_whole_env (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:4085— solver.func_cone_rank_update_whole_env 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.
RigidSolver._init_tree_fields (cyclomatic 17) genesis/engine/solvers/rigid/rigid_solver.py:960— RigidSolver._init_tree_fields 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.
_trimesh_patch._parse_vertices (cyclomatic 17) genesis/ext/_trimesh_patch.py:539— _trimesh_patch._parse_vertices 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.
Scene._remove_node (cyclomatic 17) genesis/ext/pyrender/scene.py:552— Scene._remove_node 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.
TrajectoryFileWriter._get_frame (cyclomatic 17) genesis/recorders/trajectory.py:741— TrajectoryFileWriter._get_frame 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.
geom.trans_R_to_T (cyclomatic 17) genesis/utils/geom.py:1230— geom.trans_R_to_T 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.
misc.unique_rows (cyclomatic 17) genesis/utils/misc.py:474— misc.unique_rows 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.
serialization.load (cyclomatic 17) REDACTED:583— serialization.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.
Alarm.fetch_wandb_data (cyclomatic 16) .github/workflows/scripts/alarm.py:281— Alarm.fetch_wandb_data 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.
RigidFloorTetContactHandler.detection (cyclomatic 16) genesis/engine/couplers/sap_coupler.py:3265— RigidFloorTetContactHandler.detection 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.
Emitter.emit (cyclomatic 16) genesis/engine/entities/emitter.py:56— Emitter.emit 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.
RigidJoint.dofs_length (cyclomatic 16) genesis/engine/entities/rigid_entity/rigid_joint.py:306— RigidJoint.dofs_length 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.
RaycastContext.activate (cyclomatic 16) genesis/engine/sensors/raycaster.py:236— RaycastContext.activate 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.
forward_dynamics.func_init_link_invweight (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1292— forward_dynamics.func_init_link_invweight has cyclomatic complexity 16 (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.
forward_dynamics.func_implicit_damping (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2369— forward_dynamics.func_implicit_damping 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.
forward_kinematics.func_forward_velocity_link (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_kinematics.py:624— forward_kinematics.func_forward_velocity_link 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.
inverse_kinematics.func_get_jacobian (cyclomatic 16) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:194— inverse_kinematics.func_get_jacobian has cyclomatic complexity 16 (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.
broadphase._func_broad_phase_links_sap (cyclomatic 16) genesis/engine/solvers/rigid/collider/broadphase.py:156— broadphase._func_broad_phase_links_sap 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.
Collider.__init__ (cyclomatic 16) genesis/engine/solvers/rigid/collider/collider.py:82— Collider.__init__ 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.
contact.func_collider_clear_env (cyclomatic 16) genesis/engine/solvers/rigid/collider/contact.py:237— contact.func_collider_clear_env 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.
mpr.mpr_find_pos (cyclomatic 16) genesis/engine/solvers/rigid/collider/mpr.py:260— mpr.mpr_find_pos has cyclomatic complexity 16 (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.
narrowphase.func_contact_convex_convex_sdf (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:1364— narrowphase.func_contact_convex_convex_sdf 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.
narrowphase._func_multicontact_run_detection (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:3301— narrowphase._func_multicontact_run_detection 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.
narrowphase.func_narrow_phase_any_vs_terrain (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:4806— narrowphase.func_narrow_phase_any_vs_terrain 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.
ConstraintSolver.__init__ (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:119— ConstraintSolver.__init__ 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.
solver.func_add_relative_motion_rows (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:1811— solver.func_add_relative_motion_rows has cyclomatic complexity 16 (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.
solver.func_cholesky_factor_direct_batch (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:3618— solver.func_cholesky_factor_direct_batch 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.
jit_render.bind_lighting (cyclomatic 16) genesis/ext/pyrender/jit_render.py:142— jit_render.bind_lighting 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.
LaunchRecorder.reverse (cyclomatic 16) genesis/grad/bridge.py:426— LaunchRecorder.reverse 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.
PathPlanner._func_check_collision (cyclomatic 16) genesis/utils/path_planning.py:232— PathPlanner._func_check_collision 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.
MouseInteractionPlugin.on_draw (cyclomatic 16) genesis/vis/viewer_plugins/plugins/mouse_interaction.py:220— MouseInteractionPlugin.on_draw 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.
XxxComment genesis/logging/time_elapser.py:26— # XXX: Kept for more debug options. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
HackComment REDACTED:62— # HACK hardcoded — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 570) genesis/engine/solvers/rigid/collider/narrowphase.py:77— narrowphase.func_add_polytope_vertex_contacts_sdf has cognitive complexity 570 (threshold 15). Drivers by points: if/else 100 (451 pts), loops 23 (93 pts), boolean chains 17, ternaries 2 (9 pts) (nesting depth added 428). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_contact_overlap_axes (cognitive 557) genesis/engine/solvers/rigid/collider/narrowphase.py:2198— narrowphase.func_contact_overlap_axes has cognitive complexity 557 (threshold 15). Drivers by points: if/else 63 (276 pts), loops 44 (220 pts), ternaries 12 (44 pts), boolean chains 17 (nesting depth added 421). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
contact.func_clamp_prune_contacts_coop (cognitive 403) genesis/engine/solvers/rigid/collider/contact.py:1563— contact.func_clamp_prune_contacts_coop has cognitive complexity 403 (threshold 15). Drivers by points: if/else 48 (250 pts), loops 25 (131 pts), ternaries 2 (15 pts), boolean chains 7 (nesting depth added 321). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
box_contact.func_box_box_contact (cognitive 388) genesis/engine/solvers/rigid/collider/box_contact.py:188— box_contact.func_box_box_contact has cognitive complexity 388 (threshold 15). Drivers by points: if/else 56 (218 pts), loops 25 (92 pts), ternaries 18 (68 pts), boolean chains 10 (nesting depth added 279). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
linesearch.func_linesearch_islands_coop (cognitive 266) genesis/engine/solvers/rigid/constraint/linesearch.py:1175— linesearch.func_linesearch_islands_coop has cognitive complexity 266 (threshold 15). Drivers by points: if/else 39 (151 pts), loops 30 (113 pts), boolean chains 2 (nesting depth added 195). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_add_polytope_vertex_contacts_sdf_shell (cognitive 264) genesis/engine/solvers/rigid/collider/narrowphase.py:828— narrowphase.func_add_polytope_vertex_contacts_sdf_shell has cognitive complexity 264 (threshold 15). Drivers by points: if/else 40 (172 pts), loops 10 (50 pts), ternaries 5 (33 pts), boolean chains 9 (nesting depth added 200). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
backward.kernel_manual_add_equality_constraints_bw (cognitive 253) genesis/engine/solvers/rigid/constraint/backward.py:753— backward.kernel_manual_add_equality_constraints_bw has cognitive complexity 253 (threshold 15). Drivers by points: loops 24 (115 pts), if/else 20 (84 pts), ternaries 11 (54 pts) (nesting depth added 198). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
narrowphase.func_convex_convex_contact (cognitive 226) genesis/engine/solvers/rigid/collider/narrowphase.py:2795— narrowphase.func_convex_convex_contact has cognitive complexity 226 (threshold 15). Drivers by points: if/else 39 (184 pts), loops 5 (30 pts), boolean chains 12 (nesting depth added 170). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_narrowphase_multicontact (cognitive 215) genesis/engine/solvers/rigid/collider/narrowphase.py:3991— narrowphase.func_narrowphase_multicontact has cognitive complexity 215 (threshold 15). Drivers by points: if/else 29 (137 pts), loops 10 (59 pts), ternaries 2 (11 pts), boolean chains 8 (nesting depth added 166). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_island_assemble_factor_solve_tiled (cognitive 213) genesis/engine/solvers/rigid/constraint/solver.py:2834— solver.func_island_assemble_factor_solve_tiled has cognitive complexity 213 (threshold 15). Drivers by points: if/else 31 (106 pts), loops 32 (105 pts), boolean chains 2 (nesting depth added 148). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inverse_kinematics.func_inverse_kinematics (cognitive 212) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:364— inverse_kinematics.func_inverse_kinematics has cognitive complexity 212 (threshold 15). Drivers by points: loops 28 (119 pts), if/else 16 (68 pts), ternaries 3 (20 pts), boolean chains 5 (nesting depth added 160). 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.
Data.__init__ (cognitive 201) REDACTED:414— Data.__init__ has cognitive complexity 201 (threshold 15). Drivers by points: if/else 43 (109 pts), loops 24 (45 pts), ternaries 11 (32 pts), boolean chains 15 (nesting depth added 108). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usd_geometry.parse_prim_geoms (cognitive 200) genesis/utils/usd/usd_geometry.py:38— usd_geometry.parse_prim_geoms has cognitive complexity 200 (threshold 15). Drivers by points: if/else 48 (139 pts), loops 11 (38 pts), boolean chains 19, ternaries 1 (4 pts) (nesting depth added 121). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
KinematicEntityDescription._parse_scene (cognitive 198) REDACTED:892— KinematicEntityDescription._parse_scene has cognitive complexity 198 (threshold 15). Drivers by points: if/else 46 (109 pts), loops 24 (59 pts), boolean chains 23, ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 102). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
contact.func_clamp_prune_contacts (cognitive 197) genesis/engine/solvers/rigid/collider/contact.py:1320— contact.func_clamp_prune_contacts has cognitive complexity 197 (threshold 15). Drivers by points: if/else 19 (115 pts), loops 15 (80 pts), boolean chains 2 (nesting depth added 161). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
forward_dynamics.func_factor_mass_tree_shared (cognitive 193) genesis/engine/solvers/rigid/abd/forward_dynamics.py:874— forward_dynamics.func_factor_mass_tree_shared has cognitive complexity 193 (threshold 15). Drivers by points: if/else 25 (117 pts), loops 14 (68 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 152). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_contact_mpr_terrain (cognitive 186) genesis/engine/solvers/rigid/collider/narrowphase.py:1503— narrowphase.func_contact_mpr_terrain has cognitive complexity 186 (threshold 15). Drivers by points: if/else 26 (137 pts), loops 9 (35 pts), ternaries 2 (9 pts), boolean chains 5 (nesting depth added 144). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_recompute_perturbed_contact (cognitive 185) genesis/engine/solvers/rigid/collider/narrowphase.py:1810— narrowphase.func_recompute_perturbed_contact has cognitive complexity 185 (threshold 15). Drivers by points: if/else 39 (126 pts), ternaries 6 (32 pts), loops 5 (14 pts), boolean chains 13 (nesting depth added 122). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver._add_collision_constraints_per_contact (cognitive 176) genesis/engine/solvers/rigid/constraint/solver.py:971— solver._add_collision_constraints_per_contact has cognitive complexity 176 (threshold 15). Drivers by points: if/else 23 (113 pts), loops 10 (37 pts), ternaries 6 (22 pts), boolean chains 4 (nesting depth added 133). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
usd_rigid_entity._parse_link (cognitive 167) genesis/utils/usd/usd_rigid_entity.py:166— usd_rigid_entity._parse_link has cognitive complexity 167 (threshold 15). Drivers by points: if/else 40 (108 pts), ternaries 8 (38 pts), loops 5 (14 pts), boolean chains 7 (nesting depth added 107). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
multi_contact.func_multi_contact (cognitive 166) genesis/engine/solvers/rigid/collider/multi_contact.py:19— multi_contact.func_multi_contact has cognitive complexity 166 (threshold 15). Drivers by points: ternaries 28 (88 pts), if/else 29 (63 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 99). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_island_hessian_assemble_block (cognitive 160) genesis/engine/solvers/rigid/constraint/solver.py:3161— solver.func_island_hessian_assemble_block has cognitive complexity 160 (threshold 15). Drivers by points: if/else 27 (111 pts), loops 12 (49 pts) (nesting depth added 121). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Collider.get_contacts (cognitive 151) genesis/engine/solvers/rigid/collider/collider.py:914— Collider.get_contacts has cognitive complexity 151 (threshold 15). Drivers by points: if/else 43 (91 pts), ternaries 11 (45 pts), boolean chains 13, loops 1 (2 pts) (nesting depth added 83). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_hessian_direct_batch (cognitive 145) genesis/engine/solvers/rigid/constraint/solver.py:2650— solver.func_hessian_direct_batch has cognitive complexity 145 (threshold 15). Drivers by points: if/else 24 (82 pts), loops 19 (59 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 99). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh (cognitive 136) genesis/engine/sensors/point_cloud_tactile.py:352— point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh has cognitive complexity 136 (threshold 15). Drivers by points: if/else 16 (68 pts), loops 20 (65 pts), boolean chains 3 (nesting depth added 97). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
island.func_build_islands_coop (cognitive 136) genesis/engine/solvers/rigid/constraint/island.py:472— island.func_build_islands_coop has cognitive complexity 136 (threshold 15). Drivers by points: if/else 36 (98 pts), loops 17 (33 pts), boolean chains 5 (nesting depth added 78). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
ImGuiOverlayPlugin._render_entity_browser (cognitive 136) genesis/ext/pyrender/overlay/plugin.py:1018— ImGuiOverlayPlugin._render_entity_browser has cognitive complexity 136 (threshold 15). Drivers by points: if/else 29 (97 pts), loops 7 (24 pts), ternaries 3 (9 pts), boolean chains 6 (nesting depth added 91). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
mesh._postprocess_collision_geoms_impl (cognitive 130) genesis/utils/mesh.py:494— mesh._postprocess_collision_geoms_impl has cognitive complexity 130 (threshold 15). Drivers by points: if/else 36 (88 pts), loops 10 (22 pts), boolean chains 20 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
urdf.parse_urdf (cognitive 130) REDACTED:135— urdf.parse_urdf has cognitive complexity 130 (threshold 15). Drivers by points: if/else 33 (82 pts), ternaries 7 (24 pts), loops 9 (16 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
narrowphase._func_multicontact_detect (cognitive 126) genesis/engine/solvers/rigid/collider/narrowphase.py:3426— narrowphase._func_multicontact_detect has cognitive complexity 126 (threshold 15). Drivers by points: if/else 30 (93 pts), loops 5 (20 pts), boolean chains 10, ternaries 1 (3 pts) (nesting depth added 80). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
bvh.func_build_bvh (cognitive 118) genesis/engine/bvh.py:262— bvh.func_build_bvh has cognitive complexity 118 (threshold 15). Drivers by points: loops 27 (62 pts), if/else 18 (47 pts), ternaries 4 (9 pts) (nesting depth added 69). 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.
forward_dynamics.func_factor_mass_tree_tiled (cognitive 112) genesis/engine/solvers/rigid/abd/forward_dynamics.py:516— forward_dynamics.func_factor_mass_tree_tiled has cognitive complexity 112 (threshold 15). Drivers by points: loops 11 (53 pts), if/else 12 (51 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 87). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Collider._compute_collision_pair_idx (cognitive 112) genesis/engine/solvers/rigid/collider/collider.py:430— Collider._compute_collision_pair_idx has cognitive complexity 112 (threshold 15). Drivers by points: if/else 30 (71 pts), loops 10 (26 pts), ternaries 3 (10 pts), boolean chains 5 (nesting depth added 64). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
mpr.func_mpr_contact_from_centers (cognitive 109) genesis/engine/solvers/rigid/collider/mpr.py:436— mpr.func_mpr_contact_from_centers has cognitive complexity 109 (threshold 15). Drivers by points: if/else 37 (93 pts), ternaries 2 (10 pts), boolean chains 5, loops 1 (nesting depth added 64). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
IPCCoupler._add_rigid_geoms_to_ipc (cognitive 105) genesis/engine/couplers/ipc_coupler/coupler.py:399— IPCCoupler._add_rigid_geoms_to_ipc has cognitive complexity 105 (threshold 15). Drivers by points: if/else 21 (73 pts), loops 5 (11 pts), ternaries 2 (8 pts), boolean chains 7, error handling 1 (6 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
point_cloud_tactile._kernel_elastomer_surface_state_via_global_bvh (cognitive 100) genesis/engine/sensors/point_cloud_tactile.py:1502— point_cloud_tactile._kernel_elastomer_surface_state_via_global_bvh has cognitive complexity 100 (threshold 15). Drivers by points: if/else 13 (52 pts), loops 11 (33 pts), ternaries 3 (15 pts) (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_factor_mass_tree_global (cognitive 99) genesis/engine/solvers/rigid/abd/forward_dynamics.py:723— forward_dynamics.func_factor_mass_tree_global has cognitive complexity 99 (threshold 15). Drivers by points: if/else 13 (58 pts), loops 7 (33 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 77). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
gltf.parse_mesh_glb (cognitive 99) REDACTED:343— gltf.parse_mesh_glb has cognitive complexity 99 (threshold 15). Drivers by points: if/else 19 (58 pts), ternaries 6 (21 pts), loops 7 (17 pts), boolean chains 3 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mjcf.build_model (cognitive 98) REDACTED:65— mjcf.build_model has cognitive complexity 98 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 11 (33 pts), ternaries 5 (16 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LegacyCoupler.mpm_grid_op (cognitive 97) genesis/engine/couplers/legacy_coupler.py:322— LegacyCoupler.mpm_grid_op has cognitive complexity 97 (threshold 15). Drivers by points: if/else 11 (53 pts), loops 10 (44 pts) (nesting depth added 76). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RigidSolver._build_static_config (cognitive 96) genesis/engine/solvers/rigid/rigid_solver.py:489— RigidSolver._build_static_config has cognitive complexity 96 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 26, ternaries 6 (15 pts), loops 6 (12 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KinematicEntityDescription._load_heterogeneous_morphs (cognitive 94) REDACTED:480— KinematicEntityDescription._load_heterogeneous_morphs has cognitive complexity 94 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 7 (21 pts), ternaries 7 (21 pts), boolean chains 1 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contact.func_contact_support_hull (cognitive 94) genesis/engine/solvers/rigid/collider/contact.py:1117— contact.func_contact_support_hull has cognitive complexity 94 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 14 (36 pts), boolean chains 14, ternaries 3 (7 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_torque_and_passive_force (cognitive 91) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1587— forward_dynamics.func_torque_and_passive_force has cognitive complexity 91 (threshold 15). Drivers by points: if/else 13 (40 pts), ternaries 8 (30 pts), loops 6 (15 pts), boolean chains 6 (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_narrowphase_contact0 (cognitive 91) genesis/engine/solvers/rigid/collider/narrowphase.py:4218— narrowphase.func_narrowphase_contact0 has cognitive complexity 91 (threshold 15). Drivers by points: if/else 19 (75 pts), loops 4 (9 pts), boolean chains 7 (nesting depth added 61). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RigidSolver._jacobi_mass_spread_bound (cognitive 91) genesis/engine/solvers/rigid/rigid_solver.py:800— RigidSolver._jacobi_mass_spread_bound has cognitive complexity 91 (threshold 15). Drivers by points: if/else 15 (48 pts), loops 10 (30 pts), boolean chains 7, ternaries 1 (6 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Solver.save_checkpoint (cognitive 90) genesis/engine/solvers/base_solver.py:557— Solver.save_checkpoint has cognitive complexity 90 (threshold 15). Drivers by points: if/else 23 (66 pts), error handling 2 (12 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
narrowphase.func_narrow_phase_nonconvex_vs_nonterrain (cognitive 90) genesis/engine/solvers/rigid/collider/narrowphase.py:4895— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain has cognitive complexity 90 (threshold 15). Drivers by points: if/else 10 (51 pts), loops 5 (21 pts), ternaries 4 (12 pts), boolean chains 6 (nesting depth added 65). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
point_cloud_tactile._kernel_elastomer_surface_state_bvh (cognitive 89) genesis/engine/sensors/point_cloud_tactile.py:1344— point_cloud_tactile._kernel_elastomer_surface_state_bvh has cognitive complexity 89 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 11 (33 pts), ternaries 3 (15 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_integrate (cognitive 89) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2147— forward_dynamics.func_integrate has cognitive complexity 89 (threshold 15). Drivers by points: if/else 15 (47 pts), loops 7 (29 pts), ternaries 3 (12 pts), boolean chains 1 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
misc.indices_to_mask (cognitive 89) genesis/utils/misc.py:720— misc.indices_to_mask has cognitive complexity 89 (threshold 15). Drivers by points: if/else 18 (56 pts), ternaries 4 (21 pts), boolean chains 5, error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
mjcf.parse_link (cognitive 89) REDACTED:287— mjcf.parse_link has cognitive complexity 89 (threshold 15). Drivers by points: if/else 30 (62 pts), ternaries 8 (17 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (2 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.
LegacyCoupler.fem_surface_force (cognitive 85) genesis/engine/couplers/legacy_coupler.py:493— LegacyCoupler.fem_surface_force has cognitive complexity 85 (threshold 15). Drivers by points: if/else 10 (43 pts), loops 11 (40 pts), boolean chains 2 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff_gjk.func_gjk_contact (cognitive 84) genesis/engine/solvers/rigid/collider/diff_gjk.py:18— diff_gjk.func_gjk_contact has cognitive complexity 84 (threshold 15). Drivers by points: if/else 26 (74 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
multi_contact.func_clip_polygon (cognitive 83) genesis/engine/solvers/rigid/collider/multi_contact.py:874— multi_contact.func_clip_polygon has cognitive complexity 83 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 9 (30 pts), ternaries 4 (6 pts), boolean chains 5 (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
usd_collision.apply_collision_filtering (cognitive 83) genesis/utils/usd/usd_collision.py:15— usd_collision.apply_collision_filtering has cognitive complexity 83 (threshold 15). Drivers by points: if/else 19 (45 pts), loops 14 (32 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_solve_init (cognitive 82) genesis/engine/solvers/rigid/constraint/solver.py:5560— solver.func_solve_init has cognitive complexity 82 (threshold 15). Drivers by points: if/else 27 (55 pts), loops 9 (19 pts), boolean chains 5, ternaries 2 (3 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.
epa.func_safe_epa (cognitive 81) genesis/engine/solvers/rigid/collider/epa.py:951— epa.func_safe_epa has cognitive complexity 81 (threshold 15). Drivers by points: if/else 26 (62 pts), loops 5 (9 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
KinematicEntity.attach (cognitive 80) genesis/engine/entities/rigid_entity/rigid_entity.py:201— KinematicEntity.attach has cognitive complexity 80 (threshold 15). Drivers by points: if/else 26 (52 pts), loops 6 (10 pts), ternaries 3 (10 pts), boolean chains 8 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
kernel_writes.get_written_paths (cognitive 80) genesis/grad/kernel_writes.py:36— kernel_writes.get_written_paths has cognitive complexity 80 (threshold 15). Drivers by points: if/else 17 (46 pts), loops 10 (26 pts), boolean chains 6, ternaries 2 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gjk.func_gjk_contact (cognitive 79) genesis/engine/solvers/rigid/collider/gjk.py:141— gjk.func_gjk_contact has cognitive complexity 79 (threshold 15). Drivers by points: if/else 19 (65 pts), boolean chains 5, ternaries 4 (5 pts), loops 2 (4 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
MPMSolver.p2g (cognitive 78) genesis/engine/solvers/mpm_solver.py:371— MPMSolver.p2g has cognitive complexity 78 (threshold 15). Drivers by points: if/else 13 (57 pts), loops 6 (19 pts), boolean chains 2 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_cone_rank_update_whole_env (cognitive 78) genesis/engine/solvers/rigid/constraint/solver.py:4085— solver.func_cone_rank_update_whole_env has cognitive complexity 78 (threshold 15). Drivers by points: loops 9 (48 pts), if/else 6 (29 pts), boolean chains 1 (nesting depth added 62). 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.
KinematicEntityDescription._align_free_roots (cognitive 77) REDACTED:1199— KinematicEntityDescription._align_free_roots has cognitive complexity 77 (threshold 15). Drivers by points: if/else 15 (46 pts), loops 9 (26 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
island.func_reorder_island_dofs (cognitive 77) genesis/engine/solvers/rigid/constraint/island.py:749— island.func_reorder_island_dofs has cognitive complexity 77 (threshold 15). Drivers by points: loops 16 (39 pts), if/else 9 (30 pts), boolean chains 8 (nesting depth added 44). 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.
island.func_build_islands (cognitive 74) genesis/engine/solvers/rigid/constraint/island.py:260— island.func_build_islands has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (47 pts), loops 14 (23 pts), boolean chains 4 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Raytracer.build (cognitive 74) genesis/vis/raytracer.py:213— Raytracer.build has cognitive complexity 74 (threshold 15). Drivers by points: loops 14 (34 pts), if/else 18 (32 pts), ternaries 2 (8 pts) (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.
genesis.init (cognitive 72) genesis/__init__.py:59— genesis.init has cognitive complexity 72 (threshold 15). Drivers by points: if/else 32 (41 pts), boolean chains 19, loops 5, ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
backward.kernel_manual_add_collision_constraints_bw (cognitive 72) genesis/engine/solvers/rigid/constraint/backward.py:416— backward.kernel_manual_add_collision_constraints_bw has cognitive complexity 72 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 7 (26 pts), ternaries 5 (20 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver._add_friction_constraint (cognitive 72) genesis/engine/solvers/rigid/constraint/solver.py:753— solver._add_friction_constraint has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (54 pts), ternaries 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
gjk.func_safe_gjk (cognitive 70) genesis/engine/solvers/rigid/collider/gjk.py:1134— gjk.func_safe_gjk has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (54 pts), loops 3 (7 pts), ternaries 2 (7 pts), boolean chains 2 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RasterizerContext.update_rigid (cognitive 70) genesis/vis/rasterizer_context.py:621— RasterizerContext.update_rigid has cognitive complexity 70 (threshold 15). Drivers by points: if/else 10 (41 pts), loops 9 (28 pts), boolean chains 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_add_cone_hessian_block_island (cognitive 69) genesis/engine/solvers/rigid/constraint/solver.py:2514— solver.func_add_cone_hessian_block_island has cognitive complexity 69 (threshold 15). Drivers by points: loops 8 (36 pts), if/else 7 (32 pts), boolean chains 1 (nesting depth added 53). 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.
mjcf.parse_geoms (cognitive 68) REDACTED:745— mjcf.parse_geoms has cognitive complexity 68 (threshold 15). Drivers by points: loops 12 (35 pts), if/else 11 (30 pts), boolean chains 3 (nesting depth added 42). 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.
forward_dynamics.func_midpoint_free_body (cognitive 67) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1892— forward_dynamics.func_midpoint_free_body has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (43 pts), loops 8 (13 pts), ternaries 5 (8 pts), boolean chains 3 (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.
forward_kinematics.func_sweep_links_by_level (cognitive 67) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1007— forward_kinematics.func_sweep_links_by_level has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (53 pts), loops 4 (14 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RigidSolver.set_base_links_quat (cognitive 67) genesis/engine/solvers/rigid/rigid_solver.py:1965— RigidSolver.set_base_links_quat has cognitive complexity 67 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 14, ternaries 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.set_pose (cognitive 67) genesis/vis/camera.py:592— Camera.set_pose has cognitive complexity 67 (threshold 15). Drivers by points: if/else 30 (46 pts), boolean chains 10, ternaries 4 (9 pts), loops 1 (2 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.
linesearch.func_search_single_island (cognitive 66) genesis/engine/solvers/rigid/constraint/linesearch.py:754— linesearch.func_search_single_island has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (44 pts), loops 7 (22 pts) (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
gltf.parse_glb_material (cognitive 66) REDACTED:136— gltf.parse_glb_material has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (63 pts), boolean chains 2, loops 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
ImGuiOverlayPlugin._render_scene_editor (cognitive 65) genesis/ext/pyrender/overlay/plugin.py:826— ImGuiOverlayPlugin._render_scene_editor has cognitive complexity 65 (threshold 15). Drivers by points: if/else 20 (46 pts), boolean chains 10, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_cone_rank_update_island (cognitive 64) genesis/engine/solvers/rigid/constraint/solver.py:3997— solver.func_cone_rank_update_island has cognitive complexity 64 (threshold 15). Drivers by points: loops 8 (34 pts), if/else 7 (28 pts), boolean chains 2 (nesting depth added 47). 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.
RigidSolver.set_base_links_pos (cognitive 62) genesis/engine/solvers/rigid/rigid_solver.py:1829— RigidSolver.set_base_links_pos has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 12, ternaries 2 (4 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.
Viewer.start (cognitive 62) genesis/ext/pyrender/viewer.py:1161— Viewer.start has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (34 pts), error handling 9 (21 pts), boolean chains 4, loops 2 (3 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.
_trimesh_patch.load_obj (cognitive 61) genesis/ext/_trimesh_patch.py:38— _trimesh_patch.load_obj has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (42 pts), error handling 5 (13 pts), boolean chains 5, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_init_dofs_invweight (cognitive 60) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1364— forward_dynamics.func_init_dofs_invweight has cognitive complexity 60 (threshold 15). Drivers by points: loops 6 (24 pts), if/else 5 (20 pts), ternaries 4 (14 pts), boolean chains 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
multi_contact.func_potential_box_normals (cognitive 60) genesis/engine/solvers/rigid/collider/multi_contact.py:283— multi_contact.func_potential_box_normals has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (32 pts), ternaries 4 (14 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver._sort_contacts_and_build_islands (cognitive 60) genesis/engine/solvers/rigid/constraint/solver.py:1559— solver._sort_contacts_and_build_islands has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 5 (14 pts), boolean chains 4 (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.
serialization._load_value (cognitive 60) REDACTED:443— serialization._load_value has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 11, ternaries 4 (8 pts), error handling 1 (4 pts), loops 1 (3 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.
watertighten._quadric_decimate_loop (cognitive 60) genesis/utils/watertighten.py:751— watertighten._quadric_decimate_loop has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (50 pts), boolean chains 5, loops 3 (5 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.
RRTConnect._kernel_rrt_connect_step1 (cognitive 59) genesis/utils/path_planning.py:725— RRTConnect._kernel_rrt_connect_step1 has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 5 (15 pts), ternaries 2 (9 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
surface_distance_probe._kernel_surface_distance_probe_bvh (cognitive 58) genesis/engine/sensors/surface_distance_probe.py:172— surface_distance_probe._kernel_surface_distance_probe_bvh has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 6 (16 pts), boolean chains 3 (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.
solver.func_add_dynamic_constraint_rows_batch (cognitive 57) genesis/engine/solvers/rigid/constraint/solver.py:1882— solver.func_add_dynamic_constraint_rows_batch has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (35 pts), ternaries 4 (12 pts), boolean chains 5, loops 3 (5 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.
linesearch.func_exit_islands_coop (cognitive 56) genesis/engine/solvers/rigid/constraint/linesearch.py:1544— linesearch.func_exit_islands_coop has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 6 (15 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Mesh.from_trimesh (cognitive 55) REDACTED:438— Mesh.from_trimesh has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (47 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
linesearch.func_row_alpha_terms (cognitive 55) genesis/engine/solvers/rigid/constraint/linesearch.py:107— linesearch.func_row_alpha_terms has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 4 (12 pts), boolean chains 5 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Raytracer.update_scene (cognitive 55) genesis/vis/raytracer.py:659— Raytracer.update_scene has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 8 (17 pts), ternaries 4 (15 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff_gjk.func_extended_epa (cognitive 53) genesis/engine/solvers/rigid/collider/diff_gjk.py:354— diff_gjk.func_extended_epa has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (40 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linesearch.func_ls_state_advance (cognitive 53) genesis/engine/solvers/rigid/constraint/linesearch.py:379— linesearch.func_ls_state_advance has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 6, loops 2 (3 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.
noslip.func_noslip_update_row (cognitive 53) genesis/engine/solvers/rigid/constraint/noslip.py:250— noslip.func_noslip_update_row has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 5 (18 pts), boolean chains 4 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver._func_contact_row_direction (cognitive 53) genesis/engine/solvers/rigid/constraint/solver.py:692— solver._func_contact_row_direction has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), ternaries 3 (12 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
_trimesh_patch.export_obj (cognitive 53) genesis/ext/_trimesh_patch.py:756— _trimesh_patch.export_obj has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (38 pts), error handling 2 (6 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Renderer.render (cognitive 53) genesis/ext/pyrender/renderer.py:118— Renderer.render has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 8, loops 3 (8 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RRTConnect._kernel_rrt_connect_step2 (cognitive 53) genesis/utils/path_planning.py:830— RRTConnect._kernel_rrt_connect_step2 has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (43 pts), loops 3 (10 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Entity._get_global_idx (cognitive 52) genesis/engine/entities/base_entity.py:169— Entity._get_global_idx has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 6, ternaries 2 (5 pts), error handling 1 (2 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.
epa.func_epa (cognitive 52) genesis/engine/solvers/rigid/collider/epa.py:28— epa.func_epa has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 4 (8 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_apply_staged_rank_updates_island (cognitive 52) genesis/engine/solvers/rigid/constraint/solver.py:3822— solver.func_apply_staged_rank_updates_island has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 5 (13 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.
RigidSolver._set_links_info (cognitive 52) genesis/engine/solvers/rigid/rigid_solver.py:2108— RigidSolver._set_links_info has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, loops 3 (7 pts), ternaries 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
broadphase.func_broad_phase_geoms (cognitive 50) genesis/engine/solvers/rigid/collider/broadphase.py:275— broadphase.func_broad_phase_geoms has cognitive complexity 50 (threshold 15). Drivers by points: if/else 7 (36 pts), loops 3 (8 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
linesearch.func_linesearch_islands_serial (cognitive 49) genesis/engine/solvers/rigid/constraint/linesearch.py:953— linesearch.func_linesearch_islands_serial has cognitive complexity 49 (threshold 15). Drivers by points: loops 7 (29 pts), if/else 9 (20 pts) (nesting depth added 33). 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.
solver.func_island_hessian_patch_block (cognitive 49) genesis/engine/solvers/rigid/constraint/solver.py:3341— solver.func_island_hessian_patch_block has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (16 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.
RigidEntityDescription._describe_link (cognitive 48) REDACTED:1674— RigidEntityDescription._describe_link has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 9, ternaries 5 (7 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
KinematicSolver.set_dofs_velocity (cognitive 48) genesis/engine/solvers/kinematic_solver.py:1060— KinematicSolver.set_dofs_velocity has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 10, ternaries 1 (3 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.
forward_dynamics.func_mass_mat_assemble_tree_cooperative (cognitive 48) genesis/engine/solvers/rigid/abd/forward_dynamics.py:267— forward_dynamics.func_mass_mat_assemble_tree_cooperative has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 5 (20 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.
narrowphase._func_multicontact_run_detection (cognitive 48) genesis/engine/solvers/rigid/collider/narrowphase.py:3301— narrowphase._func_multicontact_run_detection has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (42 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_factor_island_incremental_or_direct (cognitive 48) genesis/engine/solvers/rigid/constraint/solver.py:4157— solver.func_factor_island_incremental_or_direct has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
misc.assign_indexed_tensor (cognitive 48) genesis/utils/misc.py:1478— misc.assign_indexed_tensor has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 2 (5 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
mjcf.parse_geom (cognitive 48) REDACTED:513— mjcf.parse_geom has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 6, ternaries 3 (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.
SensorManager._resolve_sensor_cls (cognitive 47) genesis/engine/sensors/sensor_manager.py:80— SensorManager._resolve_sensor_cls has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 2 (12 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_cholesky_solve_batch (cognitive 47) genesis/engine/solvers/rigid/constraint/solver.py:4304— solver.func_cholesky_solve_batch has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 10 (21 pts) (nesting depth added 27). 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.
RigidSolver.build (cognitive 47) genesis/engine/solvers/rigid/rigid_solver.py:297— RigidSolver.build has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (32 pts), ternaries 3 (7 pts), boolean chains 4, loops 3 (4 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.
JITRenderer.set_primitive (cognitive 47) genesis/ext/pyrender/jit_render.py:517— JITRenderer.set_primitive has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 7, ternaries 2 (4 pts), 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.
IPCCoupler._add_fem_entities_to_ipc (cognitive 46) genesis/engine/couplers/ipc_coupler/coupler.py:324— IPCCoupler._add_fem_entities_to_ipc has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 2 (3 pts), ternaries 1 (3 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.
narrowphase.func_narrow_phase_any_vs_terrain (cognitive 46) genesis/engine/solvers/rigid/collider/narrowphase.py:4806— narrowphase.func_narrow_phase_any_vs_terrain has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 4 (9 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_add_cone_hessian_block (cognitive 46) genesis/engine/solvers/rigid/constraint/solver.py:2345— solver.func_add_cone_hessian_block has cognitive complexity 46 (threshold 15). Drivers by points: loops 8 (29 pts), if/else 5 (17 pts) (nesting depth added 33). 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.
forward_dynamics.func_refresh_links_invweight_and_meaninertia (cognitive 45) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1426— forward_dynamics.func_refresh_links_invweight_and_meaninertia has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 6 (14 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
misc.broadcast_tensor (cognitive 45) genesis/utils/misc.py:1346— misc.broadcast_tensor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 3 (7 pts), boolean chains 5, error handling 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.
RaycastContext.activate (cognitive 44) genesis/engine/sensors/raycaster.py:236— RaycastContext.activate has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 3 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
broadphase._func_broad_phase_links_sap (cognitive 44) genesis/engine/solvers/rigid/collider/broadphase.py:156— broadphase._func_broad_phase_links_sap has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 8 (21 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.
solver.add_limit_constraints (cognitive 44) genesis/engine/solvers/rigid/constraint/solver.py:2013— solver.add_limit_constraints has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 5 (16 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RigidSolver.set_state (cognitive 44) genesis/engine/solvers/rigid/rigid_solver.py:1665— RigidSolver.set_state has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usd_material.parse_preview_surface (cognitive 44) genesis/utils/usd/usd_material.py:57— usd_material.parse_preview_surface has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 7 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
watertighten._gaussian_axis (cognitive 44) genesis/utils/watertighten.py:94— watertighten._gaussian_axis has cognitive complexity 44 (threshold 15). Drivers by points: loops 12 (42 pts), if/else 2 (nesting depth added 30). 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.
GenesisGeomRetriever.retrieve_rigid_meshes_static (cognitive 44) genesis/vis/batch_renderer.py:66— GenesisGeomRetriever.retrieve_rigid_meshes_static has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 6 (9 pts), ternaries 4 (8 pts), boolean chains 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.
forward_dynamics.func_init_link_invweight (cognitive 43) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1292— forward_dynamics.func_init_link_invweight has cognitive complexity 43 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 5 (12 pts), ternaries 3 (8 pts), boolean chains 1 (nesting depth added 27). 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.
ImGuiOverlayPlugin._render_file_browser (cognitive 43) genesis/ext/pyrender/overlay/plugin.py:745— ImGuiOverlayPlugin._render_file_browser has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Primitive._add_to_context (cognitive 43) genesis/ext/pyrender/primitive.py:368— Primitive._add_to_context has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (25 pts), ternaries 7 (15 pts), loops 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.
Viewer._render (cognitive 43) genesis/ext/pyrender/viewer.py:1065— Viewer._render has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27 (35 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
TrajectoryFileWriter.build (cognitive 43) genesis/recorders/trajectory.py:523— TrajectoryFileWriter.build has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 7 (13 pts), loops 4 (6 pts), boolean chains 4 (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.
particle._relax_volume_sampling (cognitive 43) genesis/utils/particle.py:159— particle._relax_volume_sampling has cognitive complexity 43 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 5 (15 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 25). 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.
forward_dynamics.func_implicit_damping (cognitive 42) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2369— forward_dynamics.func_implicit_damping has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 4 (10 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contact.func_collider_clear_env (cognitive 42) genesis/engine/solvers/rigid/collider/contact.py:237— contact.func_collider_clear_env has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (16 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
gjk.func_gjk_subdistance (cognitive 42) genesis/engine/solvers/rigid/collider/gjk.py:810— gjk.func_gjk_subdistance has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Renderer._get_primitive_program (cognitive 42) genesis/ext/pyrender/renderer.py:749— Renderer._get_primitive_program has cognitive complexity 42 (threshold 15). Drivers by points: if/else 29 (41 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.
MPLLinePlotter._update_plot (cognitive 42) genesis/recorders/plotters.py:567— MPLLinePlotter._update_plot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
data._allocate (cognitive 42) REDACTED:762— data._allocate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 6 (10 pts), boolean chains 3, loops 2 (3 pts), error handling 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.
FEMSelfTetContactHandler.compute_pairs (cognitive 41) genesis/engine/couplers/sap_coupler.py:2828— FEMSelfTetContactHandler.compute_pairs has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 8 (17 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RigidRigidTetContactHandler.compute_pairs) has the same decision points, in the same order, at the same nesting depths — 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.
RigidRigidTetContactHandler.compute_pairs (cognitive 41) genesis/engine/couplers/sap_coupler.py:3835— RigidRigidTetContactHandler.compute_pairs has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 8 (17 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FEMSelfTetContactHandler.compute_pairs) has the same decision points, in the same order, at the same nesting depths — 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.
kinematic_tactile._kernel_build_sensor_geom_idx (cognitive 41) genesis/engine/sensors/kinematic_tactile.py:136— kinematic_tactile._kernel_build_sensor_geom_idx has cognitive complexity 41 (threshold 15). Drivers by points: if/else 3 (15 pts), ternaries 3 (13 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PBDSolver._kernel_solve_density (cognitive 41) genesis/engine/solvers/pbd_solver.py:704— PBDSolver._kernel_solve_density has cognitive complexity 41 (threshold 15). Drivers by points: loops 8 (25 pts), if/else 4 (15 pts), boolean chains 1 (nesting depth added 28). 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.
noslip.func_refresh_qacc_batch (cognitive 41) genesis/engine/solvers/rigid/constraint/noslip.py:175— noslip.func_refresh_qacc_batch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 7 (15 pts), ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_island_tiled_factor_solve_all (cognitive 41) genesis/engine/solvers/rigid/constraint/solver.py:3549— solver.func_island_tiled_factor_solve_all has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (26 pts), ternaries 3 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Mesh._get_trimesh_props (cognitive 41) genesis/ext/pyrender/mesh.py:232— Mesh._get_trimesh_props has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 3 (10 pts), boolean chains 3 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
misc.get_gpu_shared_tile_sizes (cognitive 41) genesis/utils/misc.py:309— misc.get_gpu_shared_tile_sizes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 7 (13 pts), ternaries 3 (8 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.
RigidFemTriTetContactHandler.compute_pairs (cognitive 40) genesis/engine/couplers/sap_coupler.py:3486— RigidFemTriTetContactHandler.compute_pairs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 8 (17 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
epa.func_epa_init_polytope_3d (cognitive 40) genesis/engine/solvers/rigid/collider/epa.py:571— epa.func_epa_init_polytope_3d has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 5 (13 pts), loops 6 (10 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.
gjk.func_gjk (cognitive 40) genesis/engine/solvers/rigid/collider/gjk.py:416— gjk.func_gjk has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (5 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.
Renderer._bind_and_draw_primitive (cognitive 40) genesis/ext/pyrender/renderer.py:559— Renderer._bind_and_draw_primitive has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 4 (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.
LaunchRecorder.insert (cognitive 40) genesis/grad/bridge.py:336— LaunchRecorder.insert has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (10 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RRT._kernel_rrt_step1 (cognitive 40) genesis/utils/path_planning.py:378— RRT._kernel_rrt_step1 has cognitive complexity 40 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 5 (15 pts), ternaries 2 (9 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.
narrowphase.func_contact_convex_convex_sdf (cognitive 39) genesis/engine/solvers/rigid/collider/narrowphase.py:1364— narrowphase.func_contact_convex_convex_sdf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
linesearch.func_exit_single_island (cognitive 39) genesis/engine/solvers/rigid/constraint/linesearch.py:892— linesearch.func_exit_single_island has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 3 (9 pts), ternaries 1 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
linesearch.func_exit_islands_serial (cognitive 39) genesis/engine/solvers/rigid/constraint/linesearch.py:1091— linesearch.func_exit_islands_serial has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 3 (12 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
TrajectoryFileWriter._compress_frames (cognitive 39) genesis/recorders/trajectory.py:812— TrajectoryFileWriter._compress_frames has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 3 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 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.
particle._advect_foams (cognitive 39) genesis/utils/particle.py:674— particle._advect_foams has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 6 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 20). 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.
PathPlanner._func_check_collision (cognitive 39) genesis/utils/path_planning.py:232— PathPlanner._func_check_collision has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (30 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
inverse_kinematics.func_jacobian_scratch (cognitive 38) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:134— inverse_kinematics.func_jacobian_scratch has cognitive complexity 38 (threshold 15). Drivers by points: loops 8 (25 pts), ternaries 3 (10 pts), if/else 1 (3 pts) (nesting depth added 26). 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.
inverse_kinematics.func_get_jacobian (cognitive 38) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:194— inverse_kinematics.func_get_jacobian has cognitive complexity 38 (threshold 15). Drivers by points: loops 8 (25 pts), ternaries 3 (10 pts), if/else 1 (3 pts) (nesting depth added 26). 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.
Simulator.build (cognitive 37) genesis/engine/simulator.py:185— Simulator.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 5, loops 5 (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.
FEMSolver.accumulate_vertex_force_preconditioner (cognitive 37) genesis/engine/solvers/fem_solver.py:647— FEMSolver.accumulate_vertex_force_preconditioner has cognitive complexity 37 (threshold 15). Drivers by points: loops 11 (24 pts), if/else 6 (13 pts) (nesting depth added 20). 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.
manual_bw.func_forward_kinematics_link_bw (cognitive 37) genesis/engine/solvers/rigid/abd/manual_bw.py:17— manual_bw.func_forward_kinematics_link_bw has cognitive complexity 37 (threshold 15). Drivers by points: loops 11 (26 pts), if/else 4 (5 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 18). 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.
solver.add_frictionloss_constraints (cognitive 37) genesis/engine/solvers/rigid/constraint/solver.py:2108— solver.add_frictionloss_constraints has cognitive complexity 37 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 5 (12 pts), ternaries 3 (12 pts), boolean chains 1 (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.
RigidSolver._init_tree_fields (cognitive 37) genesis/engine/solvers/rigid/rigid_solver.py:960— RigidSolver._init_tree_fields has cognitive complexity 37 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 5 (16 pts), boolean chains 2 (nesting depth added 21). 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.
RRTConnect.plan (cognitive 37) genesis/utils/path_planning.py:893— RRTConnect.plan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 3 (5 pts), loops 3, 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.
usd_rigid_entity._parse_articulation_structure (cognitive 37) genesis/utils/usd/usd_rigid_entity.py:491— usd_rigid_entity._parse_articulation_structure has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 5 (11 pts), loops 4 (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.
Alarm.build_table (cognitive 36) .github/workflows/scripts/alarm.py:353— Alarm.build_table has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 5 (19 pts), if/else 7 (14 pts), loops 2, boolean chains 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.
TemperatureGridSensor.build (cognitive 36) genesis/engine/sensors/temperature.py:520— TemperatureGridSensor.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (8 pts), ternaries 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
multi_contact.func_approximate_polygon_with_quad (cognitive 36) genesis/engine/solvers/rigid/collider/multi_contact.py:1078— multi_contact.func_approximate_polygon_with_quad has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (11 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.
backward.kernel_manual_add_joint_limit_constraints_bw (cognitive 36) genesis/engine/solvers/rigid/constraint/backward.py:290— backward.kernel_manual_add_joint_limit_constraints_bw has cognitive complexity 36 (threshold 15). Drivers by points: if/else 4 (17 pts), ternaries 3 (12 pts), loops 3 (6 pts), boolean chains 1 (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.
island.func_group_constraints_by_island_coop (cognitive 36) genesis/engine/solvers/rigid/constraint/island.py:169— island.func_group_constraints_by_island_coop has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 6 (11 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.
RRT.plan (cognitive 36) genesis/utils/path_planning.py:511— RRT.plan has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
temperature._kernel_compute_contact_areas (cognitive 35) genesis/engine/sensors/temperature.py:204— temperature._kernel_compute_contact_areas has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 5 (15 pts), boolean chains 2 (nesting depth added 21). 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.
manual_bw.func_forward_velocity_link_bw (cognitive 35) genesis/engine/solvers/rigid/abd/manual_bw.py:284— manual_bw.func_forward_velocity_link_bw has cognitive complexity 35 (threshold 15). Drivers by points: loops 12 (25 pts), if/else 3 (5 pts), ternaries 3 (5 pts) (nesting depth added 17). 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.
solver.kernel_delete_dynamic_constraint (cognitive 35) genesis/engine/solvers/rigid/constraint/solver.py:2231— solver.kernel_delete_dynamic_constraint has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (23 pts), loops 3 (8 pts), boolean chains 4 (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.
misc.unique_rows (cognitive 35) genesis/utils/misc.py:474— misc.unique_rows has cognitive complexity 35 (threshold 15). Drivers by points: loops 11 (25 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 19). 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.
Camera.render (cognitive 35) genesis/vis/camera.py:404— Camera.render has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 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.
IPCCoupler._add_articulation_entities_to_ipc (cognitive 34) genesis/engine/couplers/ipc_coupler/coupler.py:579— IPCCoupler._add_articulation_entities_to_ipc has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (8 pts), ternaries 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.
FEMFloorTetContactHandler.detection (cognitive 34) genesis/engine/couplers/sap_coupler.py:2564— FEMFloorTetContactHandler.detection has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (8 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.
RigidJoint.dofs_length (cognitive 34) genesis/engine/entities/rigid_entity/rigid_joint.py:306— RigidJoint.dofs_length has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (14 pts), ternaries 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.
Scene.add_entity (cognitive 34) genesis/engine/scene.py:333— Scene.add_entity has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 1, ternaries 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.
SensorManager.build (cognitive 34) genesis/engine/sensors/sensor_manager.py:141— SensorManager.build has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 9 (12 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_factor_mass_tree (cognitive 34) genesis/engine/solvers/rigid/abd/forward_dynamics.py:819— forward_dynamics.func_factor_mass_tree has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (14 pts), ternaries 1 (4 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
forward_kinematics.func_forward_velocity_link (cognitive 34) genesis/engine/solvers/rigid/abd/forward_kinematics.py:624— forward_kinematics.func_forward_velocity_link has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 5 (10 pts), ternaries 5 (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.
contact.func_contact_is_after (cognitive 34) genesis/engine/solvers/rigid/collider/contact.py:822— contact.func_contact_is_after has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (14 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
noslip.func_noslip_batch (cognitive 34) genesis/engine/solvers/rigid/constraint/noslip.py:436— noslip.func_noslip_batch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 3 (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.
RigidSolver.set_qpos (cognitive 34) genesis/engine/solvers/rigid/rigid_solver.py:2284— RigidSolver.set_qpos has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageTexture._validate_and_load (cognitive 34) genesis/options/textures.py:140— ImageTexture._validate_and_load has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (34 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.
usd_rigid_entity.parse_usd_rigid_entity (cognitive 34) genesis/utils/usd/usd_rigid_entity.py:648— usd_rigid_entity.parse_usd_rigid_entity has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 6 (9 pts), boolean chains 4 (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.
RigidFloorTetContactHandler.detection (cognitive 33) genesis/engine/couplers/sap_coupler.py:3265— RigidFloorTetContactHandler.detection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RaycastContext.update (cognitive 33) genesis/engine/sensors/raycaster.py:350— RaycastContext.update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
accessor.kernel_set_dofs_position (cognitive 33) genesis/engine/solvers/rigid/abd/accessor.py:787— accessor.kernel_set_dofs_position has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 4 (9 pts), ternaries 2 (5 pts) (nesting depth added 21). 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.
forward_kinematics.func_update_cartesian_space (cognitive 33) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1145— forward_kinematics.func_update_cartesian_space has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (11 pts), ternaries 1 (4 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.
misc.func_hibernate_island_if_settled (cognitive 33) genesis/engine/solvers/rigid/abd/misc.py:181— misc.func_hibernate_island_if_settled has cognitive complexity 33 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (11 pts), ternaries 2 (9 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
narrowphase.func_prefer_gjk_refinement (cognitive 33) genesis/engine/solvers/rigid/collider/narrowphase.py:2110— narrowphase.func_prefer_gjk_refinement has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts), boolean chains 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.
narrowphase.func_narrow_phase_diff_convex_vs_convex (cognitive 33) genesis/engine/solvers/rigid/collider/narrowphase.py:4524— narrowphase.func_narrow_phase_diff_convex_vs_convex has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_island_hessian_assemble_all (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:3437— solver.func_island_hessian_assemble_all has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_cholesky_factor_direct_batch (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:3618— solver.func_cholesky_factor_direct_batch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (9 pts), boolean chains 4 (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.
jit_render.bind_lighting (cognitive 33) genesis/ext/pyrender/jit_render.py:142— jit_render.bind_lighting has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (5 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.
URDF._process_cfgs (cognitive 33) REDACTED:3841— URDF._process_cfgs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (13 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.
Trajectory.__init__ (cognitive 33) genesis/recorders/trajectory.py:1047— Trajectory.__init__ has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 3, 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.
data.iter_data (cognitive 33) REDACTED:902— data.iter_data has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (4 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.
Camera.build (cognitive 33) genesis/vis/camera.py:148— Camera.build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 4 (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.
SAPCoupler.build (cognitive 32) genesis/engine/couplers/sap_coupler.py:267— SAPCoupler.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, 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.
tactile_shared.normalize_grid_probe_layout (cognitive 32) genesis/engine/sensors/tactile_shared.py:370— tactile_shared.normalize_grid_probe_layout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cognitive 32) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1502— forward_dynamics.kernel_refresh_invweight_and_meaninertia has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 4 (8 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
raycast_qd.closest_point_on_triangle (cognitive 32) genesis/utils/raycast_qd.py:263— raycast_qd.closest_point_on_triangle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 6 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
UsdContext.find_all_materials (cognitive 32) genesis/utils/usd/usd_context.py:338— UsdContext.find_all_materials has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (6 pts), boolean chains 3, ternaries 2, 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.
watertighten._collapse_safe (cognitive 32) genesis/utils/watertighten.py:595— watertighten._collapse_safe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (2 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.
KinematicSolver.build (cognitive 31) genesis/engine/solvers/kinematic_solver.py:230— KinematicSolver.build has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 7 (9 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.
misc.func_equality_links (cognitive 31) genesis/engine/solvers/rigid/abd/misc.py:35— misc.func_equality_links has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 3 (12 pts), loops 2 (6 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.
gjk.func_safe_gjk_support (cognitive 31) genesis/engine/solvers/rigid/collider/gjk.py:1570— gjk.func_safe_gjk_support has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (12 pts), loops 2 (3 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.
mpr.mpr_find_pos (cognitive 31) genesis/engine/solvers/rigid/collider/mpr.py:260— mpr.mpr_find_pos has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 7 (14 pts), boolean chains 2 (nesting depth added 16). 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.
solver.func_add_relative_motion_rows (cognitive 31) genesis/engine/solvers/rigid/constraint/solver.py:1811— solver.func_add_relative_motion_rows has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 3 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 16). 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.
solver.func_update_constraint_batch (cognitive 31) genesis/engine/solvers/rigid/constraint/solver.py:5093— solver.func_update_constraint_batch has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 8 (14 pts), boolean chains 2 (nesting depth added 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.
LaunchRecorder.reverse (cognitive 31) genesis/grad/bridge.py:426— LaunchRecorder.reverse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (10 pts), boolean chains 4 (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.
temperature._kernel_contact_heat (cognitive 30) genesis/engine/sensors/temperature.py:285— temperature._kernel_contact_heat has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KinematicSolver.set_qpos (cognitive 30) genesis/engine/solvers/kinematic_solver.py:1014— KinematicSolver.set_qpos has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4, ternaries 1 (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.
accessor.kernel_set_sol_params (cognitive 30) genesis/engine/solvers/rigid/abd/accessor.py:548— accessor.kernel_set_sol_params has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 5 (6 pts) (nesting depth added 17). 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.
solver_breakdown._func_islands_linesearch_and_apply (cognitive 30) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:193— solver_breakdown._func_islands_linesearch_and_apply has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), ternaries 1 (4 pts), boolean chains 2, loops 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.
solver_breakdown._func_islands_update_search_direction (cognitive 30) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:270— solver_breakdown._func_islands_update_search_direction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (27 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Scene.add_node (cognitive 30) genesis/ext/pyrender/scene.py:381— Scene.add_node has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.format_texture_source (cognitive 30) genesis/ext/pyrender/utils.py:47— utils.format_texture_source has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (29 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.
URDF.link_fk (cognitive 30) REDACTED:2965— URDF.link_fk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (URDF.link_fk_batch) has the same decision points, in the same order, at the same nesting depths — 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.
URDF.link_fk_batch (cognitive 30) REDACTED:3051— URDF.link_fk_batch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (URDF.link_fk) has the same decision points, in the same order, at the same nesting depths — 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.
URDF.animate (cognitive 30) REDACTED:3400— URDF.animate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (8 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.
surfaces._make_rgba (cognitive 30) genesis/options/surfaces.py:255— surfaces._make_rgba has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 4 (6 pts), boolean chains 5, 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.
data._size_names (cognitive 30) REDACTED:663— data._size_names has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 2 (8 pts), loops 3 (7 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.
misc.qd_to_torch (cognitive 30) genesis/utils/misc.py:861— misc.qd_to_torch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 2 (5 pts), ternaries 2 (5 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.
KinematicEntityDescription._resolve_geoms (cognitive 29) REDACTED:1387— KinematicEntityDescription._resolve_geoms has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 6 (11 pts), boolean chains 5 (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.
forward_kinematics.func_forward_kinematics_link (cognitive 29) genesis/engine/solvers/rigid/abd/forward_kinematics.py:378— forward_kinematics.func_forward_kinematics_link has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 6 (10 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.
inverse_kinematics.func_forward_kinematics_scratch (cognitive 29) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:19— inverse_kinematics.func_forward_kinematics_scratch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (8 pts), loops 2 (3 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.
contact.func_contact_heapsort (cognitive 29) genesis/engine/solvers/rigid/collider/contact.py:879— contact.func_contact_heapsort has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_equality_links (cognitive 29) genesis/engine/solvers/rigid/constraint/solver.py:1219— solver.func_equality_links has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 7 (13 pts), ternaries 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.
Scene._remove_node (cognitive 29) genesis/ext/pyrender/scene.py:552— Scene._remove_node has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Options._validation_error (cognitive 29) genesis/options/options.py:42— Options._validation_error has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 2, 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.
FrameImageExporter.export_frame_single_camera (cognitive 29) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 2 (4 pts), boolean chains 3, 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.
misc.sanitize_index (cognitive 29) genesis/utils/misc.py:1201— misc.sanitize_index has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 3 (6 pts), boolean chains 5, 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.
MouseInteractionPlugin.on_draw (cognitive 29) genesis/vis/viewer_plugins/plugins/mouse_interaction.py:220— MouseInteractionPlugin.on_draw has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (5 pts), boolean chains 3, ternaries 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.
HybridEntity.__init__ (cognitive 28) REDACTED:56— HybridEntity.__init__ has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (27 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.
KinematicEntityDescription._load_mesh (cognitive 28) REDACTED:797— KinematicEntityDescription._load_mesh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (7 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.
inverse_kinematics.func_integrate_dq_scratch (cognitive 28) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:300— inverse_kinematics.func_integrate_dq_scratch has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), ternaries 3 (9 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.
backward.kernel_manual_add_frictionloss_constraints_bw (cognitive 28) genesis/engine/solvers/rigid/constraint/backward.py:615— backward.kernel_manual_add_frictionloss_constraints_bw has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 4 (10 pts), if/else 1 (5 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.
RasterizerContext.update_pbd (cognitive 28) genesis/vis/rasterizer_context.py:975— RasterizerContext.update_pbd has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 2 (5 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
Alarm.fetch_wandb_data (cognitive 27) .github/workflows/scripts/alarm.py:281— Alarm.fetch_wandb_data has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
epa.func_epa_horizon (cognitive 27) genesis/engine/solvers/rigid/collider/epa.py:255— epa.func_epa_horizon has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 3, ternaries 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.
solver._func_update_efc_force (cognitive 27) genesis/engine/solvers/rigid/constraint/solver.py:5243— solver._func_update_efc_force has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (9 pts), ternaries 2 (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.
mjcf.parse_equalities (cognitive 27) REDACTED:825— mjcf.parse_equalities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), ternaries 2 (6 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.
terrain.parse_terrain (cognitive 27) REDACTED:19— terrain.parse_terrain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 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.
KinematicEntity.inverse_kinematics_multilink (cognitive 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1304— KinematicEntity.inverse_kinematics_multilink has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 7 (9 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
InteractiveScene._apply_rebuild (cognitive 26) genesis/engine/interactive_scene.py:234— InteractiveScene._apply_rebuild has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (6 pts), ternaries 3 (4 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.
Sensor.__init_subclass__ (cognitive 26) genesis/engine/sensors/base_sensor.py:195— Sensor.__init_subclass__ has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, 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.
contact_force._kernel_get_contacts_forces (cognitive 26) genesis/engine/sensors/contact_force.py:62— contact_force._kernel_get_contacts_forces has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (8 pts), boolean chains 3 (nesting depth added 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.
forward_dynamics.func_midpoint_eligible (cognitive 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1822— forward_dynamics.func_midpoint_eligible has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 3 (7 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_compute_island_envelope (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:2283— solver.func_compute_island_envelope has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 8 (11 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.
solver.func_add_cone_hessian_block_coop (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:2413— solver.func_add_cone_hessian_block_coop has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_hessian_and_cholesky_factor_incremental_batch (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:4254— solver.func_hessian_and_cholesky_factor_incremental_batch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
OffscreenRenderer.render (cognitive 26) genesis/ext/pyrender/offscreen.py:65— OffscreenRenderer.render has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
linalg.mat_inverse (cognitive 26) genesis/utils/linalg.py:37— linalg.mat_inverse has cognitive complexity 26 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 2 (4 pts) (nesting depth added 14). 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.
misc.qd_to_numpy (cognitive 26) genesis/utils/misc.py:933— misc.qd_to_numpy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (5 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
particle._compute_emission_potentials (cognitive 26) genesis/utils/particle.py:772— particle._compute_emission_potentials has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (9 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.
Rasterizer.destroy (cognitive 26) genesis/vis/rasterizer.py:154— Rasterizer.destroy has cognitive complexity 26 (threshold 15). Drivers by points: error handling 3 (10 pts), if/else 5 (10 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.
RasterizerContext.on_rigid (cognitive 26) genesis/vis/rasterizer_context.py:578— RasterizerContext.on_rigid has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (11 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RasterizerContext.draw_rigid (cognitive 26) genesis/vis/rasterizer_context.py:708— RasterizerContext.draw_rigid has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (11 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.
Viewer.build (cognitive 26) genesis/vis/viewer.py:79— Viewer.build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 1 (2 pts), ternaries 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.
FEMSelfTetContactHandler.compute_candidates (cognitive 25) genesis/engine/couplers/sap_coupler.py:2757— FEMSelfTetContactHandler.compute_candidates has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 3 (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 shape REPEATS in the file: one other method here (RigidRigidTetContactHandler.compute_candidates) has the same decision points, in the same order, at the same nesting depths — 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.
RigidRigidTetContactHandler.compute_candidates (cognitive 25) genesis/engine/couplers/sap_coupler.py:3765— RigidRigidTetContactHandler.compute_candidates has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 3 (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 shape REPEATS in the file: one other method here (FEMSelfTetContactHandler.compute_candidates) has the same decision points, in the same order, at the same nesting depths — 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.
JITRenderer.update_context (cognitive 25) genesis/ext/pyrender/jit_render.py:358— JITRenderer.update_context has cognitive complexity 25 (threshold 15). Drivers by points: loops 11 (14 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 6). 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.
LinePlotHelper.process (cognitive 25) genesis/recorders/plotters.py:172— LinePlotHelper.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (10 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.
serialization.load (cognitive 25) REDACTED:583— serialization.load has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 4, 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.
usd_stage._find_connected_components (cognitive 25) genesis/utils/usd/usd_stage.py:55— usd_stage._find_connected_components has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, ternaries 2 (4 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bvh.func_bvh_query_aabb (cognitive 24) genesis/engine/bvh.py:461— bvh.func_bvh_query_aabb has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
kinematic_tactile._kernel_kinematic_taxel_bvh (cognitive 24) genesis/engine/sensors/kinematic_tactile.py:792— kinematic_tactile._kernel_kinematic_taxel_bvh has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (10 pts), ternaries 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.
MPMSolver.g2p (cognitive 24) genesis/engine/solvers/mpm_solver.py:488— MPMSolver.g2p has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gjk.func_gjk_intersect (cognitive 24) genesis/engine/solvers/rigid/collider/gjk.py:656— gjk.func_gjk_intersect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (9 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.
gjk.func_search_valid_simplex_vertex (cognitive 24) genesis/engine/solvers/rigid/collider/gjk.py:1434— gjk.func_search_valid_simplex_vertex has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 3 (6 pts), loops 3 (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.
backward.kernel_compute_gradients (cognitive 24) genesis/engine/solvers/rigid/constraint/backward.py:158— backward.kernel_compute_gradients has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (12 pts), ternaries 3 (10 pts), if/else 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.
solver_breakdown._func_update_qfrc_constraint_per_dof (cognitive 24) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:128— solver_breakdown._func_update_qfrc_constraint_per_dof has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
trajectory._encode_frames (cognitive 24) genesis/recorders/trajectory.py:395— trajectory._encode_frames has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 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.
data.check_data (cognitive 24) REDACTED:970— data.check_data has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (21 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.
geom.z_to_quat (cognitive 24) genesis/utils/geom.py:2195— geom.z_to_quat has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, 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.
particle._rasterize_spheres (cognitive 24) genesis/utils/particle.py:497— particle._rasterize_spheres has cognitive complexity 24 (threshold 15). Drivers by points: loops 9 (16 pts), if/else 2 (8 pts) (nesting depth added 13). 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.
serialization._export_value (cognitive 24) REDACTED:348— serialization._export_value has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, ternaries 2 (4 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.
serialization._redact_paths (cognitive 24) REDACTED:523— serialization._redact_paths has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 2, error handling 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.
Solver._sanitize_io_variables (cognitive 23) genesis/engine/solvers/base_solver.py:356— Solver._sanitize_io_variables has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
accessor.kernel_wake_up_entities_held_by_links (cognitive 23) genesis/engine/solvers/rigid/abd/accessor.py:197— accessor.kernel_wake_up_entities_held_by_links has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 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.
gjk.func_gjk_subdistance_2d (cognitive 23) genesis/engine/solvers/rigid/collider/gjk.py:931— gjk.func_gjk_subdistance_2d has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (9 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.
geom.trans_R_to_T (cognitive 23) genesis/utils/geom.py:1230— geom.trans_R_to_T has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
geom._tc_polar (cognitive 23) genesis/utils/geom.py:1536— geom._tc_polar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 3 (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.
particle._find_neighbors (cognitive 23) genesis/utils/particle.py:636— particle._find_neighbors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RRT._kernel_rrt_step2 (cognitive 23) genesis/utils/path_planning.py:465— RRT._kernel_rrt_step2 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (5 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.
urdf.merge_fixed_links (cognitive 23) REDACTED:476— urdf.merge_fixed_links has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (8 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.
watertighten._build_edge_component_table (cognitive 23) genesis/utils/watertighten.py:198— watertighten._build_edge_component_table has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (5 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.
RigidFemTriTetContactHandler.compute_candidates (cognitive 22) genesis/engine/couplers/sap_coupler.py:3426— RigidFemTriTetContactHandler.compute_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 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.
RigidJointDescription.__post_init__ (cognitive 22) REDACTED:190— RigidJointDescription.__post_init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (6 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.
RigidEntity._build (cognitive 22) genesis/engine/entities/rigid_entity/rigid_entity.py:1679— RigidEntity._build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2, 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.
PBDSolver._kernel_solve_collision (cognitive 22) genesis/engine/solvers/pbd_solver.py:665— PBDSolver._kernel_solve_collision has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (9 pts), boolean chains 4 (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.
manual_bw.kernel_manual_compute_qacc_bw (cognitive 22) genesis/engine/solvers/rigid/abd/manual_bw.py:429— manual_bw.kernel_manual_compute_qacc_bw has cognitive complexity 22 (threshold 15). Drivers by points: loops 10 (22 pts) (nesting depth added 12). 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.
multi_contact.func_potential_mesh_normals (cognitive 22) genesis/engine/solvers/rigid/collider/multi_contact.py:475— multi_contact.func_potential_mesh_normals has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, 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.
backward.kernel_solve_adjoint_u (cognitive 22) genesis/engine/solvers/rigid/constraint/backward.py:98— backward.kernel_solve_adjoint_u has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 5 (8 pts), boolean chains 1 (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.
island.func_group_constraints_by_island (cognitive 22) genesis/engine/solvers/rigid/constraint/island.py:99— island.func_group_constraints_by_island has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts), boolean chains 1 (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.
ConstraintSolver.get_weld_constraints (cognitive 22) genesis/engine/solvers/rigid/constraint/solver.py:437— ConstraintSolver.get_weld_constraints has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (9 pts), ternaries 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.
ImGuiOverlayPlugin._render_sim_controls (cognitive 22) genesis/ext/pyrender/overlay/plugin.py:465— ImGuiOverlayPlugin._render_sim_controls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 5 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
types.build_entity_joint_data (cognitive 22) genesis/ext/pyrender/overlay/types.py:36— types.build_entity_joint_data has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), ternaries 1 (4 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.
Viewer.on_close (cognitive 22) genesis/ext/pyrender/viewer.py:646— Viewer.on_close has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 6 (7 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Recorder.sync (cognitive 22) genesis/recorders/base_recorder.py:186— Recorder.sync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (4 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.
misc.get_device (cognitive 22) genesis/utils/misc.py:230— misc.get_device has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 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.
simt.qd_lane_local_get (cognitive 22) genesis/utils/simt.py:108— simt.qd_lane_local_get has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (6 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.
urdf.principal_axes_rot (cognitive 22) REDACTED:529— urdf.principal_axes_rot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (8 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.
UsdContext.replace_asset_symlinks (cognitive 22) genesis/utils/usd/usd_context.py:443— UsdContext.replace_asset_symlinks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (8 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.
RasterizerContext.on_pbd (cognitive 22) genesis/vis/rasterizer_context.py:908— RasterizerContext.on_pbd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (5 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.
IPCCoupler._setup_coupling_config (cognitive 21) genesis/engine/couplers/ipc_coupler/coupler.py:223— IPCCoupler._setup_coupling_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Emitter.emit (cognitive 21) genesis/engine/entities/emitter.py:56— Emitter.emit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 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.
KinematicEntityDescription.resolve (cognitive 21) REDACTED:399— KinematicEntityDescription.resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, 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.
RigidEntity.attach (cognitive 21) genesis/engine/entities/rigid_entity/rigid_entity.py:1598— RigidEntity.attach has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (8 pts), ternaries 1 (4 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.
FEMSolver.one_pcg_iter (cognitive 21) genesis/engine/solvers/fem_solver.py:793— FEMSolver.one_pcg_iter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 7 (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.
PBDSolver._kernel_solve_viscosity (cognitive 21) genesis/engine/solvers/pbd_solver.py:772— PBDSolver._kernel_solve_viscosity has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 13). 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.
forward_kinematics.func_update_verts_for_geom (cognitive 21) genesis/engine/solvers/rigid/abd/forward_kinematics.py:858— forward_kinematics.func_update_verts_for_geom has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 5 (10 pts) (nesting depth added 13). 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.
box_contact.func_plane_box_contact (cognitive 21) genesis/engine/solvers/rigid/collider/box_contact.py:107— box_contact.func_plane_box_contact has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
broadphase.func_collision_clear (cognitive 21) genesis/engine/solvers/rigid/collider/broadphase.py:65— broadphase.func_collision_clear has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), ternaries 1 (3 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.
Collider.__init__ (cognitive 21) genesis/engine/solvers/rigid/collider/collider.py:82— Collider.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (2 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 — checks laid out side by side rather than stacked — 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.
epa.func_safe_attach_face_to_polytope (cognitive 21) genesis/engine/solvers/rigid/collider/epa.py:1314— epa.func_safe_attach_face_to_polytope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 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.
narrowphase._func_multicontact_accept (cognitive 21) genesis/engine/solvers/rigid/collider/narrowphase.py:3793— narrowphase._func_multicontact_accept has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
RigidSolver._set_dofs_info (cognitive 21) genesis/engine/solvers/rigid/rigid_solver.py:2424— RigidSolver._set_dofs_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_trimesh_patch.parse_mtl (cognitive 21) genesis/ext/_trimesh_patch.py:293— _trimesh_patch.parse_mtl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (6 pts), 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.
_trimesh_patch._parse_vertices (cognitive 21) genesis/ext/_trimesh_patch.py:539— _trimesh_patch._parse_vertices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
JITRenderer.set_light (cognitive 21) genesis/ext/pyrender/jit_render.py:453— JITRenderer.set_light has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 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.
Renderer._forward_pass (cognitive 21) genesis/ext/pyrender/renderer.py:369— Renderer._forward_pass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
URDF._validate_graph (cognitive 21) REDACTED:3770— URDF._validate_graph has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (10 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.
BatchTexture.from_images (cognitive 21) genesis/options/textures.py:298— BatchTexture.from_images has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
Trajectory.play (cognitive 21) genesis/recorders/trajectory.py:1270— Trajectory.play has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (7 pts), loops 2 (3 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.
_main.launch (cognitive 20) genesis/_main.py:14— _main.launch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), ternaries 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.
generate_tower._auto_smooth (cognitive 20) genesis/assets/tower/generate_tower.py:61— generate_tower._auto_smooth has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (9 pts) (nesting depth added 12). 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.
RaycasterSensor._update_raw_data (cognitive 20) genesis/engine/sensors/raycaster.py:606— RaycasterSensor._update_raw_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (5 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.
Simulator._reverse (cognitive 20) genesis/engine/simulator.py:449— Simulator._reverse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), 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.
misc.kernel_init_link_fields (cognitive 20) genesis/engine/solvers/rigid/abd/misc.py:330— misc.kernel_init_link_fields has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). 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.
Collider._init_static_config (cognitive 20) genesis/engine/solvers/rigid/collider/collider.py:179— Collider._init_static_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
linesearch.func_cone_head_kinks (cognitive 20) genesis/engine/solvers/rigid/constraint/linesearch.py:212— linesearch.func_cone_head_kinks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_wrap_cone_hessian (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:2469— solver.func_wrap_cone_hessian has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (6 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.
solver.func_update_cone_free_hessian_flip (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:2614— solver.func_update_cone_free_hessian_flip 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.
solver.func_solve_iter (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:5759— solver.func_solve_iter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
solver.func_update_contact_force (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:5970— solver.func_update_contact_force has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 9). 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.
RigidSolver.__init__ (cognitive 20) genesis/engine/solvers/rigid/rigid_solver.py:219— RigidSolver.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
ImGuiOverlayPlugin._render_visualization (cognitive 20) genesis/ext/pyrender/overlay/plugin.py:537— ImGuiOverlayPlugin._render_visualization has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (6 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.
Scene.__init__ (cognitive 20) genesis/ext/pyrender/scene.py:46— Scene.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (7 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.
kernel_writes._find_callee (cognitive 20) genesis/grad/kernel_writes.py:146— kernel_writes._find_callee has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (5 pts), boolean chains 4, 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.
cache.get_hashkey (cognitive 20) REDACTED:346— cache.get_hashkey has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
data._opt_in_sizes (cognitive 20) REDACTED:289— data._opt_in_sizes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 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.
SpatialHasher.compute_reordered_idx (cognitive 20) genesis/utils/geom.py:2529— SpatialHasher.compute_reordered_idx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 7 (10 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.
mesh.surface_uvs_to_trimesh_visual (cognitive 20) genesis/utils/mesh.py:274— mesh.surface_uvs_to_trimesh_visual has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serialization.declared_schema (cognitive 20) REDACTED:252— serialization.declared_schema has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 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.
simt.qd_lane_local_set (cognitive 20) genesis/utils/simt.py:137— simt.qd_lane_local_set has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (8 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.
watertighten._neighbors (cognitive 20) genesis/utils/watertighten.py:571— watertighten._neighbors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 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.
watertighten._glue_manifold_corners (cognitive 20) genesis/utils/watertighten.py:1145— watertighten._glue_manifold_corners has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 2 (6 pts), ternaries 2 (6 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.
Visualizer.update_visual_states (cognitive 20) genesis/vis/visualizer.py:269— Visualizer.update_visual_states has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 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.
List.__repr__colorized__ (cognitive 19) genesis/datatypes.py:79— List.__repr__colorized__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), error handling 1 (2 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.
SAPCoupler.rigid_solve_pcg (cognitive 19) genesis/engine/couplers/sap_coupler.py:1154— SAPCoupler.rigid_solve_pcg has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (6 pts) (nesting depth added 9). 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.
kinematic_tactile._func_query_contact_depth (cognitive 19) genesis/engine/sensors/kinematic_tactile.py:186— kinematic_tactile._func_query_contact_depth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 5, 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.
FEMSolver._func_compute_ele_energy (cognitive 19) genesis/engine/solvers/fem_solver.py:599— FEMSolver._func_compute_ele_energy has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3 (7 pts) (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.
KinematicSolver._init_tree_fields (cognitive 19) genesis/engine/solvers/kinematic_solver.py:477— KinematicSolver._init_tree_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (5 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.
box_contact.func_sphere_box_contact (cognitive 19) genesis/engine/solvers/rigid/collider/box_contact.py:21— box_contact.func_sphere_box_contact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (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.
contact.func_contact_group_by_normal (cognitive 19) genesis/engine/solvers/rigid/collider/contact.py:1062— contact.func_contact_group_by_normal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImGuiOverlayPlugin._render_joints_euler_mode (cognitive 19) genesis/ext/pyrender/overlay/plugin.py:1170— ImGuiOverlayPlugin._render_joints_euler_mode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 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.
CSVFileWriter.process (cognitive 19) genesis/recorders/file_writers.py:105— CSVFileWriter.process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (5 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.
TrajectoryFileWriter.cleanup (cognitive 19) genesis/recorders/trajectory.py:970— TrajectoryFileWriter.cleanup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 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.
hybrid.reduce_graph (cognitive 19) genesis/utils/hybrid.py:60— hybrid.reduce_graph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 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.
BatchRenderer.render (cognitive 19) genesis/vis/batch_renderer.py:346— BatchRenderer.render has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 2 (3 pts), 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.
Camera.update_following (cognitive 19) genesis/vis/camera.py:330— Camera.update_following has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
Rasterizer.render_camera (cognitive 19) genesis/vis/rasterizer.py:69— Rasterizer.render_camera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 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.
Raycaster.__init__ (cognitive 19) genesis/vis/viewer_plugins/raycast.py:56— Raycaster.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 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.
Visualizer.__init__ (cognitive 19) genesis/vis/visualizer.py:32— Visualizer.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 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.
IPCCoupler._post_advance_external_articulation (cognitive 18) genesis/engine/couplers/ipc_coupler/coupler.py:957— IPCCoupler._post_advance_external_articulation has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 9). 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.
ParticleEntity.sample (cognitive 18) genesis/engine/entities/particle_entity.py:182— ParticleEntity.sample has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 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.
KinematicEntityDescription._resolve_inertial (cognitive 18) REDACTED:1471— KinematicEntityDescription._resolve_inertial has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (4 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.
point_cloud_tactile._kernel_elastomer_dilate_accumulate (cognitive 18) genesis/engine/sensors/point_cloud_tactile.py:1269— point_cloud_tactile._kernel_elastomer_dilate_accumulate has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (7 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.
RaycastContext._static_entry_groups (cognitive 18) genesis/engine/sensors/raycaster.py:160— RaycastContext._static_entry_groups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 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.
SensorManager.read_sensors (cognitive 18) genesis/engine/sensors/sensor_manager.py:427— SensorManager.read_sensors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
temperature._qd_polygon_area_from_points_3d (cognitive 18) genesis/engine/sensors/temperature.py:131— temperature._qd_polygon_area_from_points_3d has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (4 pts), ternaries 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.
Simulator._add_entity (cognitive 18) genesis/engine/simulator.py:146— Simulator._add_entity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 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.
KinematicSolver._init_link_fields (cognitive 18) genesis/engine/solvers/kinematic_solver.py:603— KinematicSolver._init_link_fields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 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.
forward_dynamics.func_compute_mass_matrix_and_link_force (cognitive 18) genesis/engine/solvers/rigid/abd/forward_dynamics.py:366— forward_dynamics.func_compute_mass_matrix_and_link_force has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 5 (7 pts), boolean chains 2 (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.
forward_kinematics.func_forward_velocity (cognitive 18) genesis/engine/solvers/rigid/abd/forward_kinematics.py:799— forward_kinematics.func_forward_velocity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 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.
contact.func_contact_is_before (cognitive 18) genesis/engine/solvers/rigid/collider/contact.py:940— contact.func_contact_is_before has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (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.
epa.func_epa_init_polytope_2d (cognitive 18) genesis/engine/solvers/rigid/collider/epa.py:425— epa.func_epa_init_polytope_2d has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (6 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.
ConstraintSolver.__init__ (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:119— ConstraintSolver.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), loops 2 (4 pts), ternaries 4 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — 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.
solver.kernel_get_equality_constraints (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:554— solver.kernel_get_equality_constraints has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (8 pts) (nesting depth added 9). 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.
solver.func_rank_batch_update_island (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:3911— solver.func_rank_batch_update_island has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), ternaries 1 (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.
solver.func_factor_island_incremental_batch (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:3955— solver.func_factor_island_incremental_batch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver._func_update_cost_coop (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:5304— solver._func_update_cost_coop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (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.
solver._initialize_Jaref_parallel (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:5508— solver._initialize_Jaref_parallel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 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.
Renderer._normal_pass (cognitive 18) genesis/ext/pyrender/renderer.py:503— Renderer._normal_pass has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), 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.
Joint.get_child_pose (cognitive 18) REDACTED:2292— Joint.get_child_pose has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
Link.collision_mesh (cognitive 18) REDACTED:2588— Link.collision_mesh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 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.
raycaster._generate_uniform_angles (cognitive 18) genesis/options/sensors/raycaster.py:102— raycaster._generate_uniform_angles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RasterizerContext.update_fem (cognitive 18) genesis/vis/rasterizer_context.py:1066— RasterizerContext.update_fem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (9 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.
Raytracer.add_surface (cognitive 18) genesis/vis/raytracer.py:373— Raytracer.add_surface has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
SAPCoupler.compute_fem_matrix_vector_product (cognitive 17) genesis/engine/couplers/sap_coupler.py:1072— SAPCoupler.compute_fem_matrix_vector_product has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 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.
RigidRigidContactHandler.compute_jacobian (cognitive 17) genesis/engine/couplers/sap_coupler.py:2362— RigidRigidContactHandler.compute_jacobian has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 pts), ternaries 2 (6 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.
Mesh.__init__ (cognitive 17) REDACTED:134— Mesh.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (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.
ProbeSensorMixin.build (cognitive 17) genesis/engine/sensors/probe.py:108— ProbeSensorMixin.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
kinematic_solver._fill_base_link_geom_offsets (cognitive 17) genesis/engine/solvers/kinematic_solver.py:108— kinematic_solver._fill_base_link_geom_offsets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 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.
diff.func_copy_next_to_curr (cognitive 17) genesis/engine/solvers/rigid/abd/diff.py:18— diff.func_copy_next_to_curr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
forward_dynamics.func_update_acc (cognitive 17) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1733— forward_dynamics.func_update_acc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), ternaries 1 (4 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.
forward_kinematics.func_COM_root (cognitive 17) genesis/engine/solvers/rigid/abd/forward_kinematics.py:304— forward_kinematics.func_COM_root has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 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.
island.func_sort_contacts_coop (cognitive 17) genesis/engine/solvers/rigid/constraint/island.py:895— island.func_sort_contacts_coop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (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.
linesearch.func_mv_jv_islands (cognitive 17) genesis/engine/solvers/rigid/constraint/linesearch.py:634— linesearch.func_mv_jv_islands has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (2 pts) (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.
solver._func_disc_middle (cognitive 17) genesis/engine/solvers/rigid/constraint/solver.py:4566— solver._func_disc_middle has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 3 (4 pts) (nesting depth added 9). 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.
solver._func_cone_block_chol (cognitive 17) genesis/engine/solvers/rigid/constraint/solver.py:4693— solver._func_cone_block_chol has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 3 (5 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.
RigidSolver.substep (cognitive 17) genesis/engine/solvers/rigid/rigid_solver.py:1287— RigidSolver.substep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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.
JITRenderer.update (cognitive 17) genesis/ext/pyrender/jit_render.py:293— JITRenderer.update has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts) (nesting depth added 9). 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.
EGLPlatform.init_context (cognitive 17) genesis/ext/pyrender/platforms/egl.py:140— EGLPlatform.init_context has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
URDF.__init__ (cognitive 17) REDACTED:2692— URDF.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6 (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.
LinePlotHelper.__init__ (cognitive 17) genesis/recorders/plotters.py:122— LinePlotHelper.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 2 (6 pts), ternaries 1 (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.
misc.qd_zero_grad (cognitive 17) genesis/utils/misc.py:1143— misc.qd_zero_grad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 1 (4 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.
particle._interpolate_sdf (cognitive 17) genesis/utils/particle.py:131— particle._interpolate_sdf has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 1, if/else 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.
raycast_qd.write_ray_hit (cognitive 17) genesis/utils/raycast_qd.py:679— raycast_qd.write_ray_hit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terrain.convert_heightfield_to_watertight_trimesh (cognitive 17) REDACTED:225— terrain.convert_heightfield_to_watertight_trimesh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 7 (8 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — 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.
usd_rigid_entity._compute_joint_prim_paths (cognitive 17) genesis/utils/usd/usd_rigid_entity.py:587— usd_rigid_entity._compute_joint_prim_paths has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 4, if/else 3 (4 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.
VideoEncoder.close (cognitive 17) genesis/utils/video_encoder.py:246— VideoEncoder.close has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (5 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RasterizerContext.on_mpm (cognitive 17) genesis/vis/rasterizer_context.py:748— RasterizerContext.on_mpm has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.on_sph) has the same decision points, in the same order, at the same nesting depths — 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.
RasterizerContext.update_mpm (cognitive 17) genesis/vis/rasterizer_context.py:786— RasterizerContext.update_mpm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.update_sph) has the same decision points, in the same order, at the same nesting depths — 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.
RasterizerContext.on_sph (cognitive 17) genesis/vis/rasterizer_context.py:831— RasterizerContext.on_sph has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.on_mpm) has the same decision points, in the same order, at the same nesting depths — 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.
RasterizerContext.update_sph (cognitive 17) genesis/vis/rasterizer_context.py:869— RasterizerContext.update_sph has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.update_mpm) has the same decision points, in the same order, at the same nesting depths — 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.
RasterizerContext.on_fem (cognitive 17) genesis/vis/rasterizer_context.py:1043— RasterizerContext.on_fem has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 2 (4 pts), ternaries 1 (4 pts) (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.
IPCCoupler._pre_advance_external_articulation (cognitive 16) genesis/engine/couplers/ipc_coupler/coupler.py:912— IPCCoupler._pre_advance_external_articulation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RigidEntity.get_contacts (cognitive 16) genesis/engine/entities/rigid_entity/rigid_entity.py:2838— RigidEntity.get_contacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
Scene._reject_unexportable (cognitive 16) genesis/engine/scene.py:1583— Scene._reject_unexportable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (6 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.
Solver.check_errno (cognitive 16) genesis/engine/solvers/base_solver.py:322— Solver.check_errno has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 1 (3 pts), boolean chains 1, 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.
FEMSolver.one_linesearch_iter (cognitive 16) genesis/engine/solvers/fem_solver.py:874— FEMSolver.one_linesearch_iter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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.
FEMSolver.add_elements (cognitive 16) genesis/engine/solvers/fem_solver.py:1069— FEMSolver.add_elements has cognitive complexity 16 (threshold 15). Drivers by points: loops 10 (14 pts), if/else 1 (2 pts) (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.
forward_dynamics.func_compute_qacc (cognitive 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1798— forward_dynamics.func_compute_qacc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), ternaries 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.
forward_kinematics.func_COM_link (cognitive 16) genesis/engine/solvers/rigid/abd/forward_kinematics.py:244— forward_kinematics.func_COM_link has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (3 pts), ternaries 2 (3 pts) (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.
misc.func_apply_link_external_wrench (cognitive 16) genesis/engine/solvers/rigid/abd/misc.py:899— misc.func_apply_link_external_wrench has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
broadphase.func_check_links_collision_valid (cognitive 16) genesis/engine/solvers/rigid/collider/broadphase.py:29— broadphase.func_check_links_collision_valid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, 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.
contact.func_contact_patch_end_coop (cognitive 16) genesis/engine/solvers/rigid/collider/contact.py:1020— contact.func_contact_patch_end_coop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 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.
noslip.func_noslip (cognitive 16) genesis/engine/solvers/rigid/constraint/noslip.py:546— noslip.func_noslip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1, 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.
solver.func_qfrc_scatter_sparse (cognitive 16) genesis/engine/solvers/rigid/constraint/solver.py:5039— solver.func_qfrc_scatter_sparse has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (5 pts) (nesting depth added 9). 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.
ImGuiOverlayPlugin._render_control_panel (cognitive 16) genesis/ext/pyrender/overlay/plugin.py:427— ImGuiOverlayPlugin._render_control_panel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), 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.
Texture._add_to_context (cognitive 16) genesis/ext/pyrender/texture.py:167— Texture._add_to_context has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — 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.
Viewer._setup_main_camera (cognitive 16) genesis/ext/pyrender/viewer.py:435— Viewer._setup_main_camera has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
MPLVectorFieldPlotter.build (cognitive 16) genesis/recorders/plotters.py:726— MPLVectorFieldPlotter.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), loops 3 (5 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
collision.solve_contype_conaffinity (cognitive 16) genesis/utils/collision.py:6— collision.solve_contype_conaffinity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
data._by_path (cognitive 16) REDACTED:689— data._by_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), ternaries 1 (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.
mesh.create_box (cognitive 16) genesis/utils/mesh.py:1187— mesh.create_box has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (nesting depth added 7). 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.
PathPlanner.interpolate_path (cognitive 16) genesis/utils/path_planning.py:153— PathPlanner.interpolate_path has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 1 (2 pts) (nesting depth added 9). 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.
watertighten._extract_dual_contour_mesh (cognitive 16) genesis/utils/watertighten.py:245— watertighten._extract_dual_contour_mesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (6 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
D4 · Code Duplication· Near-duplicate member family (3 members, 34 shared lines) · ×1
Near-duplicate member family (3 members, 34 shared lines) genesis/engine/solvers/rigid/collider/diff_gjk.py:371— genesis/engine/solvers/rigid/collider/diff_gjk.py:371-559 | genesis/engine/solvers/rigid/collider/epa.py:43-219 | genesis/engine/solvers/rigid/collider/epa.py:967-1203 — These 3 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 3 times. The repair is at the members' 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. 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.
D4 · Code Duplication· Near-duplicate member family (3 members, 33 shared lines) · ×1
Near-duplicate member family (3 members, 33 shared lines) genesis/engine/couplers/sap_coupler.py:2829— genesis/engine/couplers/sap_coupler.py:2829-2960 | genesis/engine/couplers/sap_coupler.py:3494-3605 | genesis/engine/couplers/sap_coupler.py:3836-3970 — These 3 members are variants of one another: a block of 33 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' 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. 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.
Near-duplicate member pair (92 shared lines) genesis/engine/solvers/rigid/collider/narrowphase.py:2813— genesis/engine/solvers/rigid/collider/narrowphase.py:2813-3297 | genesis/engine/solvers/rigid/collider/narrowphase.py:4231-4463 — These two members are variants of one another: 92 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' grain — 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.
Near-duplicate member pair (83 shared lines) genesis/utils/path_planning.py:525— genesis/utils/path_planning.py:525-660 | genesis/utils/path_planning.py:907-1060 — These two members are variants of one another: 83 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' grain — 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.
Near-duplicate member pair (71 shared lines) genesis/engine/solvers/rigid/rigid_solver.py:1830— genesis/engine/solvers/rigid/rigid_solver.py:1830-1959 | genesis/engine/solvers/rigid/rigid_solver.py:1966-2105 — These two members are variants of one another: 71 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' grain — 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.
Near-duplicate member pair (52 shared lines) genesis/engine/solvers/rigid/constraint/linesearch.py:764— genesis/engine/solvers/rigid/constraint/linesearch.py:764-888 | genesis/engine/solvers/rigid/constraint/linesearch.py:956-1087 — These two members are variants of one another: 52 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' grain — 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.
Near-duplicate member pair (24 shared lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1022— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1022-1076 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1088-1134 — These two members are variants of one another: 24 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) genesis/engine/sensors/kinematic_tactile.py:553— genesis/engine/sensors/kinematic_tactile.py:553-614 | genesis/engine/sensors/point_cloud_tactile.py:1086-1147 — 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 — 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) genesis/utils/tools.py:78— genesis/utils/tools.py:78-110 | genesis/utils/tools.py:113-146 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py:619— genesis/engine/entities/rigid_entity/rigid_entity.py:619-651 | genesis/engine/entities/rigid_entity/rigid_link.py:171-192 — 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 — 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1147— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1147-1187 | genesis/engine/solvers/rigid/constraint/noslip.py:10-45 — 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 — 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) genesis/utils/path_planning.py:360— genesis/utils/path_planning.py:360-375 | genesis/utils/path_planning.py:706-722 — 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 — 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' grain — 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) genesis/engine/sensors/kinematic_tactile.py:991— genesis/engine/sensors/kinematic_tactile.py:991-1002 | genesis/engine/sensors/kinematic_tactile.py:1239-1271 — 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 — 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' grain — 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.
Duplicated block (70–73 lines × 3) genesis/ext/pyrender/jit_render.py:893— genesis/ext/pyrender/jit_render.py:893-965 | genesis/ext/pyrender/jit_render.py:1031-1102 | genesis/ext/pyrender/jit_render.py:1169-1238 — 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 — 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 `genesis/ext/pyrender/jit_render.py:893` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (47–54 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:869— genesis/engine/solvers/rigid/constraint/solver.py:869-922 | genesis/engine/solvers/rigid/constraint/solver.py:1098-1144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (53–54 lines × 2) genesis/utils/path_planning.py:608— genesis/utils/path_planning.py:608-660 | genesis/utils/path_planning.py:1007-1060 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (34–51 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:536— genesis/engine/solvers/rigid/collider/narrowphase.py:536-586 | genesis/engine/solvers/rigid/collider/narrowphase.py:970-1003 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (31–49 lines × 2) genesis/utils/raycast_qd.py:52— genesis/utils/raycast_qd.py:52-100 | genesis/utils/raycast_qd.py:400-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (44–46 lines × 2) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:421— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:421-466 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:551-594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (42 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2968— genesis/engine/solvers/rigid/collider/narrowphase.py:2968-3009 | genesis/engine/solvers/rigid/collider/narrowphase.py:4372-4413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (37–39 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1427— genesis/engine/sensors/point_cloud_tactile.py:1427-1465 | genesis/engine/sensors/point_cloud_tactile.py:1587-1623 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (15–34 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:494— genesis/engine/solvers/rigid/collider/narrowphase.py:494-527 | genesis/engine/solvers/rigid/collider/narrowphase.py:954-968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (32–33 lines × 3) genesis/engine/sensors/kinematic_tactile.py:570— genesis/engine/sensors/kinematic_tactile.py:570-602 | genesis/engine/sensors/kinematic_tactile.py:647-679 | genesis/engine/sensors/point_cloud_tactile.py:1104-1135 — there are 3 copies across 2 file(s) — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/kinematic_tactile.py:643` calls `qd_int`, `zero` and `genesis/engine/sensors/kinematic_tactile.py:567` does not — 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.
Duplicated block (2–33 lines × 4) genesis/engine/sensors/point_cloud_tactile.py:1383— genesis/engine/sensors/point_cloud_tactile.py:1383-1415 | genesis/engine/sensors/point_cloud_tactile.py:1416-1417 | genesis/engine/sensors/point_cloud_tactile.py:1546-1575 | genesis/engine/sensors/point_cloud_tactile.py:1576-1577 — 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 — 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 `genesis/engine/sensors/point_cloud_tactile.py:1416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/sensors/point_cloud_tactile.py:1416` calls `Vector`, `qd_float` and `genesis/engine/sensors/point_cloud_tactile.py:1417` does not — 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.
Duplicated block (25–33 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1505— genesis/engine/solvers/rigid/collider/contact.py:1505-1537 | genesis/engine/solvers/rigid/collider/contact.py:1926-1950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (33 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:828— genesis/engine/solvers/rigid/constraint/linesearch.py:828-860 | genesis/engine/solvers/rigid/constraint/linesearch.py:1033-1065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (31 lines × 3) genesis/engine/solvers/rigid/constraint/linesearch.py:828— genesis/engine/solvers/rigid/constraint/linesearch.py:828-858 | genesis/engine/solvers/rigid/constraint/linesearch.py:1033-1063 | genesis/engine/solvers/rigid/constraint/linesearch.py:1459-1489 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (29–30 lines × 2) genesis/engine/sensors/kinematic_tactile.py:454— genesis/engine/sensors/kinematic_tactile.py:454-483 | genesis/engine/sensors/kinematic_tactile.py:723-751 — both copies are in the same file, so extract the block into one function there and call it from each site — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/sensors/kinematic_tactile.py:721` calls `template` and `genesis/engine/sensors/kinematic_tactile.py:452` does not — 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.
Duplicated block (24–29 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:1016— genesis/engine/solvers/rigid/constraint/backward.py:1016-1044 | genesis/engine/solvers/rigid/constraint/backward.py:1214-1237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (28–29 lines × 2) genesis/utils/usd/usd_rigid_entity.py:289— genesis/utils/usd/usd_rigid_entity.py:289-317 | genesis/utils/usd/usd_rigid_entity.py:332-359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–28 lines × 2) genesis/utils/raycast_qd.py:816— genesis/utils/raycast_qd.py:816-843 | genesis/utils/raycast_qd.py:918-936 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22–27 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1919— genesis/engine/solvers/rigid/rigid_solver.py:1919-1945 | genesis/engine/solvers/rigid/rigid_solver.py:2070-2091 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1919` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) genesis/engine/entities/particle_entity.py:115— genesis/engine/entities/particle_entity.py:115-139 | genesis/engine/entities/sph_entity.py:42-66 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24–25 lines × 2) genesis/engine/solvers/kinematic_solver.py:1231— genesis/engine/solvers/kinematic_solver.py:1231-1255 | genesis/engine/solvers/rigid/rigid_solver.py:2755-2778 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `genesis/engine/solvers/kinematic_solver.py:1231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (24 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2963— genesis/engine/solvers/rigid/collider/narrowphase.py:2963-2986 | genesis/engine/solvers/rigid/collider/narrowphase.py:3370-3393 | genesis/engine/solvers/rigid/collider/narrowphase.py:4367-4390 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (19–24 lines × 2) genesis/engine/solvers/kinematic_solver.py:977— genesis/engine/solvers/kinematic_solver.py:977-995 | genesis/engine/solvers/rigid/rigid_solver.py:2031-2054 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `genesis/engine/solvers/kinematic_solver.py:977` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (23 lines × 2) genesis/utils/path_planning.py:440— genesis/utils/path_planning.py:440-462 | genesis/utils/path_planning.py:805-827 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20–21 lines × 2) genesis/engine/couplers/sap_coupler.py:3552— genesis/engine/couplers/sap_coupler.py:3552-3571 | genesis/engine/couplers/sap_coupler.py:3908-3928 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/couplers/sap_coupler.py:3552` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (20 lines × 3) genesis/engine/solvers/rigid/collider/diff_gjk.py:482— genesis/engine/solvers/rigid/collider/diff_gjk.py:482-501 | genesis/engine/solvers/rigid/collider/epa.py:157-176 | genesis/engine/solvers/rigid/collider/epa.py:1094-1113 — there are 3 copies across 2 file(s) — 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.
Duplicated block (9–20 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:132— genesis/engine/solvers/rigid/collider/narrowphase.py:132-140 | genesis/engine/solvers/rigid/collider/narrowphase.py:920-928 | genesis/engine/solvers/rigid/collider/narrowphase.py:1316-1335 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18–20 lines × 2) genesis/engine/sensors/kinematic_tactile.py:105— genesis/engine/sensors/kinematic_tactile.py:105-122 | genesis/engine/sensors/kinematic_tactile.py:143-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16–20 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:792— genesis/engine/solvers/rigid/constraint/solver.py:792-807 | genesis/engine/solvers/rigid/constraint/solver.py:1012-1031 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–17 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:618— genesis/engine/solvers/rigid/collider/narrowphase.py:618-634 | genesis/engine/solvers/rigid/collider/narrowphase.py:1048-1061 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16–17 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:946— genesis/engine/solvers/rigid/constraint/backward.py:946-962 | genesis/engine/solvers/rigid/constraint/backward.py:1138-1153 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/solvers/rigid/constraint/backward.py:1138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) genesis/utils/raycast_qd.py:104— genesis/utils/raycast_qd.py:104-120 | genesis/utils/raycast_qd.py:433-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (4–16 lines × 4) genesis/engine/solvers/rigid/constraint/backward.py:922— genesis/engine/solvers/rigid/constraint/backward.py:922-935 | genesis/engine/solvers/rigid/constraint/backward.py:1086-1101 | genesis/engine/solvers/rigid/constraint/solver.py:1242-1245 | genesis/engine/solvers/rigid/constraint/solver.py:1952-1955 — there are 4 copies across 2 file(s) — 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. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–16 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5216— genesis/engine/solvers/rigid/constraint/solver.py:5216-5230 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:39-54 — 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 — a file they already depend on, or a new one alongside them — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:528— genesis/engine/sensors/point_cloud_tactile.py:528-542 | genesis/engine/sensors/point_cloud_tactile.py:544-556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–15 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:689— genesis/engine/solvers/rigid/collider/contact.py:689-703 | genesis/engine/solvers/rigid/collider/diff_gjk.py:685-695 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 4) genesis/engine/sensors/kinematic_tactile.py:345— genesis/engine/sensors/kinematic_tactile.py:345-358 | genesis/engine/sensors/kinematic_tactile.py:465-478 | genesis/engine/sensors/kinematic_tactile.py:733-746 | genesis/engine/sensors/kinematic_tactile.py:837-850 — 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 — 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.
Duplicated block (10–14 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:500— genesis/engine/solvers/rigid/constraint/backward.py:500-510 | genesis/engine/solvers/rigid/constraint/backward.py:954-967 | genesis/engine/solvers/rigid/constraint/backward.py:1155-1164 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/constraint/backward.py:1165` calls `qd_vec3` and `genesis/engine/solvers/rigid/constraint/backward.py:511` does not — 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.
Duplicated block (8–14 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:62— genesis/engine/solvers/rigid/constraint/noslip.py:62-75 | genesis/engine/solvers/rigid/constraint/noslip.py:103-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–12 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2950— genesis/engine/solvers/rigid/collider/narrowphase.py:2950-2961 | genesis/engine/solvers/rigid/collider/narrowphase.py:4359-4365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:537— genesis/engine/solvers/rigid/constraint/backward.py:537-547 | genesis/engine/solvers/rigid/constraint/backward.py:985-994 | genesis/engine/solvers/rigid/constraint/backward.py:1192-1201 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–11 lines × 2) genesis/engine/couplers/sap_coupler.py:3343— genesis/engine/couplers/sap_coupler.py:3343-3353 | genesis/engine/couplers/sap_coupler.py:3569-3576 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `genesis/engine/couplers/sap_coupler.py:3343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (4–11 lines × 5) genesis/engine/solvers/rigid/abd/forward_kinematics.py:360— genesis/engine/solvers/rigid/abd/forward_kinematics.py:360-363 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:817-820 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1168-1171 | genesis/engine/solvers/rigid/abd/manual_bw.py:236-251 | genesis/engine/solvers/rigid/abd/manual_bw.py:408-418 — there are 5 copies across 2 file(s) — 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.
Duplicated block (6–10 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1268— genesis/engine/solvers/rigid/constraint/linesearch.py:1268-1273 | genesis/engine/solvers/rigid/constraint/linesearch.py:1382-1391 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:460— genesis/engine/solvers/rigid/constraint/backward.py:460-467 | genesis/engine/solvers/rigid/constraint/solver.py:775-783 | genesis/engine/solvers/rigid/constraint/solver.py:997-1005 — there are 3 copies across 2 file(s) — 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.
Duplicated block (8–9 lines × 2) genesis/utils/usd/usd_rigid_entity.py:507— genesis/utils/usd/usd_rigid_entity.py:507-515 | genesis/utils/usd/usd_rigid_entity.py:610-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 5) genesis/utils/particle.py:193— genesis/utils/particle.py:193-199 | genesis/utils/particle.py:207-213 | genesis/utils/particle.py:786-792 | genesis/utils/particle.py:802-808 | genesis/utils/particle.py:822-828 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 4) genesis/engine/couplers/sap_coupler.py:2518— genesis/engine/couplers/sap_coupler.py:2518-2524 | genesis/engine/couplers/sap_coupler.py:3341-3347 | genesis/engine/couplers/sap_coupler.py:3567-3573 | genesis/engine/couplers/sap_coupler.py:3924-3930 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (4–7 lines × 4) genesis/options/surfaces.py:425— genesis/options/surfaces.py:425-428 | genesis/options/surfaces.py:509-515 | genesis/options/surfaces.py:599-605 | genesis/options/surfaces.py:696-702 — 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 — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 6) genesis/engine/solvers/mpm_solver.py:868— genesis/engine/solvers/mpm_solver.py:868-874 | genesis/engine/solvers/mpm_solver.py:897-902 | genesis/engine/solvers/pbd_solver.py:1036-1041 | genesis/engine/solvers/pbd_solver.py:1062-1067 | genesis/engine/solvers/sph_solver.py:827-832 | genesis/engine/solvers/sph_solver.py:854-859 — there are 6 copies across 3 file(s) — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/sph_solver.py:835` calls `fill` and `genesis/engine/solvers/pbd_solver.py:1045` does not — 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.
Duplicated block (4–6 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:872— genesis/engine/solvers/rigid/abd/accessor.py:872-875 | genesis/engine/solvers/rigid/abd/accessor.py:890-895 | genesis/engine/solvers/rigid/abd/accessor.py:909-914 — 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 — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/abd/accessor.py:890` calls `ndrange` and `genesis/engine/solvers/rigid/abd/accessor.py:872` does not — 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.
Duplicated block (3–6 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2919— genesis/engine/solvers/rigid/collider/narrowphase.py:2919-2921 | genesis/engine/solvers/rigid/collider/narrowphase.py:3338-3343 | genesis/engine/solvers/rigid/collider/narrowphase.py:4301-4306 — 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 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2919` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–5 lines × 6) genesis/engine/couplers/sap_coupler.py:2679— genesis/engine/couplers/sap_coupler.py:2679-2683 | genesis/engine/couplers/sap_coupler.py:2691-2695 | genesis/engine/couplers/sap_coupler.py:3017-3019 | genesis/engine/couplers/sap_coupler.py:3023-3026 | genesis/engine/couplers/sap_coupler.py:3040-3043 | genesis/engine/couplers/sap_coupler.py:3047-3050 — 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 — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/couplers/sap_coupler.py:2683` calls `static` and `genesis/engine/couplers/sap_coupler.py:3019` does not — 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.
Duplicated block (2–5 lines × 4) genesis/engine/couplers/sap_coupler.py:3189— genesis/engine/couplers/sap_coupler.py:3189-3190 | genesis/engine/couplers/sap_coupler.py:3255-3259 | genesis/engine/couplers/sap_coupler.py:3420-3421 | genesis/engine/couplers/sap_coupler.py:3755-3759 — 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 — 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 `genesis/engine/couplers/sap_coupler.py:3255` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 5) genesis/engine/entities/fem_entity.py:507— genesis/engine/entities/fem_entity.py:507-521 | genesis/engine/entities/fem_entity.py:525-538 | genesis/engine/entities/particle_entity.py:307-322 | genesis/engine/entities/particle_entity.py:358-373 | genesis/engine/entities/particle_entity.py:423-438 — there are 5 copies across 2 file(s) — 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.
D4 · Code Duplication· Near-duplicate member family (3 members, 13 shared lines) · ×1
Near-duplicate member family (3 members, 13 shared lines) examples/rigid/friction_breakaway.py:37— examples/rigid/friction_breakaway.py:37-58 | examples/rigid/rolling_coast.py:22-43 | examples/rigid/torsional_grasp.py:23-44 — These 3 members are variants of one another: a block of 13 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' 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. 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.
Near-duplicate member pair (29 shared lines) examples/rigid/ik_duck.py:9— examples/rigid/ik_duck.py:9-70 | examples/rigid/ik_franka.py:9-71 — These two members are variants of one another: 29 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' grain — 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.
Duplicated block (27 lines × 2) examples/rigid/ik_custom_chain.py:9— examples/rigid/ik_custom_chain.py:9-35 | examples/rigid/ik_shadow_hand.py:9-35 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–23 lines × 2) examples/sensors/imu_franka.py:19— examples/sensors/imu_franka.py:19-40 | examples/sensors/joint_torque_franka.py:35-57 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/sensors/imu_franka.py:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (21–22 lines × 2) examples/coupling/fem_cube_linked_with_arm.py:22— examples/coupling/fem_cube_linked_with_arm.py:22-43 | examples/deformable/fem_hard_and_soft_constraint.py:24-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/coupling/fem_cube_linked_with_arm.py:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) examples/rigid/ik_franka.py:23— examples/rigid/ik_franka.py:23-41 | examples/rigid/ik_franka_batched.py:29-46 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/rigid/ik_franka.py:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–17 lines × 2) examples/rigid/suction_cup.py:87— examples/rigid/suction_cup.py:87-98 | examples/rigid/suction_cup.py:108-124 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `examples/rigid/suction_cup.py:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–16 lines × 2) examples/ipc/ipc_momentum.py:30— examples/ipc/ipc_momentum.py:30-45 | examples/sap_coupling/fem_sphere_and_cube.py:33-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `examples/ipc/ipc_momentum.py:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–16 lines × 2) examples/rigid/diffik_controller.py:49— examples/rigid/diffik_controller.py:49-61 | examples/rigid/ik_franka.py:30-45 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_franka.py:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/diffik_controller.py:49` calls `add_entity` and `examples/rigid/ik_franka.py:30` does not — 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.
Duplicated block (15 lines × 4) examples/rigid/accelerometer_duck.py:7— examples/rigid/accelerometer_duck.py:7-21 | examples/rigid/control_franka.py:9-23 | examples/rigid/control_mesh.py:7-21 | examples/rigid/set_phys_attr.py:9-23 — 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 — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/accelerometer_duck.py:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 3) examples/rendering/moving_camera.py:15— examples/rendering/moving_camera.py:15-26 | examples/rigid/single_franka.py:15-27 | examples/rigid/single_franka_envs.py:26-38 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/single_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `examples/rendering/moving_camera.py:15` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) examples/rendering/moving_camera.py:12— examples/rendering/moving_camera.py:12-23 | examples/rigid/closed_loop.py:26-36 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rendering/moving_camera.py:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–11 lines × 3) examples/sensors/imu_franka.py:15— examples/sensors/imu_franka.py:15-17 | examples/sensors/surface_distance_shadowhand.py:36-46 | examples/sensors/tactile_franka.py:187-197 — 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 — a file they already depend on, or a new one alongside them — 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 `examples/sensors/surface_distance_shadowhand.py:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/sensors/surface_distance_shadowhand.py:36` calls `add_argument` and `examples/sensors/imu_franka.py:15` does not — 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.
Duplicated block (10 lines × 5) examples/coupling/cut_dragon.py:9— examples/coupling/cut_dragon.py:9-18 | examples/coupling/flush_cubes.py:10-19 | examples/coupling/sand_wheel.py:12-21 | examples/coupling/sph_mpm.py:10-19 | examples/coupling/water_wheel.py:16-25 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/cut_dragon.py:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–10 lines × 4) examples/rigid/franka_cube.py:53— examples/rigid/franka_cube.py:53-62 | examples/rigid/suction_cup.py:91-97 | examples/rigid/suction_cup.py:107-113 | examples/rigid/suction_cup.py:117-123 — there are 4 copies across 2 file(s) — 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.
Duplicated block (9 lines × 7) examples/coupling/cut_dragon.py:8— examples/coupling/cut_dragon.py:8-16 | examples/coupling/flush_cubes.py:9-17 | examples/coupling/sand_wheel.py:11-19 | examples/coupling/sph_mpm.py:9-17 | examples/coupling/sph_rigid.py:9-17 | examples/coupling/water_wheel.py:15-23 | examples/deformable/differentiable_push.py:11-19 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/cut_dragon.py:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 5) examples/rendering/moving_camera.py:14— examples/rendering/moving_camera.py:14-23 | examples/rigid/closed_loop.py:28-36 | examples/rigid/gravity_compensation.py:14-23 | examples/rigid/nonconvex_mesh.py:14-23 | examples/rigid/single_franka.py:14-23 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rendering/moving_camera.py:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) examples/rigid/suction_cup.py:9— examples/rigid/suction_cup.py:9-17 | examples/rigid/terrain_height_field.py:12-20 | examples/rigid/terrain_subterrain.py:11-19 | examples/tutorials/position_control_comparison.py:17-25 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/suction_cup.py:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 9) examples/coupling/cut_dragon.py:8— examples/coupling/cut_dragon.py:8-15 | examples/coupling/flush_cubes.py:9-16 | examples/coupling/sand_wheel.py:11-18 | examples/coupling/sph_mpm.py:9-16 | examples/coupling/sph_rigid.py:9-16 | examples/coupling/water_wheel.py:15-22 | examples/deformable/differentiable_push.py:11-18 | examples/deformable/pbd_liquid.py:10-17 | examples/rigid/domain_randomization.py:11-18 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/cut_dragon.py:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/deformable/pbd_liquid.py:19` calls `PBDOptions` and `examples/deformable/differentiable_push.py:19` does not — 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.
Duplicated block (8 lines × 5) examples/coupling/rigid_mpm_attachment.py:18— examples/coupling/rigid_mpm_attachment.py:18-25 | examples/rigid/suction_cup.py:9-16 | examples/rigid/terrain_height_field.py:12-19 | examples/rigid/terrain_subterrain.py:11-18 | examples/tutorials/position_control_comparison.py:17-24 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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. 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/rigid_mpm_attachment.py:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (1–8 lines × 3) examples/rigid/grasp_bottle.py:74— examples/rigid/grasp_bottle.py:74-74 | examples/rigid/grasp_bottle.py:83-89 | examples/rigid/grasp_bottle.py:100-107 — 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 — 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 `examples/rigid/grasp_bottle.py:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 9) examples/coupling/rigid_mpm_attachment.py:17— examples/coupling/rigid_mpm_attachment.py:17-23 | examples/rigid/gravity_compensation.py:8-14 | examples/rigid/nonconvex_mesh.py:8-14 | examples/rigid/single_franka.py:8-14 | examples/rigid/suction_cup.py:8-14 | examples/rigid/terrain_from_mesh.py:11-17 | examples/rigid/terrain_height_field.py:11-17 | examples/rigid/terrain_subterrain.py:10-16 | examples/tutorials/position_control_comparison.py:16-22 — before extracting anything, compare `examples/rigid/gravity_compensation.py` and `examples/rigid/nonconvex_mesh.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/rigid_mpm_attachment.py:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/tutorials/position_control_comparison.py:23` calls `SimOptions` and `examples/rigid/terrain_from_mesh.py:18` does not — 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.
Duplicated block (3–7 lines × 6) examples/coupling/fem_cube_linked_with_arm.py:83— examples/coupling/fem_cube_linked_with_arm.py:83-89 | examples/coupling/grasp_soft_cube.py:64-70 | examples/rigid/control_franka.py:57-59 | examples/rigid/grasp_bottle.py:58-64 | examples/rigid/suction_cup.py:57-63 | examples/sensors/imu_franka.py:98-104 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/fem_cube_linked_with_arm.py:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/coupling/fem_cube_linked_with_arm.py:89` calls `set_dofs_force_range` and `examples/rigid/control_franka.py:59` does not — 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.
Duplicated block (2–7 lines × 6) examples/coupling/fem_cube_linked_with_arm.py:90— examples/coupling/fem_cube_linked_with_arm.py:90-92 | examples/coupling/grasp_soft_cube.py:72-78 | examples/rigid/control_franka.py:59-60 | examples/rigid/grasp_bottle.py:66-73 | examples/rigid/suction_cup.py:64-66 | examples/sensors/imu_franka.py:105-107 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/fem_cube_linked_with_arm.py:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/coupling/grasp_soft_cube.py:72` calls `array` and `examples/coupling/fem_cube_linked_with_arm.py:90` does not — 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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap genesis/grad/kernel_writes.py:115— `get_written_paths` is public and takes `owner: object | None` from its caller, and it calls itself at line 115 (`get_written_paths`) with a piece of `owner` — and nowhere in `get_written_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_written_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×1
Process-global state is restored only on the happy path genesis/ext/pyrender/platforms/egl.py:140— `init_context` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `DISPLAY` environment variable (set at line 227, put back at line 231) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Interpolated log message defeats structured logging genesis/__init__.py:104— `warning` at line 104 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/__init__.py:454— `error` at line 454 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/misc.py:96— `warning` at line 96 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/video_encoder.py:180— `debug` at line 180 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:56— `warning` at line 56 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:58— `info` at line 58 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:145— `info` at line 145 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:314— `warning` at line 314 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:402— `debug` at line 402 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:416— `warning` at line 416 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:423— `warning` at line 423 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:434— `warning` at line 434 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:473— `warning` at line 473 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/file_writers.py:79— `warning` at line 79 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:193— `warning` at line 193 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:260— `info` at line 260 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:418— `info` at line 418 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/trajectory.py:538— `warning` at line 538 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:246— `debug` at line 246 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:252— `debug` at line 252 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:258— `debug` at line 258 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:265— `debug` at line 265 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:403— `debug` at line 403 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:430— `debug` at line 430 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:603— `debug` at line 603 is handed an f-string as its message, so the logger receives one finished string — 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: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Duplicated predicate genesis/engine/solvers/rigid/collider/diff_gjk.py:531— `(gjk_state.polytope.nfaces_map[i_b] == 0) or (i_f_nearest == -1)` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/epa.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/constraint/solver.py:3484— `constraint_state.n_constraints[i_b] > 0 and constraint_state.improved[i_b]` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/abd/inverse_kinematics.py:645— `dyn_info.joints.type[I_j] == gs.JOINT_TYPE.REVOLUTE or dyn_info.joints.type[I_j] == gs.JOINT_TYPE.PRISMATIC` appears character-identically in 3 files — genesis/engine/solvers/rigid/abd/inverse_kinematics.py, genesis/engine/solvers/rigid/constraint/backward.py, genesis/engine/solvers/rigid/constraint/solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/abd/accessor.py:157— `dyn_info.links.parent_idx[I_l] == -1 and dyn_info.links.is_fixed[I_l]` appears character-identically in 3 files — genesis/engine/solvers/rigid/abd/accessor.py, genesis/engine/solvers/rigid/abd/inverse_kinematics.py, genesis/engine/solvers/rigid/abd/misc.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/abd/forward_dynamics.py:1767— `dyn_info.links.root_idx[I_l] == i_l_root and func_is_awake_link(i_l, i_b, dyn_state, rigid_config)` appears character-identically in 2 files — genesis/engine/solvers/rigid/abd/forward_dynamics.py, genesis/engine/solvers/rigid/abd/forward_kinematics.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:951— `g_info["contype"] or g_info["conaffinity"]` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/collider/diff_gjk.py:856— `geom_type == gs.GEOM_TYPE.SPHERE or geom_type == gs.GEOM_TYPE.CAPSULE` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/gjk.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/collider/diff_gjk.py:445— `gjk_state.polytope_verts.id1[i_b, i] == gjk_state.polytope_verts.id1[i_b, wi] and gjk_state.polytope_verts.id2[i_b, i] == gjk_state.polytope…` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/epa.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/simulator.py:278— `gs.backend == gs.cpu and gs.use_zerocopy.is_supported` appears character-identically in 2 files — genesis/engine/simulator.py, genesis/engine/solvers/base_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/simulator.py:49— `gs.use_zerocopy.is_supported and gs.backend == gs.metal` appears character-identically in 3 files — genesis/engine/simulator.py, genesis/engine/solvers/base_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1322— `isinstance(envs_idx, torch.Tensor) and envs_idx.dtype == torch.bool` appears character-identically in 4 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/collider/collider.py, genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:483— `isinstance(mesh.visual, trimesh.visual.texture.TextureVisuals) and mesh.visual.uv is not None` appears character-identically in 2 files — REDACTED, genesis/ext/pyrender/mesh.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1033— `mask and isinstance(mask[0], torch.Tensor)` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/ext/pyrender/jit_render.py:1462— `node.mesh is None or len(node.mesh.primitives) != 1` appears character-identically in 2 files — genesis/ext/pyrender/jit_render.py, genesis/ext/pyrender/scene.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1068— `not IS_OLD_TORCH or envs_idx.dtype == torch.bool` appears character-identically in 3 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/vis/rasterizer_context.py:1313— `not force_render and self._t >= self.scene.sim.cur_step_global` appears character-identically in 3 files — genesis/vis/rasterizer_context.py, genesis/vis/raytracer.py, genesis/vis/visualizer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1019— `not qs_mask or isinstance(qs_mask[0], slice)` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1279— `not self._options.batch_dofs_info and envs_idx is not None` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/fem_solver.py:1050— `not self.is_active or self._n_vverts == 0` appears character-identically in 2 files — genesis/engine/solvers/fem_solver.py, genesis/engine/solvers/pbd_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:1185— `relative and not self._links_offset_pos_is_identity[idx].all()` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/kinematic_solver.py:936— `relative and self._links_offset_pos_is_identity[idx].all()` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/constraint/backward.py:649— `rigid_config.para_level < gs.PARA_LEVEL.ALL and rigid_config.backend != gs.metal` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/backward.py, genesis/engine/solvers/rigid/constraint/solver.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/constraint/solver.py:5218— `rigid_config.solver_type == gs.constraint_solver.Newton and not rigid_config.enable_elliptic_friction` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/constraint/solver.py:5682— `rigid_config.solver_type == gs.constraint_solver.Newton and not rigid_config.has_per_env_solve_seed` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate genesis/engine/solvers/rigid/constraint/solver.py:5137— `rigid_config.solver_type == gs.constraint_solver.Newton and rigid_config.enable_elliptic_friction` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file genesis/engine/force_fields.py:1— 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.
Orphaned file genesis/ext/pyrender/camera.py:1— 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.
Orphaned file genesis/ext/pyrender/font.py:1— 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.
Orphaned file genesis/ext/pyrender/trackball.py:1— 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.
Orphaned file genesis/ext/pyrender/utils.py:1— 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.
Orphaned file genesis/ext/pyrender/overlay/types.py:1— 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.
Orphaned file genesis/ext/pyrender/overlay/style.py:1— 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.
Orphaned file genesis/ext/pyrender/sampler.py:1— 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.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×3
Diagnostic log message is built whether or not it is wanted genesis/vis/viewer.py:155— `debug` at line 155 is called with an argument built by `"…".join(traceback.format())` (line 155), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted genesis/utils/usd/usd_context.py:402— `debug` at line 402 is called with an argument built by `"…".join(commands)` (line 402), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted genesis/engine/couplers/ipc_coupler/coupler.py:403— `debug` at line 403 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 403), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 17 significant file(s) lose their only recent owner: genesis/engine/solvers/rigid/collider/narrowphase.py, genesis/engine/solvers/rigid/constraint/linesearch.py, genesis/recorders/trajectory.py, genesis/utils/particle.py, REDACTED, genesis/utils/sdf.py, genesis/ext/pyrender/light.py, genesis/utils/video_encoder.py (+9 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
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 — folded into the bus-factor score and metrics (18 single-owned of 191 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; 191 of the 262 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: genesis/engine/sensors/joint_torque.py.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` 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 (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — 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 `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (135311 LoC, 886 module-visible types across 57 directories). Review these for cohesion — 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.
Scattered collaborators — 89 % of calls cross a namespace and only 14 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 8 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: genesis/engine/force_fields.py, genesis/ext/pyrender/camera.py, genesis/ext/pyrender/font.py, genesis/ext/pyrender/trackball.py, genesis/ext/pyrender/utils.py, genesis/ext/pyrender/overlay/types.py, genesis/ext/pyrender/overlay/style.py, genesis/ext/pyrender/sampler.py (9 orphaned of 191 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; 191 of the 262 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.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
No SAST REDACTED:4— No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 53412 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's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Silent fallback default in catch genesis/ext/pyrender/overlay/plugin.py:241— `_get_clipboard` (in `_init_imgui`) swallows every exception into `return ''` — 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.
Outdated: gs-madrona — `gs-madrona` is pinned to 0.0.10, but 0.0.11 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.0.10 until the declaration is edited.
Outdated: pygltflib — `pygltflib` is pinned to 1.16.0, but 1.16.5 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.16.0 until the declaration is edited.
Outdated: tetgen — `tetgen` is pinned to 0.8.2, but 0.8.4 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.8.2 until the declaration is edited.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
0
—
Run 01a1a416-d5a1-7a58-9df5-13f687e6d7b4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 53 · Warnings: 1575 · Recommendations: 83 · Info: 3 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 04-11-2026 @ 01:05 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.